Classes
The following classes are available globally.
-
The
PangoAnalysisstructure stores information about the properties of a segment of text.The
See moreAnalysistype acts as an owner of an underlyingPangoAnalysisinstance. It provides the methods that can operate on this data type throughAnalysisProtocolconformance. UseAnalysisas a strong reference or owner of aPangoAnalysisinstance.Declaration
Swift
open class Analysis : AnalysisProtocol
-
The
PangoAttrClassstructure stores the type and operations for a particular type of attribute.The functions in this structure should not be called directly. Instead, one should use the wrapper functions provided for
PangoAttribute.The
See moreAttrClasstype acts as an owner of an underlyingPangoAttrClassinstance. It provides the methods that can operate on this data type throughAttrClassProtocolconformance. UseAttrClassas a strong reference or owner of aPangoAttrClassinstance.Declaration
Swift
open class AttrClass : AttrClassProtocol
-
The
PangoAttrColorstructure is used to represent attributes that are colors.The
See moreAttrColortype acts as an owner of an underlyingPangoAttrColorinstance. It provides the methods that can operate on this data type throughAttrColorProtocolconformance. UseAttrColoras a strong reference or owner of aPangoAttrColorinstance.Declaration
Swift
open class AttrColor : AttrColorProtocol
-
The
PangoAttrFloatstructure is used to represent attributes with a float or double value.The
See moreAttrFloattype acts as an owner of an underlyingPangoAttrFloatinstance. It provides the methods that can operate on this data type throughAttrFloatProtocolconformance. UseAttrFloatas a strong reference or owner of aPangoAttrFloatinstance.Declaration
Swift
open class AttrFloat : AttrFloatProtocol
-
The
PangoAttrFontDescstructure is used to store an attribute that sets all aspects of the font description at once.The
See moreAttrFontDesctype acts as an owner of an underlyingPangoAttrFontDescinstance. It provides the methods that can operate on this data type throughAttrFontDescProtocolconformance. UseAttrFontDescas a strong reference or owner of aPangoAttrFontDescinstance.Declaration
Swift
open class AttrFontDesc : AttrFontDescProtocol
-
The
PangoAttrFontFeaturesstructure is used to represent OpenType font features as an attribute.The
See moreAttrFontFeaturestype acts as an owner of an underlyingPangoAttrFontFeaturesinstance. It provides the methods that can operate on this data type throughAttrFontFeaturesProtocolconformance. UseAttrFontFeaturesas a strong reference or owner of aPangoAttrFontFeaturesinstance.Declaration
Swift
open class AttrFontFeatures : AttrFontFeaturesProtocol
-
The
PangoAttrIntstructure is used to represent attributes with an integer or enumeration value.The
See moreAttrInttype acts as an owner of an underlyingPangoAttrIntinstance. It provides the methods that can operate on this data type throughAttrIntProtocolconformance. UseAttrIntas a strong reference or owner of aPangoAttrIntinstance.Declaration
Swift
open class AttrInt : AttrIntProtocol
-
A
PangoAttrIteratoris used to iterate through aPangoAttrList.A new iterator is created with [method
Pango.AttrList.get_iterator]. Once the iterator is created, it can be advanced through the style changes in the text using [methodPango.AttrIterator.next]. At each style change, the range of the current style segment and the attributes currently in effect can be queried.The
See moreAttrIteratortype acts as an owner of an underlyingPangoAttrIteratorinstance. It provides the methods that can operate on this data type throughAttrIteratorProtocolconformance. UseAttrIteratoras a strong reference or owner of aPangoAttrIteratorinstance.Declaration
Swift
open class AttrIterator : AttrIteratorProtocol
-
The
PangoAttrLanguagestructure is used to represent attributes that are languages.The
See moreAttrLanguagetype acts as an owner of an underlyingPangoAttrLanguageinstance. It provides the methods that can operate on this data type throughAttrLanguageProtocolconformance. UseAttrLanguageas a strong reference or owner of aPangoAttrLanguageinstance.Declaration
Swift
open class AttrLanguage : AttrLanguageProtocol
-
A
PangoAttrListrepresents a list of attributes that apply to a section of text.The attributes in a
PangoAttrListare, in general, allowed to overlap in an arbitrary fashion. However, if the attributes are manipulated only through [methodPango.AttrList.change], the overlap between properties will meet stricter criteria.Since the
PangoAttrListstructure is stored as a linear list, it is not suitable for storing attributes for large amounts of text. In general, you should not use a singlePangoAttrListfor more than one paragraph of text.The
See moreAttrListtype acts as a reference-counted owner of an underlyingPangoAttrListinstance. It provides the methods that can operate on this data type throughAttrListProtocolconformance. UseAttrListas a strong reference or owner of aPangoAttrListinstance.Declaration
Swift
open class AttrList : AttrListProtocol
-
The
PangoAttrShapestructure is used to represent attributes which impose shape restrictions.The
See moreAttrShapetype acts as an owner of an underlyingPangoAttrShapeinstance. It provides the methods that can operate on this data type throughAttrShapeProtocolconformance. UseAttrShapeas a strong reference or owner of aPangoAttrShapeinstance.Declaration
Swift
open class AttrShape : AttrShapeProtocol
-
The
PangoAttrSizestructure is used to represent attributes which set font size.The
See moreAttrSizetype acts as an owner of an underlyingPangoAttrSizeinstance. It provides the methods that can operate on this data type throughAttrSizeProtocolconformance. UseAttrSizeas a strong reference or owner of aPangoAttrSizeinstance.Declaration
Swift
open class AttrSize : AttrSizeProtocol
-
The
PangoAttrStringstructure is used to represent attributes with a string value.The
See moreAttrStringtype acts as an owner of an underlyingPangoAttrStringinstance. It provides the methods that can operate on this data type throughAttrStringProtocolconformance. UseAttrStringas a strong reference or owner of aPangoAttrStringinstance.Declaration
Swift
open class AttrString : AttrStringProtocol
-
The
PangoAttributestructure represents the common portions of all attributes.Particular types of attributes include this structure as their initial portion. The common portion of the attribute holds the range to which the value in the type-specific part of the attribute applies and should be initialized using [method
Pango.Attribute.init]. By default, an attribute will have an all-inclusive range of [0,G_MAXUINT].The
See moreAttributetype acts as an owner of an underlyingPangoAttributeinstance. It provides the methods that can operate on this data type throughAttributeProtocolconformance. UseAttributeas a strong reference or owner of aPangoAttributeinstance.Declaration
Swift
open class Attribute : AttributeProtocol
-
A
PangoContextstores global information used to control the itemization process.The information stored by
PangoContextincludes the fontmap used to look up fonts, and default values such as the default language, default gravity, or default font.To obtain a
PangoContext, use [methodPango.FontMap.create_context].The
See moreContexttype acts as a reference-counted owner of an underlyingPangoContextinstance. It provides the methods that can operate on this data type throughContextProtocolconformance. UseContextas a strong reference or owner of aPangoContextinstance.Declaration
Swift
open class Context : GLibObject.Object, ContextProtocol
-
A
PangoCoveragestructure is a map from Unicode characters to [enumPango.CoverageLevel] values.It is often necessary in Pango to determine if a particular font can represent a particular character, and also how well it can represent that character. The
PangoCoverageis a data structure that is used to represent that information. It is an opaque structure with no public fields.The
See moreCoveragetype acts as a reference-counted owner of an underlyingPangoCoverageinstance. It provides the methods that can operate on this data type throughCoverageProtocolconformance. UseCoverageas a strong reference or owner of aPangoCoverageinstance.Declaration
Swift
open class Coverage : GLibObject.Object, CoverageProtocol
-
The
PangoColorstructure is used to represent a color in an uncalibrated RGB color-space.The
See moreColortype acts as an owner of an underlyingPangoColorinstance. It provides the methods that can operate on this data type throughColorProtocolconformance. UseColoras a strong reference or owner of aPangoColorinstance.Declaration
Swift
open class Color : ColorProtocol
-
A
PangoFontis used to represent a font in a rendering-system-independent manner.The
See moreFonttype acts as a reference-counted owner of an underlyingPangoFontinstance. It provides the methods that can operate on this data type throughFontProtocolconformance. UseFontas a strong reference or owner of aPangoFontinstance.Declaration
Swift
open class Font : GLibObject.Object, FontProtocol
-
A
PangoFontFaceis used to represent a group of fonts with the same family, slant, weight, and width, but varying sizes.The
See moreFontFacetype acts as a reference-counted owner of an underlyingPangoFontFaceinstance. It provides the methods that can operate on this data type throughFontFaceProtocolconformance. UseFontFaceas a strong reference or owner of aPangoFontFaceinstance.Declaration
Swift
open class FontFace : GLibObject.Object, FontFaceProtocol
-
A
PangoFontFamilyis used to represent a family of related font faces.The font faces in a family share a common design, but differ in slant, weight, width or other aspects.
The
See moreFontFamilytype acts as a reference-counted owner of an underlyingPangoFontFamilyinstance. It provides the methods that can operate on this data type throughFontFamilyProtocolconformance. UseFontFamilyas a strong reference or owner of aPangoFontFamilyinstance.Declaration
Swift
open class FontFamily : GLibObject.Object, FontFamilyProtocol
-
A
PangoFontMaprepresents the set of fonts available for a particular rendering system.This is a virtual object with implementations being specific to particular rendering systems.
The
See moreFontMaptype acts as a reference-counted owner of an underlyingPangoFontMapinstance. It provides the methods that can operate on this data type throughFontMapProtocolconformance. UseFontMapas a strong reference or owner of aPangoFontMapinstance.Declaration
Swift
open class FontMap : GLibObject.Object, FontMapProtocol
-
A
PangoFontsetrepresents a set ofPangoFontto use when rendering text.A
PangoFontsetis the result of resolving aPangoFontDescriptionagainst a particularPangoContext. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset.The
See moreFontsettype acts as a reference-counted owner of an underlyingPangoFontsetinstance. It provides the methods that can operate on this data type throughFontsetProtocolconformance. UseFontsetas a strong reference or owner of aPangoFontsetinstance.Declaration
Swift
open class Fontset : GLibObject.Object, FontsetProtocol
-
PangoFontsetSimpleis a implementation of the abstractPangoFontsetbase class as an array of fonts.When creating a
PangoFontsetSimple, you have to provide the array of fonts that make up the fontset.The
See moreFontsetSimpletype acts as a reference-counted owner of an underlyingPangoFontsetSimpleinstance. It provides the methods that can operate on this data type throughFontsetSimpleProtocolconformance. UseFontsetSimpleas a strong reference or owner of aPangoFontsetSimpleinstance.Declaration
Swift
open class FontsetSimple : Fontset, FontsetSimpleProtocol
-
A
PangoFontDescriptiondescribes a font in an implementation-independent manner.PangoFontDescriptionstructures are used both to list what fonts are available on the system and also for specifying the characteristics of a font to load.The
See moreFontDescriptiontype acts as an owner of an underlyingPangoFontDescriptioninstance. It provides the methods that can operate on this data type throughFontDescriptionProtocolconformance. UseFontDescriptionas a strong reference or owner of aPangoFontDescriptioninstance.Declaration
Swift
open class FontDescription : FontDescriptionProtocol
-
A
PangoFontMetricsstructure holds the overall metric information for a font.The information in a
PangoFontMetricsstructure may be restricted to a script. The fields of this structure are private to implementations of a font backend. See the documentation of the corresponding getters for documentation of their meaning.For an overview of the most important metrics, see:
<picture> <source srcset=“fontmetrics-dark.png” media=“(prefers-color-scheme: dark)”> <img alt=“Font metrics” src=“fontmetrics-light.png”> </picture>
The
See moreFontMetricstype acts as a reference-counted owner of an underlyingPangoFontMetricsinstance. It provides the methods that can operate on this data type throughFontMetricsProtocolconformance. UseFontMetricsas a strong reference or owner of aPangoFontMetricsinstance.Declaration
Swift
open class FontMetrics : FontMetricsProtocol
-
The
PangoGlyphGeometrystructure contains width and positioning information for a single glyph.Note that
widthis not guaranteed to be the same as the glyph extents. Kerning and other positioning applied during shaping will affect both thewidthand thex_offsetfor the glyphs in the glyph string that results from shaping.The information in this struct is intended for rendering the glyphs, as follows:
- Assume the current point is (x, y)
- Render the current glyph at (x + x_offset, y + y_offset),
- Advance the current point to (x + width, y)
- Render the next glyph
The
See moreGlyphGeometrytype acts as an owner of an underlyingPangoGlyphGeometryinstance. It provides the methods that can operate on this data type throughGlyphGeometryProtocolconformance. UseGlyphGeometryas a strong reference or owner of aPangoGlyphGeometryinstance.Declaration
Swift
open class GlyphGeometry : GlyphGeometryProtocol
-
A
PangoGlyphInfostructure represents a single glyph with positioning information and visual attributes.The
See moreGlyphInfotype acts as an owner of an underlyingPangoGlyphInfoinstance. It provides the methods that can operate on this data type throughGlyphInfoProtocolconformance. UseGlyphInfoas a strong reference or owner of aPangoGlyphInfoinstance.Declaration
Swift
open class GlyphInfo : GlyphInfoProtocol
-
A
PangoGlyphItemis a pair of aPangoItemand the glyphs resulting from shaping the items text.As an example of the usage of
PangoGlyphItem, the results of shaping text withPangoLayoutis a list ofPangoLayoutLine, each of which contains a list ofPangoGlyphItem.The
See moreGlyphItemtype acts as an owner of an underlyingPangoGlyphIteminstance. It provides the methods that can operate on this data type throughGlyphItemProtocolconformance. UseGlyphItemas a strong reference or owner of aPangoGlyphIteminstance.Declaration
Swift
open class GlyphItem : GlyphItemProtocol
-
A
PangoGlyphItemIteris an iterator over the clusters in aPangoGlyphItem.The forward direction of the iterator is the logical direction of text. That is, with increasing
start_indexandstart_charvalues. Ifglyph_itemis right-to-left (that is, ifglyph_item->item->analysis.levelis odd), thenstart_glyphdecreases as the iterator moves forward. Moreover, in right-to-left cases,start_glyphis greater thanend_glyph.An iterator should be initialized using either
pango_glyph_item_iter_init_start()orpango_glyph_item_iter_init_end(), for forward and backward iteration respectively, and walked over using any desired mixture ofpango_glyph_item_iter_next_cluster()andpango_glyph_item_iter_prev_cluster().A common idiom for doing a forward iteration over the clusters is:
PangoGlyphItemIter cluster_iter; gboolean have_cluster; for (have_cluster = pango_glyph_item_iter_init_start (&cluster_iter, glyph_item, text); have_cluster; have_cluster = pango_glyph_item_iter_next_cluster (&cluster_iter)) { ... }Note that
textis the start of the text for layout, which is then indexed byglyph_item->item->offsetto get to the text ofglyph_item. Thestart_indexandend_indexvalues can directly index intotext. Thestart_glyph,end_glyph,start_char, andend_charvalues however are zero-based for theglyph_item. For each cluster, the item pointed at by the start variables is included in the cluster while the one pointed at by end variables is not.None of the members of a
PangoGlyphItemItershould be modified manually.The
See moreGlyphItemItertype acts as an owner of an underlyingPangoGlyphItemIterinstance. It provides the methods that can operate on this data type throughGlyphItemIterProtocolconformance. UseGlyphItemIteras a strong reference or owner of aPangoGlyphItemIterinstance.Declaration
Swift
open class GlyphItemIter : GlyphItemIterProtocol
-
A
PangoGlyphStringis used to store strings of glyphs with geometry and visual attribute information.The storage for the glyph information is owned by the structure which simplifies memory management.
The
See moreGlyphStringtype acts as an owner of an underlyingPangoGlyphStringinstance. It provides the methods that can operate on this data type throughGlyphStringProtocolconformance. UseGlyphStringas a strong reference or owner of aPangoGlyphStringinstance.Declaration
Swift
open class GlyphString : GlyphStringProtocol
-
A
PangoGlyphVisAttrstructure communicates information between the shaping and rendering phases.Currently, it contains cluster start and color information. More attributes may be added in the future.
Clusters are stored in visual order, within the cluster, glyphs are always ordered in logical order, since visual order is meaningless; that is, in Arabic text, accent glyphs follow the glyphs for the base character.
The
See moreGlyphVisAttrtype acts as an owner of an underlyingPangoGlyphVisAttrinstance. It provides the methods that can operate on this data type throughGlyphVisAttrProtocolconformance. UseGlyphVisAttras a strong reference or owner of aPangoGlyphVisAttrinstance.Declaration
Swift
open class GlyphVisAttr : GlyphVisAttrProtocol
-
The
PangoItemstructure stores information about a segment of text.You typically obtain
PangoItemsby itemizing a piece of text with [funcitemize].The
See moreItemtype acts as an owner of an underlyingPangoIteminstance. It provides the methods that can operate on this data type throughItemProtocolconformance. UseItemas a strong reference or owner of aPangoIteminstance.Declaration
Swift
open class Item : ItemProtocol
-
A
PangoLayoutstructure represents an entire paragraph of text.While complete access to the layout capabilities of Pango is provided using the detailed interfaces for itemization and shaping, using that functionality directly involves writing a fairly large amount of code.
PangoLayoutprovides a high-level driver for formatting entire paragraphs of text at once. This includes paragraph-level functionality such as line breaking, justification, alignment and ellipsization.A
PangoLayoutis initialized with aPangoContext, UTF-8 string and set of attributes for that string. Once that is done, the set of formatted lines can be extracted from the object, the layout can be rendered, and conversion between logical character positions within the layout’s text, and the physical position of the resulting glyphs can be made.There are a number of parameters to adjust the formatting of a
PangoLayout. The following image shows adjustable parameters (on the left) and font metrics (on the right):<picture> <source srcset=“layout-dark.png” media=“(prefers-color-scheme: dark)”> <img alt=“Pango Layout Parameters” src=“layout-light.png”> </picture>
The following images demonstrate the effect of alignment and justification on the layout of text:






