PgCairoFontMap

Constructors

this
this(PangoCairoFcFontMap* pangoCairoFcFontMap, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new #PangoCairoFontMap object; a fontmap is used to cache information about available fonts, and holds certain global parameters such as the resolution. In most cases, you can use pango_cairo_font_map_get_default() instead.

this
this(cairo_font_type_t fonttype)

Creates a new #PangoCairoFontMap object of the type suitable to be used with cairo font backend of type @fonttype.

Members

Functions

getFontType
cairo_font_type_t getFontType()

Gets the type of Cairo font backend that @fontmap uses.

getPgCairoFontMapStruct
PangoCairoFcFontMap* getPgCairoFontMapStruct()

Get the main Gtk struct

getResolution
double getResolution()

Gets the resolution for the fontmap. See pango_cairo_font_map_set_resolution()

getScaledFont
ScaledFont getScaledFont()

Gets the #cairo_scaled_font_t used by @font. The scaled font can be referenced and kept using cairo_scaled_font_reference().

getStruct
void* getStruct()

the main Gtk struct as a void*

setDefault
void setDefault()

Sets a default #PangoCairoFontMap to use with Cairo.

setResolution
void setResolution(double dpi)

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

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

getDefault
PgFontMap getDefault()

Gets a default #PangoCairoFontMap to use with Cairo.

Variables

pangoCairoFcFontMap
PangoCairoFcFontMap* pangoCairoFcFontMap;

the main Gtk struct

Inherited Members

From PgFontMap

pangoFontMap
PangoFontMap* pangoFontMap;

the main Gtk struct

getPgFontMapStruct
PangoFontMap* getPgFontMapStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
changed
void changed()

Forces a change in the context, which will cause any #PangoContext using this fontmap to change.

createContext
PgContext createContext()

Creates a #PangoContext connected to @fontmap. This is equivalent to pango_context_new() followed by pango_context_set_font_map().

getSerial
uint getSerial()

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

getShapeEngineType
string getShapeEngineType()

Returns the render ID for shape engines for this fontmap. See the <structfield>render_type</structfield> field of #PangoEngineInfo.

listFamilies
void listFamilies(PgFontFamily[] families)

List all families for a fontmap.

loadFont
PgFont loadFont(PgContext context, PgFontDescription desc)

Load the font in the fontmap that is the closest match for @desc.

loadFontset
PgFontset loadFontset(PgContext context, PgFontDescription desc, PgLanguage language)

Load a set of fonts in the fontmap that can be used to render a font matching @desc.

Meta