Context
I am interested in manually converting *.pfb (Type 1) font files into *.svg files in Java.
I know that
- I can read construct Font objects form *.pfb files in Java
- I can produce GlyphVectors for each character.
Question
What I don’t know is:
- How do I go from GlyphVector to the strokes / paths which I can then output into a *.svg file?
Aside
This is a learning exercise. I’m re-inventing the wheel on purpose for the sake of learning.
Do you want to generate an SVG image with all the glyphs in the font or generate an SVG Font?
For generating an SVG image, you can use Batik. Draw each glyph into a Batik graphics context (using SVGGraphics2D) and you’ll then be able to write an SVG file from Batik.