Type Aliases
The following type aliases are available globally.
-
A
PangoGlyphrepresents a single glyph in the output form of a string.Declaration
Swift
public typealias Glyph = PangoGlyph -
The
PangoGlyphUnittype is used to store dimensions within Pango.Dimensions are stored in 1/PANGO_SCALE of a device unit. (A device unit might be a pixel for screen display, or a point on a printer.) PANGO_SCALE is currently 1024, and may change in the future (unlikely though), but you should not depend on its exact value.
The
PANGO_PIXELS()macro can be used to convert from glyph units into device units with correct rounding.Declaration
Swift
public typealias GlyphUnit = PangoGlyphUnit -
A
PangoLayoutRunrepresents a single run within aPangoLayoutLine.It is simply an alternate name for [struct
Pango.GlyphItem]. See the [structPango.GlyphItem] docs for details on the fields.Declaration
Swift
public typealias LayoutRun = PangoLayoutRun -
Type of a function that can duplicate user data for an attribute.
Declaration
Swift
public typealias AttrDataCopyFunc = PangoAttrDataCopyFunc -
Type of a function filtering a list of attributes.
Declaration
Swift
public typealias AttrFilterFunc = PangoAttrFilterFunc -
Callback used when enumerating fonts in a fontset.
See [method
Pango.Fontset.foreach].Declaration
Swift
public typealias FontsetForeachFunc = PangoFontsetForeachFunc -
PangoAlignmentdescribes how to align the lines of aPangoLayoutwithin the available space.If the
PangoLayoutis set to justify using [methodPango.Layout.set_justify], this only affects partial lines.See [method
Pango.Layout.set_auto_dir] for how text direction affects the interpretation ofPangoAlignmentvalues.Declaration
Swift
public typealias Alignment = PangoAlignment -
The
PangoAttrTypedistinguishes between different types of attributes.Along with the predefined values, it is possible to allocate additional values for custom attributes using [func
AttrType.register]. The predefined values are given below. The type of structure used to store the attribute is listed in parentheses after the description.Declaration
Swift
public typealias AttrType = PangoAttrType -
An enumeration that affects baseline shifts between runs.
Declaration
Swift
public typealias BaselineShift = PangoBaselineShift -
PangoBidiTyperepresents the bidirectional character type of a Unicode character.The values in this enumeration are specified by the Unicode bidirectional algorithm.
BidiType is deprecated: Use fribidi for this information
Declaration
Swift
public typealias BidiType = PangoBidiType -
PangoCoverageLevelis used to indicate how well a font can represent a particular Unicode character for a particular script.Since 1.44, only
PANGO_COVERAGE_NONEandPANGO_COVERAGE_EXACTwill be returned.Declaration
Swift
public typealias CoverageLevel = PangoCoverageLevel -
PangoDirectionrepresents a direction in the Unicode bidirectional algorithm.Not every value in this enumeration makes sense for every usage of
PangoDirection; for example, the return value of [funcunichar_direction] and [funcfind_base_dir] cannot bePANGO_DIRECTION_WEAK_LTRorPANGO_DIRECTION_WEAK_RTL, since every character is either neutral or has a strong direction; on the other handPANGO_DIRECTION_NEUTRALdoesn’t make sense to pass to [funcitemize_with_base_dir].The
PANGO_DIRECTION_TTB_LTR,PANGO_DIRECTION_TTB_RTLvalues come from an earlier interpretation of this enumeration as the writing direction of a block of text and are no longer used. SeePangoGravityfor how vertical text is handled in Pango.If you are interested in text direction, you should really use fribidi directly.
PangoDirectionis only retained because it is used in some public apis.Declaration
Swift
public typealias Direction = PangoDirection -
PangoEllipsizeModedescribes what sort of ellipsization should be applied to text.In the ellipsization process characters are removed from the text in order to make it fit to a given width and replaced with an ellipsis.
Declaration
Swift
public typealias EllipsizeMode = PangoEllipsizeMode -
An enumeration that affects font sizes for superscript and subscript positioning and for (emulated) Small Caps.
Declaration
Swift
public typealias FontScale = PangoFontScale -
PangoGravityrepresents the orientation of glyphs in a segment of text.This is useful when rendering vertical text layouts. In those situations, the layout is rotated using a non-identity [struct
Pango.Matrix], and then glyph orientation is controlled usingPangoGravity.Not every value in this enumeration makes sense for every usage of
PangoGravity; for example,PANGO_GRAVITY_AUTOonly can be passed to [methodPango.Context.set_base_gravity] and can only be returned by [methodPango.Context.get_base_gravity].See also: [enum
Pango.GravityHint]Declaration
Swift
public typealias Gravity = PangoGravity -
PangoGravityHintdefines how horizontal scripts should behave in a vertical context.That is, English excerpts in a vertical paragraph for example.
See also [enum
Pango.Gravity]Declaration
Swift
public typealias GravityHint = PangoGravityHint -
Errors that can be returned by [func
Pango.Layout.deserialize].Declaration
Swift
public typealias LayoutDeserializeError = PangoLayoutDeserializeError -
The
PangoOverlineenumeration is used to specify whether text should be overlined, and if so, the type of line.Declaration
Swift
public typealias Overline = PangoOverline -
PangoRenderPartdefines different items to render for such purposes as setting colors.Declaration
Swift
public typealias RenderPart = PangoRenderPart -
The
PangoScriptenumeration identifies different writing systems.The values correspond to the names as defined in the Unicode standard. See Unicode Standard Annex 24: Script names
Note that this enumeration is deprecated and will not be updated to include values in newer versions of the Unicode standard. Applications should use the [enum
GLib.UnicodeScript] enumeration instead, whose values are interchangeable withPangoScript.Declaration
Swift
public typealias Script = PangoScript -
An enumeration specifying the width of the font relative to other designs within a family.
Declaration
Swift
public typealias Stretch = PangoStretch -
An enumeration specifying the various slant styles possible for a font.
Declaration
Swift
public typealias Style = PangoStyle -
PangoTabAlignspecifies where the text appears relative to the tab stop position.Declaration
Swift
public typealias TabAlign = PangoTabAlign -
An enumeration that affects how Pango treats characters during shaping.
Declaration
Swift
public typealias TextTransform = PangoTextTransform -
The
PangoUnderlineenumeration is used to specify whether text should be underlined, and if so, the type of underlining.Declaration
Swift
public typealias Underline = PangoUnderline -
An enumeration specifying capitalization variant of the font.
Declaration
Swift
public typealias Variant = PangoVariant -
An enumeration specifying the weight (boldness) of a font.
Weight is specified as a numeric value ranging from 100 to 1000. This enumeration simply provides some common, predefined values.
Declaration
Swift
public typealias Weight = PangoWeight -
PangoWrapModedescribes how to wrap the lines of aPangoLayoutto the desired width.For
PANGO_WRAP_WORD, Pango uses break opportunities that are determined by the Unicode line breaking algorithm. ForPANGO_WRAP_CHAR, Pango allows breaking at grapheme boundaries that are determined by the Unicode text segmentation algorithm.Declaration
Swift
public typealias WrapMode = PangoWrapMode
View on GitHub
Install in Dash
Type Aliases Reference