Loading ...
Sorry, an error occurred while loading the content.
 

PostScript type3 fonts to SVG

Expand Messages
  • Michel.Goossens@cern.ch
    In the scientific community where I work, most physicists use TeX for generating their scientific documentation. The latter contains a lot of math, some
    Message 1 of 2 , Mar 26, 2001
      In the scientific community where I work, most physicists use TeX for
      generating their scientific documentation. The latter contains a lot
      of math, some chemistry, and quite a few, mostly simple, diagrams.
      What we normally do is generate a PostScript or PDF file of our
      finished documents, so that they can be viewed and distributed simply
      and reliably.

      Recently, I have started to investigate the use of XML to store our
      documents. With DocBook I have a powerful hierarchical model for
      storing the structural content, MathML gives me the math, and SVG
      could serve for the drawings. However, I did not really understand how
      to convert simple PostScript graphics to SVG, in particular if I use
      non-standard fonts. In general, TeX uses a lot of math characters,
      and, to make the diagrams self-contained (and not having to refer to a
      zillion type 1 renderings), I would have thought that it would not be
      too complicated to convert the type3 code for the characters that I
      use in my drawings to paths in SVG. Has something done some work in
      that area? Converting simple line-drawing PostScript images with text
      expressed in type3 outlines to SVG would make it possible to have a
      100% XML solution for storing most of our documents.

      Thanks for any information about this subject, hints and suggestions
      are most welcome. mg
    • Jon Ferraiolo
      Are you aware of SVG Fonts (http://www.w3.org/TR/SVG/fonts.html)? SVG has a feature called SVG Fonts which allows glyph outlines to be expressed as SVG
      Message 2 of 2 , Mar 26, 2001
        Are you aware of SVG Fonts (http://www.w3.org/TR/SVG/fonts.html)?

        SVG has a feature called "SVG Fonts" which allows glyph outlines to be
        expressed as SVG paths. There is a <font> element and a <glyph> element,
        for example. SVG glyphs can be expressed in two ways:

        (1) A 'd' attribute on the <glyph> element is the simplest method. The 'd'
        attribute takes the same path data stream as the <path> element. This
        technique is most useful when you want text to utilize painting properties
        in the same manner as when you use system fonts.

        (2) For more flexibility, the <glyph> element can contain arbitrary
        graphics. For example, you can design a glyph such that the dot on the "i"
        is a different color that the rest of the glyph. This technique is a bit
        complex to use as there are issues regarding coordinate systems and
        property inheritance.

        Conforming SVG implementations must support SVG fonts.

        Additionally, Adobe authoring tools and the Adobe SVG Viewer supports the
        CEF font format. This format consists of a packaging scheme that is a
        subset of OpenType and glyph outlines use CFF packing (Type1 character data
        in a packed binary form). The specification of every aspect of CEF is open
        and at least one open source implementation is available. Adobe believes
        CEF fonts have lots of merit in terms of quality/size tradeoffs and we
        encourage other authoring tools and viewers to consider CEF fonts.

        For your needs, it sounds like SVG Fonts using the 'd' attribute on the
        <glyph> element is the simplest and best answer for your needs.

        Jon Ferraiolo
        SVG Editor
        jferraio@...


        At 08:23 AM 3/26/01 +0000, you wrote:
        >In the scientific community where I work, most physicists use TeX for
        >generating their scientific documentation. The latter contains a lot
        >of math, some chemistry, and quite a few, mostly simple, diagrams.
        >What we normally do is generate a PostScript or PDF file of our
        >finished documents, so that they can be viewed and distributed simply
        >and reliably.
        >
        >Recently, I have started to investigate the use of XML to store our
        >documents. With DocBook I have a powerful hierarchical model for
        >storing the structural content, MathML gives me the math, and SVG
        >could serve for the drawings. However, I did not really understand how
        >to convert simple PostScript graphics to SVG, in particular if I use
        >non-standard fonts. In general, TeX uses a lot of math characters,
        >and, to make the diagrams self-contained (and not having to refer to a
        >zillion type 1 renderings), I would have thought that it would not be
        >too complicated to convert the type3 code for the characters that I
        >use in my drawings to paths in SVG. Has something done some work in
        >that area? Converting simple line-drawing PostScript images with text
        >expressed in type3 outlines to SVG would make it possible to have a
        >100% XML solution for storing most of our documents.
        >
        >Thanks for any information about this subject, hints and suggestions
        >are most welcome. mg
        >
        >
        >
        >
        >
        >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      Your message has been successfully submitted and would be delivered to recipients shortly.