agl: Interface to the Adobe Glyph List

Interface to the Adobe Glyph List

This module exists to convert glyph names from the Adobe Glyph List to their Unicode equivalents. Example usage:

>>> from fontTools.agl import toUnicode
>>> toUnicode("nahiragana")

It also contains two dictionaries, UV2AGL and AGL2UV, which map from Unicode codepoints to AGL names and vice versa:

>>> import fontTools
>>> fontTools.agl.UV2AGL[ord("?")]
>>> fontTools.agl.AGL2UV["wcircumflex"]

This is used by fontTools when it has to construct glyph names for a font which doesn’t include any (e.g. format 3.0 post tables).

exception fontTools.agl.AGLError[source]

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

fontTools.agl.toUnicode(glyph, isZapfDingbats=False)[source]

Convert glyph names to Unicode, such as 'longs_t.oldstyle' –> u'ſt'

If isZapfDingbats is True, the implementation recognizes additional glyph names (as required by the AGL specification).