TTF2f is a utility for converting TrueType (.ttf), OpenType (.otf), and other font formats supported by FreeType2 to RISC OS fonts. It is written in C, and available under the Simplified BSD Licence.
Please download TTF2f:
Early versions of the UCS Font Manager (3.41-3.42) supported the use of /uni followed by up to 8 upper-case hex digits to specify the Unicode codepoint represented by a glyph.
Font Manager 3.43 changed this behaviour to align with Adobe's then-current specification of /uniXXXX for characters in the Basic Multilingual Plane and /uniXXXXYYYY for all other characters (where XXXX is a high UTF-16 surrogate and YYYY is a low surrogate)
Font Manager 3.53 changed again to remove support for /uniXXXXYYYY and, instead, introduced support for /uXXXX to /uXXXXXXXX, where leading zeroes are forbidden if more than 4 hex digits are present.
Change our behaviour to use the /uniXXXX form for characters in the Basic Multilingual Plane (which is supported by all versions of the UCS Font Manager) and use the /uXXXXX - /uXXXXXXXX form for all other characters.
This effectively means that Font Manager 3.53 or later is required when astral characters are in use.
All fonts containing astral characters converted using earlier versions of TTF2f will need to be re-converted with this (or later) version to allow the Font Manager to make use of glyphs defined for astral characters.
Fix broken glyph naming for fonts with codepoints outside the Basic Multilingual Plane. This issue would manifest itself if the bottom 16 bits of a codepoint in an astral plane happened to match a codepoint in the Glyph mapping. In this case the glyph would be erroneously identified as representing the corresponding BMP codepoint, resulting in a bogus Encoding file for the font and incorrect glyph display when using legacy alphabets.
As a concrete example, a glyph representing codepoint U+20021 (being a CJK Unified Ideograph in the Supplementary Ideographic Plane) would be erroneously identified as U+0021 (EXCLAMATION MARK) and would have an Encoding file entry of "/exclam", instead of "/uni20021". This would then cause this glyph to be displayed whenever an exclamation mark was used in a Latin1 alphabet.
No longer create language fonts, as the font manager appears capable of handling encoding files with /uniXXXX for symbol fonts. Quite why this behaviour didn't appear to work when originally tested, I've no idea. This change avoids any necessity to move Encodings files around.
Remove buggy metrics code which caused fonts with <= 256 different horiAdvance values to have broken glyph spacings. All fonts now use the extended table format where the glyph number is the table index.
Fix for fonts which don't embed glyph names (or use incorrect ones). The glyph names are now retrieved from the Glyphs file. The format of the Glyphs file is as per the Adobe Glyph List comment. TTF2f uses only columns 1 and 2.
Improve multitasking when extracting glyph metrics.
You can browse the source code via the online interface. Alternatively, you can check it out with Git:
$ git clone git://git.netsurf-browser.org/ttf2f.git
TTF2f is licensed under the Simplified BSD Licence.
Please report any problems with this software to the user mailing list. If you would like to contribute to TTF2f, please get in touch via the developer mailing list.