ttfquery.describe
Extract meta-data from a font-file to describe the font
Functions
guessEncoding(
font
,
given
= None
)
Attempt to guess/retrieve an encoding from the font itself
Basically this will try to get the given encoding
(unless it is None).
If given is a single integer or a single-item tuple,
we will attempt scan looking for any table matching
given as the platform ID and returning the first sub
table.
If given is a two-value tuple, we will require
explicit matching, and raise errors if the encoding
cannot be retrieved.
if given is None, we will return the first encoding
in the font.
XXX This needs some work, particularly for non-win32
platforms, where there is no preference embodied
for the native encoding.