Class: PangoFc::FontMap
- Inherits:
-
Object
- Object
- PangoFc::FontMap
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#add_decoder_find_func(findfunc, user_data, dnotify) ⇒ nil
This function saves a callback method in the Pango::FcFontMap that will be called whenever new fonts are created.
-
#cache_clear ⇒ nil
Clear all cached information and fontsets for this font map; this should be called whenever there is a change in the output of the default_substitute() virtual function of the font map, or if fontconfig has been reinitialized to new configuration.
-
#config ⇒ PangoFc::
Fetches FcConfig attached to a font map.
-
#config=(fcconfig) ⇒ nil
Set the FcConfig for this font map to use.
-
#config_changed ⇒ nil
Informs font map that the fontconfig configuration (ie, FcConfig object) used by this font map has changed.
-
#create_context ⇒ Pango::Context
Creates a new context for this fontmap.
-
#find_decoder(pattern) ⇒ PangoFc::Decoder
Finds the decoder to use for pattern.
- #get_hb_face(fcfont) ⇒ PangoFc::
-
#shutdown ⇒ nil
Clears all cached information for the fontmap and marks all fonts open for the fontmap as dead.
Instance Method Details
#add_decoder_find_func(findfunc, user_data, dnotify) ⇒ nil
This function saves a callback method in the Pango::FcFontMap that will be called whenever new fonts are created. If the function returns a Pango::FcDecoder, that decoder will be used to determine both coverage via a Fc::CharSet and a one-to-one mapping of characters to glyphs. This will allow applications to have application-specific encodings for various fonts.
#cache_clear ⇒ nil
Clear all cached information and fontsets for this font map; this should be called whenever there is a change in the output of the default_substitute() virtual function of the font map, or if fontconfig has been reinitialized to new configuration.
#config ⇒ PangoFc::
Fetches FcConfig attached to a font map. See pango_fc_font_map_set_config().
#config=(fcconfig) ⇒ nil
Set the FcConfig for this font map to use. The default value is nil, which causes Fontconfig to use its global “current config”. You can create a new FcConfig object and use this API to attach it to a font map.
This is particularly useful for example, if you want to use application fonts with Pango. For that, you would create a fresh FcConfig, add your app fonts to it, and attach it to a new Pango font map.
If fcconfig is different from the previous config attached to the font map, pango_fc_font_map_config_changed() is called.
This function acquires a reference to the FcConfig object; the caller does NOT need to retain a reference.
#config_changed ⇒ nil
Informs font map that the fontconfig configuration (ie, FcConfig object) used by this font map has changed. This currently calls pango_fc_font_map_cache_clear() which ensures that list of fonts, etc will be regenerated using the updated configuration.
#create_context ⇒ Pango::Context
Creates a new context for this fontmap. This function is intended only for backend implementations deriving from Pango::FcFontMap; it is possible that a backend will store additional information needed for correct operation on the Pango::Context after calling this function.
#find_decoder(pattern) ⇒ PangoFc::Decoder
Finds the decoder to use for pattern. Decoders can be added to a font map using pango_fc_font_map_add_decoder_find_func().
#get_hb_face(fcfont) ⇒ PangoFc::
#shutdown ⇒ nil
Clears all cached information for the fontmap and marks all fonts open for the fontmap as dead. (See the shutdown() virtual function of Pango::FcFont.) This function might be used by a backend when the underlying windowing system for the font map exits. This function is only intended to be called only for backend implementations deriving from Pango::FcFontMap.