pangocairo.font_map_mixin
Module for [FontMap] interface mixin
Templates 2
[pangocairo.font_map.FontMap] is an interface exported by font maps for use with Cairo.
The actual type of the font map will depend on the particular font technology Cairo was compiled to use.
Gets the type of Cairo font backend that fontmap uses.
Returns
Gets the resolution for the fontmap.
See [pangocairo.font_map.FontMap.setResolution].
Returns
Sets a default [pangocairo.font_map.FontMap] to use with Cairo.
This can be used to change the Cairo font backend that the default fontmap uses for example. The old default font map is unreffed and the new font map referenced.
Note that since Pango 1.32.6, the default fontmap is per-thread. This function only changes the default fontmap for the current thread. Default fontmaps of existing threads are not changed. Default fontmaps of any new threads will still be created using [pangocairo.font_map.FontMap.new_].
A value of null for fontmap will cause the current default font map to be released and a new default font map to be created on demand, using [pangocairo.font_map.FontMap.new_].
Sets the resolution for the fontmap.
This is a scale factor between points specified in a [pango.font_description.FontDescription] and Cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).
Parameters
dpi | the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.) |