Module: PangoCairo::FontMap
- Defined in:
- (unknown)
Overview
Pango::CairoFontMap 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.
Instance Method Summary collapse
-
#create_context ⇒ Pango::Context
Create a Pango::Context for the given fontmap.
-
#font_type ⇒ cairo::FontType
Gets the type of Cairo font backend that fontmap uses.
-
#resolution ⇒ Float
Gets the resolution for the fontmap.
-
#resolution=(dpi) ⇒ nil
Sets the resolution for the fontmap.
-
#set_default ⇒ nil
Sets a default Pango::CairoFontMap to use with Cairo.
Instance Method Details
#create_context ⇒ Pango::Context
Create a Pango::Context for the given fontmap.
#font_type ⇒ cairo::FontType
Gets the type of Cairo font backend that fontmap uses.
#resolution ⇒ Float
Gets the resolution for the fontmap. See pango_cairo_font_map_set_resolution()
#resolution=(dpi) ⇒ nil
Sets the resolution for the fontmap. This is a scale factor between points specified in a Pango::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).
#set_default ⇒ nil
Sets a default Pango::CairoFontMap 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 exisiting threads are not changed. Default fontmaps of any new threads will still be created using pango_cairo_font_map_new().
A value of nil for fontmap will cause the current default font map to be released and a new default font map to be created on demand, using pango_cairo_font_map_new().