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_Metricsobject is valid for bitmap fonts also.Attributes
ascenderThe ascender in fractional pixels. descenderThe descender in fractional pixels. heightThe height in fractional pixels. max_advanceThe maximum advance width in fractional pixels. x_ppemThe width of the scaled EM square in pixels. x_scaleA fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels. y_ppemThe height of the scaled EM square in pixels. y_scaleA fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels.