Class: PangoFT2::FontMap

  • Object
show all
Defined in:


The Pango::FT2FontMap is the #PangoFontMap implementation for FreeType fonts.

Instance Method Summary collapse

Instance Method Details


Create a Pango::Context for the given fontmap.


  • (Pango::Context)

    the newly created context; free with g_object_unref().


Create a new Pango::FT2FontMap 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 pango_ft2_font_map_set_default_substitute()). with g_object_unref() when you are finished with it.


#set_default_substitute(func, data, notify) ⇒ nil

Sets a function that will be called to do final configuration substitution on a Fc::Pattern before it is used to load the font. This function can be used to do things like set hinting and antialiasing options.


  • func (PangoFT2::SubstituteFunc)

    function to call to to do final config tweaking on Fc::Pattern objects.

  • data (GObject)

    data to pass to func

  • notify (GLib::DestroyNotify)

    function to call when data is no longer used.


  • (nil)

#set_resolution(dpi_x, dpi_y) ⇒ nil

Sets the horizontal and vertical resolutions for the fontmap.


  • dpi_x (Float)

    dots per inch in the X direction

  • dpi_y (Float)

    dots per inch in the Y direction


  • (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.


  • (nil)