It is possible, as well, to ignore the 2-D setup, and simply treat the results of a
PangoLayoutas a list of lines.The
See moreLayouttype acts as a reference-counted owner of an underlyingPangoLayoutinstance. It provides the methods that can operate on this data type throughLayoutProtocolconformance. UseLayoutas a strong reference or owner of aPangoLayoutinstance.Declaration
Swift
open class Layout : GLibObject.Object, LayoutProtocol
-
The
PangoLanguagestructure is used to represent a language.PangoLanguagepointers can be efficiently copied and compared with each other.The
See moreLanguagetype acts as an owner of an underlyingPangoLanguageinstance. It provides the methods that can operate on this data type throughLanguageProtocolconformance. UseLanguageas a strong reference or owner of aPangoLanguageinstance.Declaration
Swift
open class Language : LanguageProtocol
-
A
PangoLayoutItercan be used to iterate over the visual extents of aPangoLayout.To obtain a
PangoLayoutIter, use [methodPango.Layout.get_iter].The
PangoLayoutIterstructure is opaque, and has no user-visible fields.The
See moreLayoutItertype acts as an owner of an underlyingPangoLayoutIterinstance. It provides the methods that can operate on this data type throughLayoutIterProtocolconformance. UseLayoutIteras a strong reference or owner of aPangoLayoutIterinstance.Declaration
Swift
open class LayoutIter : LayoutIterProtocol
-
A
PangoLayoutLinerepresents one of the lines resulting from laying out a paragraph viaPangoLayout.PangoLayoutLinestructures are obtained by calling [methodPango.Layout.get_line] and are only valid until the text, attributes, or settings of the parentPangoLayoutare modified.The
See moreLayoutLinetype acts as a reference-counted owner of an underlyingPangoLayoutLineinstance. It provides the methods that can operate on this data type throughLayoutLineProtocolconformance. UseLayoutLineas a strong reference or owner of aPangoLayoutLineinstance.Declaration
Swift
open class LayoutLine : LayoutLineProtocol
-
The
PangoLogAttrstructure stores information about the attributes of a single character.The
See moreLogAttrtype acts as an owner of an underlyingPangoLogAttrinstance. It provides the methods that can operate on this data type throughLogAttrProtocolconformance. UseLogAttras a strong reference or owner of aPangoLogAttrinstance.Declaration
Swift
open class LogAttr : LogAttrProtocol
-
A
PangoMatrixspecifies a transformation between user-space and device coordinates.The transformation is given by
x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0; y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;The
See moreMatrixtype acts as an owner of an underlyingPangoMatrixinstance. It provides the methods that can operate on this data type throughMatrixProtocolconformance. UseMatrixas a strong reference or owner of aPangoMatrixinstance.Declaration
Swift
open class Matrix : MatrixProtocol
-
PangoRendereris a base class for objects that can render text provided asPangoGlyphStringorPangoLayout.By subclassing
PangoRendererand overriding operations such asdraw_glyphsanddraw_rectangle, renderers for particular font backends and destinations can be created.The
See moreRenderertype acts as a reference-counted owner of an underlyingPangoRendererinstance. It provides the methods that can operate on this data type throughRendererProtocolconformance. UseRendereras a strong reference or owner of aPangoRendererinstance.Declaration
Swift
open class Renderer : GLibObject.Object, RendererProtocol
-
The
PangoRectanglestructure represents a rectangle.PangoRectangleis frequently used to represent the logical or ink extents of a single glyph or section of text. (See, for instance, [methodPango.Font.get_glyph_extents].)The
See moreRectangletype acts as an owner of an underlyingPangoRectangleinstance. It provides the methods that can operate on this data type throughRectangleProtocolconformance. UseRectangleas a strong reference or owner of aPangoRectangleinstance.Declaration
Swift
open class Rectangle : RectangleProtocol
-
A
PangoScriptIteris used to iterate through a string and identify ranges in different scripts.The
See moreScriptItertype acts as an owner of an underlyingPangoScriptIterinstance. It provides the methods that can operate on this data type throughScriptIterProtocolconformance. UseScriptIteras a strong reference or owner of aPangoScriptIterinstance.Declaration
Swift
open class ScriptIter : ScriptIterProtocol
-
A
PangoTabArraycontains an array of tab stops.PangoTabArraycan be used to set tab stops in aPangoLayout. Each tab stop has an alignment, a position, and optionally a character to use as decimal point.The
See moreTabArraytype acts as an owner of an underlyingPangoTabArrayinstance. It provides the methods that can operate on this data type throughTabArrayProtocolconformance. UseTabArrayas a strong reference or owner of aPangoTabArrayinstance.Declaration
Swift
open class TabArray : TabArrayProtocol
View on GitHub
Install in Dash
Classes Reference