pango.context

Module for [Context] class

Types 3

A [pango.context.Context] stores global information used to control the itemization process.

The information stored by [pango.context.Context] includes the fontmap used to look up fonts, and default values such as the default language, default gravity, or default font.

To obtain a [pango.context.Context], use [pango.font_map.FontMap.createContext].

Methods
GType _gType() @property
Context self()Returns `this`, for use in `with` statements.
ContextGidBuilder builder()Get builder for [pango.context.Context] Returns: New builder object
void changed()Forces a change in the context, which will cause any [pango.layout.Layout] using this context to re-layout.
pango.types.Direction getBaseDir()Retrieves the base direction for the context.
pango.types.Gravity getBaseGravity()Retrieves the base gravity for the context.
pango.font_description.FontDescription getFontDescription()Retrieve the default font description for the context. Returns: a pointer to the context's default font description. This value must not be modified or freed.
pango.font_map.FontMap getFontMap()Gets the [pango.font_map.FontMap] used to look up fonts for this context. Returns: the font map for the. [pango.context.Context] This value is owned by Pango and should not be unreferenced.
pango.types.Gravity getGravity()Retrieves the gravity for the context.
pango.types.GravityHint getGravityHint()Retrieves the gravity hint for the context.
pango.language.Language getLanguage()Retrieves the global language tag for the context. Returns: the global language tag.
pango.matrix.Matrix getMatrix()Gets the transformation matrix that will be applied when rendering with this context.
pango.font_metrics.FontMetrics getMetrics(pango.font_description.FontDescription desc = null, pango.language.Language language = null)Get overall metric information for a particular font description.
bool getRoundGlyphPositions()Returns whether font rendering with this context should round glyph positions and widths. Returns:
uint getSerial()Returns the current serial number of context.
void listFamilies(out pango.font_family.FontFamily[] families)List all families for a context.
pango.font.Font loadFont(pango.font_description.FontDescription desc)Loads the font in one of the fontmaps in the context that is the closest match for desc.
pango.fontset.Fontset loadFontset(pango.font_description.FontDescription desc, pango.language.Language language)Load a set of fonts in the context that can be used to render a font matching desc.
void setBaseDir(pango.types.Direction direction)Sets the base direction for the context.
void setBaseGravity(pango.types.Gravity gravity)Sets the base gravity for the context.
void setFontDescription(pango.font_description.FontDescription desc = null)Set the default font description for the context
void setFontMap(pango.font_map.FontMap fontMap = null)Sets the font map to be searched when fonts are looked-up in this context.
void setGravityHint(pango.types.GravityHint hint)Sets the gravity hint for the context.
void setLanguage(pango.language.Language language = null)Sets the global language tag for the context.
void setMatrix(pango.matrix.Matrix matrix)Sets the transformation matrix that will be applied when rendering with this context.
void setRoundGlyphPositions(bool roundPositions)Sets whether font rendering with this context should round glyph positions and widths to integral positions, in device units.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [pango.context.Context] initialized to default values.

Fluent builder for [pango.context.Context]

Methods
Context build()