freetypy.Size_Metrics¶
-
class
freetypy.
Size_Metrics
¶ The metrics of a size object.
The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in
Face
.Note that due to glyph hinting, these values might not be exact for certain fonts. Thus they must be treated as unreliable with an error margin of at least one pixel!
Indeed, the only way to get the exact metrics is to render all glyphs. As this would be a definite performance hit, it is up to client applications to perform such computations.
The
Size_Metrics
object is valid for bitmap fonts also.-
__init__
()¶ x.__init__(...) initializes x; see help(type(x)) for signature
Attributes
ascender
The ascender in fractional pixels. descender
The descender in fractional pixels. height
The height in fractional pixels. max_advance
The maximum advance width in fractional pixels. x_ppem
The width of the scaled EM square in pixels. x_scale
A fractional scaling value. y_ppem
The height of the scaled EM square in pixels. y_scale
A fractional scaling value. -