[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Parsing AFM files without PFA/PFB
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Parsing AFM files without PFA/PFB |
Date: |
Wed, 27 Mar 2019 15:51:18 +0100 (CET) |
> Does FreeType provide a way to parse an AFM file and extract the
> corresponding glyph metrics and kerning information, when the
> accompanying PFA/PFB file is not present?
No.
> One use case is Matplotlib's postscript backend, which can layout
> glyphs just based on their metrics but does not need the pfa/pfb
> files itself. Right now Matplotlib uses its own handwritten AFM
> parser, but it would be nice if FreeType's AFM support could be used
> instead.
Well, FreeType is a *rendering* library, i.e., its main goal is to
produce bitmaps. Scanning AFM files alone is completely useless for
FreeType; for this reason there isn't a separate API to access the
metrics data.
Werner