Class: Pango::FontMap
- Inherits:
-
Object
- Object
- Pango::FontMap
- Defined in:
- (unknown)
Overview
The Pango::FontMapClass structure holds the virtual functions for a particular Pango::FontMap implementation.
Instance Method Summary collapse
-
#changed ⇒ nil
Forces a change in the context, which will cause any Pango::Context using this fontmap to change.
-
#create_context ⇒ Pango::Context
Creates a Pango::Context connected to fontmap.
-
#list_families(families, n_families) ⇒ nil
List all families for a fontmap.
-
#load_font(context, desc) ⇒ Pango::Font
Load the font in the fontmap that is the closest match for desc.
-
#load_fontset(context, desc, language) ⇒ Pango::Fontset
Load a set of fonts in the fontmap that can be used to render a font matching desc.
-
#serial ⇒ Integer
Returns the current serial number of fontmap.
Instance Method Details
#changed ⇒ nil
Forces a change in the context, which will cause any Pango::Context using this fontmap to change.
This function is only useful when implementing a new backend for Pango, something applications won’t do. Backends should call this function if they have attached extra data to the context and such data is changed.
#create_context ⇒ Pango::Context
Creates a Pango::Context connected to fontmap. This is equivalent to pango_context_new() followed by pango_context_set_font_map().
If you are using Pango as part of a higher-level system, that system may have it’s own way of create a Pango::Context. For instance, the GTK+ toolkit has, among others, gdk_pango_context_get_for_screen(), and gtk_widget_get_pango_context(). Use those instead.
#list_families(families, n_families) ⇒ nil
List all families for a fontmap.
#load_font(context, desc) ⇒ Pango::Font
Load the font in the fontmap that is the closest match for desc.
#load_fontset(context, desc, language) ⇒ Pango::Fontset
Load a set of fonts in the fontmap that can be used to render a font matching desc.
#serial ⇒ Integer
Returns the current serial number of fontmap. The serial number is initialized to an small number larger than zero when a new fontmap is created and is increased whenever the fontmap is changed. It may wrap, but will never have the value 0. Since it can wrap, never compare it with “less than”, always use “not equals”.
The fontmap can only be changed using backend-specific API, like changing fontmap resolution.
This can be used to automatically detect changes to a Pango::FontMap, like in Pango::Context.