Class: PangoFc::FontMap

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

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.

Parameters:

  • findfunc (PangoFc::DecoderFindFunc)

    The Pango::FcDecoderFindFunc callback function

  • user_data (GObject)

    User data.

  • dnotify (GLib::DestroyNotify)

    A GDestroy::Notify callback that will be called when the fontmap is finalized and the decoder is released.

Returns:

  • (nil)

#cache_clearnil

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.

Returns:

  • (nil)

#configPangoFc::

Fetches FcConfig attached to a font map. See pango_fc_font_map_set_config().

Returns:

  • (PangoFc::)

    the Fc::Config object attached to fcfontmap, which might be nil.

#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.

Parameters:

  • fcconfig (PangoFc::)

    a Fc::Config, or nil

Returns:

  • (nil)

#config_changednil

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.

Returns:

  • (nil)

#create_contextPango::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.

Returns:

#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().

Parameters:

  • pattern (fontconfig::Pattern)

    The Fc::Pattern to find the decoder for.

Returns:

  • (PangoFc::Decoder)

    a newly created Pango::FcDecoder object or nil if no decoder is set for pattern.

#get_hb_face(fcfont) ⇒ PangoFc::

Parameters:

Returns:

#shutdownnil

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.

Returns:

  • (nil)