Menu

About

lancelot Adobe Admin Mayur Kansal

Introduction

The Tin open source library is a body of C++ code for programmatically manipulating fonts. The fonts it supports are those based on the SFNT structure, which includes TrueType and OpenType. OpenType fonts based on either TrueType or CFF can be manipulated. Not yet supported are TrueType collections (.TTC).

The code does not compile into a library or program as-is. It must be incorporated into a program. The basic structure mirrors the SFNT format at least superficially, so the purpose of most files will be evident by the file's name.
The code is written for execution efficiency, particularly for large fonts. Wholesale changes to a font consisting of 15,000 glyphs can be made in a second or two on modern computers.

The basic premise of the library is to pull the font apart, stuffing its components into manipulable data structures; then to make changes to the font; then to reassemble the font. Any information that carries a dependency to other information in the font gets abstracted so that the changes and reassembly do not result in incorrect references. Hence glyph order is free to change, for example. Glyphs can be inserted or deleted safely. Structures that refer to glyph ID will continue to refer to the correct glyph in the face of such changes. At reassembly time the abstract glyph ID will get converted to an ordinal position.

Limitations

The 'kern' table is not supported and gets removed if present.
The 'DSIG' table gets removed.
Apple's AAT font structures are not supported.
Unrecognized font structures cannot be manipulated or updated; their presence in the reassembled font could result in a font that some font engines consider corrupt if information in the table refers to other parts of the font.


Discussion

Anonymous
Anonymous

Add attachments
Cancel