Class: PangoFT2::FontMap
- Inherits:
-
PangoFc::FontMap
- Object
- Pango::FontMap
- PangoFc::FontMap
- PangoFT2::FontMap
- Defined in:
- (unknown)
Overview
The PangoFT2FontMap is the PangoFontMap implementation for FreeType fonts.
Class Method Summary collapse
-
.for_display ⇒ Pango::FontMap
Returns a
PangoFT2FontMap.
Instance Method Summary collapse
-
#create_context ⇒ Pango::Context
Create a
PangoContextfor the given fontmap. -
#initialize ⇒ Pango::FontMap
constructor
Create a new
PangoFT2FontMapobject. -
#set_default_substitute(func, data, notify) ⇒ nil
Sets a function that will be called to do final configuration substitution on a
FcPatternbefore it is used to load the font. -
#set_resolution(dpi_x, dpi_y) ⇒ nil
Sets the horizontal and vertical resolutions for the fontmap.
-
#substitute_changed ⇒ nil
Call this function any time the results of the default substitution function set with pango_ft2_font_map_set_default_substitute() change.
Methods inherited from PangoFc::FontMap
#add_decoder_find_func, #cache_clear, #config, #config=, #config_changed, #find_decoder, #get_hb_face, #shutdown
Methods inherited from Pango::FontMap
#changed, #get_family, #item_type, #item_type=, #list_families, #load_font, #load_fontset, #n_items, #n_items=, #reload_font, #serial
Constructor Details
#initialize ⇒ Pango::FontMap
Create a new PangoFT2FontMap object.
A fontmap is used to cache information about available fonts, and holds certain global parameters such as the resolution and the default substitute function (see [methodPangoFT2.FontMap.set_default_substitute]). with g_object_unref() when you are finished with it.
Class Method Details
.for_display ⇒ Pango::FontMap
Returns a PangoFT2FontMap.
This font map is cached and should not be freed. If the font map is no longer needed, it can be released with pango_ft2_shutdown_display(). Use of the global PangoFT2 fontmap is deprecated; use pango_ft2_font_map_new() instead.
Instance Method Details
#create_context ⇒ Pango::Context
Create a PangoContext for the given fontmap.
#set_default_substitute(func, data, notify) ⇒ nil
Sets a function that will be called to do final configuration
substitution on a FcPattern before it is used to load
the font.
This function can be used to do things like set hinting and antialiasing options.
#set_resolution(dpi_x, dpi_y) ⇒ nil
Sets the horizontal and vertical resolutions for the fontmap.
#substitute_changed ⇒ nil
Call this function any time the results of the default substitution function set with pango_ft2_font_map_set_default_substitute() change.
That is, if your substitution function will return different results for the same input pattern, you must call this function.