class Freetype::SizeMetrics
- Freetype::SizeMetrics
- Reference
- Object
Overview
The size metrics structure gives the metrics of a size object.
Note
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 SizeMetrics structure is valid for bitmap fonts also.
Defined in:
freetype/size_metrics.crConstructors
Instance Method Summary
-
#ascender
The ascender in 26.6 fractional pixels.
-
#descender
The descender in 26.6 fractional pixels.
-
#height
The height in 26.6 fractional pixels.
-
#max_advance
The maximal advance width in 26.6 fractional pixels.
- #size_metrics : LibFreetype::FT_Size_Metrics
-
#x_ppem
The width of the scaled EM square in pixels, hence the term 'ppem' (pixels per EM).
-
#x_scale
A 16.16 fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels.
-
#y_ppem
The height of the scaled EM square in pixels, hence the term 'ppem' (pixels per EM).
-
#y_scale
A 16.16 fractional scaling value used to convert vertical metrics from font units to 26.6 fractional pixels.
Constructor Detail
Instance Method Detail
The width of the scaled EM square in pixels, hence the term 'ppem' (pixels per EM). It is also referred to as 'nominal width'.
A 16.16 fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.
The height of the scaled EM square in pixels, hence the term 'ppem' (pixels per EM). It is also referred to as 'nominal height'.
A 16.16 fractional scaling value used to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.