Reputation: 31
I'm looking for a java-based open source library that can convert postscript fonts to opentype and/or truetype fonts. I've done a lot of searches with google but haven't found a solution yet.
Please help.
Upvotes: 3
Views: 2025
Reputation: 21
sfntly (now at https://github.com/googlei18n/sfntly) will not convert Postscript-format font files to TrueType/OpenType-format fonts. (sfntly can process some OpenType fonts with internal Postscript CFF curves - but those fonts are already in OpenType file format....)
FontForge is an open source font editor thatcan load PostScript Type-1 or CFF font files and will write TrueType or OpenType format font files. The curves defining each glyph can be (more or less) converted from Postscript format (cubic Bezier curves) to TrueType format (quadratic Bezier curves).
However, "hint" data used to render the font at small-to-medium point sizes is a very different story. True/OpenType and PostScript glyph formats use radically different hint data systems and there (AFAIK) no good way to convert hint data between the formats. Thus, a typical PS -> TTF font conversion would convert the curves and then run an automatic hint generation process (which, I believe, is a feature in FontForge) to create new hints for the TTF glyphs.
Upvotes: 1
Reputation: 950
You could have a look at sfntly (http://code.google.com/p/sfntly/):
From the site: sfntly is a Java and C++ library for using, editing, and creating sfnt container based fonts (e.g. OpenType, TrueType). [...] The basic features of sfntly are the reading, editing, and writing of an sfnt container font. Fonts that use an sfnt container include OpenType, TrueType, AAT/GX, and Graphite.
Upvotes: 4