Menu

#13 New font hinting language (infrastructure) needed

open
nobody
None
5
2011-11-26
2011-11-26
quanta
No

Although FontForge has support for glyph hinting/instructing, the current implementation highly depends on the font file formats being worked on, which makes it difficult for users to utilize the features, and even harder for developers to improve the hinting features. What FontForge needs is its own font instructing language which can be compiled/translated into other hinting languages depending on file formats being exported (for example, PostScript and TrueType) and issues warnings if the export target misses features needed for proper (loseless) glyph instructing, or if the translated instructions exceed the limits of the virtual machines for the target file format's specifications (eg: overly long instructions, stack overflow). Conversely, importing fonts in other formats translates any hinting scripts into FontForge's own instructions, but without VM limits (FF will still point out invalid/unrecognized instructions/parameters, or breakage of any VM limits for the source script formats, but FF can still attempt to run them).

For loseless translation of existing hinted fonts, this new FontForge glyph hinting language needs to incorporate hinting features found in language used in major font formats, but the adds the ability to handle font/glyph properties found in all font formats supported by FontForge, especially for more advanced font formats such as PostScript Type 3 or SVG. The processing of FontForge's instructions should be font format neutral, until the font is exported to non-native formats. The new language itself can be adopted from a high-level language found in TrueType Instruction Compiler[1], which also has a free licence (in GPL). The use of high-level language simplifies the process of debugging custom hints, hinting algorithms, and the language tools/libraries themselves, and makes it easier to implement tools around the language (eg: IDEs, visual hinting tool, language layout tools).

Once a hinting language is established, the next priority will be the IDEs, followed by visual hinting tool. The IDEs can be implemented based on the major IDEs for GNU compilers. The visual hinting tool can implement the features and user interface of Visual TrueType[2], but able to work with raster fonts and stroke-based font control points, generates hinting codes in FontForge's high-level native language, and able to preview the codes, and edit the resulting code manually or via wizard/template tools. The new visual tools will finally allow the hinting features be exploited by end users without extensive programming skills.

[1] http://home.kabelfoon.nl/~slam/fonts/tticomp.html
[2] http://www.microsoft.com/typography/tools/vtt.aspx

Discussion


Log in to post a comment.

MongoDB Logo MongoDB