pango.context
Module for [Context] class
Types 3
classContext : gobject.object.ObjectWrap
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
ContextGidBuilder builder() static nothrowGet builder for [pango.context.Context] Returns: New builder objectvoid changed() nothrowForces a change in the context, which will cause any [pango.layout.Layout] using this context to re-layout.pango.font_description.FontDescription getFontDescription() nothrowRetrieve 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() nothrowGets 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.language.Language getLanguage() nothrowRetrieves the global language tag for the context. Returns: the global language tag.pango.matrix.Matrix getMatrix() nothrowGets 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) nothrowGet overall metric information for a particular font description.bool getRoundGlyphPositions() nothrowReturns whether font rendering with this context should round glyph positions and widths. Returns:void listFamilies(out pango.font_family.FontFamily[] families) nothrowList all families for a context.pango.font.Font loadFont(pango.font_description.FontDescription desc) nothrowLoads 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) nothrowLoad a set of fonts in the context that can be used to render a font matching desc.void setFontDescription(pango.font_description.FontDescription desc = null) nothrowSet the default font description for the contextvoid setFontMap(pango.font_map.FontMap fontMap = null) nothrowSets the font map to be searched when fonts are looked-up in this context.void setLanguage(pango.language.Language language = null) nothrowSets the global language tag for the context.void setMatrix(pango.matrix.Matrix matrix) nothrowSets the transformation matrix that will be applied when rendering with this context.void setRoundGlyphPositions(bool roundPositions) nothrowSets whether font rendering with this context should round glyph positions and widths to integral positions, in device units.Fluent builder implementation template for pango.context.Context
Fluent builder for pango.context.Context
Methods