Functions

ensure_glyph_cache_for_layout (layout)

font_map_clear_glyph_cache (font_map)

font_map_create_context (font_map)

font_map_get_renderer (font_map)

font_map_get_use_mipmapping (font_map)

font_map_new ()

font_map_set_resolution (font_map, dpi)

font_map_set_use_mipmapping (font_map, value)

render_layout (layout, x, y, color, flags)

render_layout_line (line, x, y, color)

render_layout_subpixel (layout, x, y, color, flags)

Details

CoglPango.ensure_glyph_cache_for_layout(layout)
Parameters:

layout (Pango.Layout) – A Pango.Layout

This updates any internal glyph cache textures as necessary to be able to render the given layout.

This api should be used to avoid mid-scene modifications of glyph-cache textures which can lead to undefined rendering results.

New in version 1.0.

CoglPango.font_map_clear_glyph_cache(font_map)
Parameters:

font_map (PangoCairo.FontMap) – a #CoglPangoFontMap

Clears the glyph cache for font_map.

New in version 1.0.

CoglPango.font_map_create_context(font_map)
Parameters:

font_map (PangoCairo.FontMap) – a #CoglPangoFontMap

Returns:

the newly created context: free with GObject.Object.unref().

Return type:

Pango.Context

Create a Pango.Context for the given font_map.

CoglPango.font_map_get_renderer(font_map)
Parameters:

font_map (PangoCairo.FontMap) – a #CoglPangoFontMap

Returns:

a Pango.Renderer

Return type:

Pango.Renderer

Retrieves the CoglPango.Renderer for the passed font_map.

New in version 1.0.

CoglPango.font_map_get_use_mipmapping(font_map)
Parameters:

font_map (PangoCairo.FontMap) – a #CoglPangoFontMap

Returns:

True if mipmapping is used, False otherwise.

Return type:

int

Retrieves whether the CoglPango.Renderer used by font_map will use mipmapping when rendering the glyphs.

New in version 1.0.

CoglPango.font_map_new()
Returns:

the newly created Pango.FontMap

Return type:

Pango.FontMap

Creates a new font map.

New in version 1.14.

CoglPango.font_map_set_resolution(font_map, dpi)
Parameters:
  • font_map (PangoCairo.FontMap) – a #CoglPangoFontMap

  • dpi (float) – The resolution in “dots per inch”. (Physical inches aren’t actually involved; the terminology is conventional.)

Sets the resolution for the font_map. This is a scale factor between points specified in a Pango.FontDescription and Cogl units. The default value is %96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

New in version 1.14.

CoglPango.font_map_set_use_mipmapping(font_map, value)
Parameters:

Sets whether the renderer for the passed font map should use mipmapping when rendering a Pango.Layout.

New in version 1.0.

CoglPango.render_layout(layout, x, y, color, flags)
Parameters:
  • layout (Pango.Layout) – a Pango.Layout

  • x (int) – X coordinate to render the layout at

  • y (int) – Y coordinate to render the layout at

  • color (Cogl.Color) – color to use when rendering the layout

  • flags (int) –

Draws a solidly coloured layout on the given framebuffer at (x, y) within the framebuffer ‘s current model-view coordinate space.

New in version 1.0.

Deprecated since version 1.16: Use cogl_pango_show_layout() instead

CoglPango.render_layout_line(line, x, y, color)
Parameters:

Renders line at the given coordinates using the given color.

New in version 1.0.

Deprecated since version 1.16: Use cogl_pango_show_layout() instead

CoglPango.render_layout_subpixel(layout, x, y, color, flags)
Parameters:
  • layout (Pango.Layout) – a Pango.Layout

  • x (int) – X coordinate (in Pango units) to render the layout at

  • y (int) – Y coordinate (in Pango units) to render the layout at

  • color (Cogl.Color) – color to use when rendering the layout

  • flags (int) –

Draws a solidly coloured layout on the given framebuffer at (x, y) within the framebuffer ‘s current model-view coordinate space.

New in version 1.0.

Deprecated since version 1.16: Use cogl_pango_show_layout() instead