Eugen Wissner ef2d02d88d
Some checks failed
Build / audit (push) Successful in 10s
Build / test (push) Failing after 4m27s
Build / release (push) Successful in 4m11s
Add build workflow
2025-08-09 22:50:57 +03:00
2025-08-09 22:50:57 +03:00
2025-02-26 19:30:01 +01:00
2025-02-26 19:30:01 +01:00
2024-02-11 18:50:25 +01:00
2024-02-04 11:07:15 +01:00
2023-03-13 10:51:25 +01:00

TrueType font parser

Fountainhead is a TrueType and OpenType font parser. Its main purpose is to extract information from the fonts to help to embed these fonts into PDF documents.

There is also an executable that supports dumping font information to the screen.

Installation

Add the library as dependency to your project. Alternatively build an executable with:

cabal build

The binary can be run with:

cabal run fountainhead -- fonts/OpenSans-Bold.ttf

or installed locally and executed just as:

fountainhead fonts/OpenSans-Bold.ttf

This command will output the contents of the font in a format similar to ttfdump from TeXLive.

See

fountainhead --help

for help.

Usage

TrueType and OpenType fonts consist of a sequence of tables and various informations about the font are encoded in these tables. There are both required and optional tables. The first table is a font directory and it describes the overall structure of the font, what tables it contains and at what offset other tables can be found.

This library doesn't parse the whole font at once. The font directory has to be parsed first and can be used then to parse further tables as needed.

Description
Haskell TrueType font parser.
Readme MPL-2.0 722 KiB
Languages
Haskell 100%