freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IDEA] Facilities to extract TT fonts from TTC font collections


From: Hin-Tak Leung
Subject: Re: [IDEA] Facilities to extract TT fonts from TTC font collections
Date: Mon, 23 Oct 2023 18:48:22 +0000 (UTC)

On Monday, 23 October 2023 at 17:36:09 BST, Werner LEMBERG <wl@gnu.org> wrote:

> > I recently had to extract a TrueType font from a TTC font collection
> > as part of fixing bugs in the podofo library[1].

> In general, FreeType is not the right tool for such operations.
> FreeType is a *rendering* library that provides a thin API for
> extracting SFNT tables, mainly the ones FreeType isn't parsing by
> itself.  As Behdad mentioned, the `fonttools` package should help you
> with your task.

Besides fonttools, this isn't heavily advertised, but Font Validator's ironpython scripting interface has an example script called "ttc-splitter.py" for doing exactly that. And a "ttc-merger.py" script too, as well as a "ttx-l.py" script, which does what fonttools "ttx -l" does, ie listing font tables. They are located in Font-Validator/bin/scripting-examples/ .

FontVal contains very little font-modification/writing related code as it is a font checking tool, but somehow Microsoft had included some font-writing code in there, for unknown purposes. The scripting interface uses Ironpython (an implementation of python interpreter running on microsoft Dot Net / xamarin mono) and we bundle the iron python interpreter, actually.
 But AFAIK I am the only person who uses that part of FontVal as part of the bulk half-yearly-ish testing on all fedora-shipped fonts.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]