Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: object
PangoCairoFontMap is an interface exported by font maps for use with Cairo.
The actual type of the font map will depend on the particular font technology
Cairo was compiled to use.
FontMap (Handle = null)
Creates a new
FontMapby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.create_context ()
Create a
PangoContextfor the given fontmap.
get_font_type ()
Gets the type of Cairo font backend that @fontmap uses.
get_resolution ()
Gets the resolution for the fontmap. See [method@PangoCairo.FontMap.set_resolution].
set_default ()
Sets a default
PangoCairoFontMapto use with Cairo. This can be used to change the Cairo font backend that the default fontmap uses for example. The old default font map is unreffed and the new font map referenced. Note that since Pango 1.32.6, the default fontmap is per-thread. This function only changes the default fontmap for the current thread. Default fontmaps of existing threads are not changed. Default fontmaps of any new threads will still be created using [func@PangoCairo.FontMap.new]. A value of %NULL for @fontmap will cause the current default font map to be released and a new default font map to be created on demand, using [func@PangoCairo.FontMap.new].
None.set_resolution (double dpi)
Sets the resolution for the fontmap. This is a scale factor between points specified in a
PangoFontDescriptionand Cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).
dpi is the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.).None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.