Class: PangoFT2::FontMap

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#create_contextPango::Context

Create a Pango::Context for the given fontmap.

Returns:

  • (Pango::Context)

    the newly created context; free with g_object_unref().

#newPango::FontMap

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.

Returns:

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

Parameters:

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

Returns:

  • (nil)

#set_resolution(dpi_x, dpi_y) ⇒ nil

Sets the horizontal and vertical resolutions for the fontmap.

Parameters:

  • dpi_x (Float)

    dots per inch in the X direction

  • dpi_y (Float)

    dots per inch in the Y direction

Returns:

  • (nil)

#substitute_changednil

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.

Returns:

  • (nil)