pedantic.software --pedantic

libsfnt is a small OpenType/SFNT font file parser

libsfnt is a library for parsing OpenType/TrueType/SFNT files. It does only that, in particular it is neither a font renderer, TrueType bytecode interpreter, script layout engine, and whatnot. For a more comprehensive explanation of the rationale behind this library, see font.

The SFNT file format (which is a generic format that is used for TrueType and OpenType fonts) contains various sections, that are called tables. For example, TrueType fonts will include a table called “glyf”, containing glyph outline data. libsfnt can parse these tables into corresponding C structures. It provides functions to:

The data types reading functions can be used to implement parsing of tables that are not yet implemented in libsfnt.

As of now, the following groups of table are implemented:

The following tables are not yet implemented, but might be in the future:

The following tables are not supported, and won’t be in libsfnt:

libsfnt is hosted here.

The general installation instructions can be followed to install the library. It is packaged in our Gentoo overlay as dev-libs/libsfnt.