Type Aliases
The following type aliases are available globally.
-
A
PangoGlyph
represents a single glyph in the output form of a string.Declaration
Swift
public typealias Glyph = PangoGlyph
-
The
PangoGlyphUnit
type 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
PangoLayoutRun
represents 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
-
PangoAlignment
describes how to align the lines of aPangoLayout
within the available space.If the
PangoLayout
is 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 ofPangoAlignment
values.Declaration
Swift
public typealias Alignment = PangoAlignment
-
The
PangoAttrType
distinguishes 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
-
PangoBidiType
represents 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
-
PangoCoverageLevel
is used to indicate how well a font can represent a particular Unicode character for a particular script.Since 1.44, only
PANGO_COVERAGE_NONE
andPANGO_COVERAGE_EXACT
will be returned.Declaration
Swift
public typealias CoverageLevel = PangoCoverageLevel
-
PangoDirection
represents 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_LTR
orPANGO_DIRECTION_WEAK_RTL
, since every character is either neutral or has a strong direction; on the other handPANGO_DIRECTION_NEUTRAL
doesn’t make sense to pass to [funcitemize_with_base_dir
].The
PANGO_DIRECTION_TTB_LTR
,PANGO_DIRECTION_TTB_RTL
values come from an earlier interpretation of this enumeration as the writing direction of a block of text and are no longer used. SeePangoGravity
for how vertical text is handled in Pango.If you are interested in text direction, you should really use fribidi directly.
PangoDirection
is only retained because it is used in some public apis.Declaration
Swift
public typealias Direction = PangoDirection
-
PangoEllipsizeMode
describes 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
-
PangoGravity
represents 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_AUTO
only 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
-
PangoGravityHint
defines 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
PangoOverline
enumeration is used to specify whether text should be overlined, and if so, the type of line.Declaration
Swift
public typealias Overline = PangoOverline
-
PangoRenderPart
defines different items to render for such purposes as setting colors.Declaration
Swift
public typealias RenderPart = PangoRenderPart
-
The
PangoScript
enumeration 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
-
PangoTabAlign
specifies 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
PangoUnderline
enumeration 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
-
PangoWrapMode
describes how to wrap the lines of aPangoLayout
to 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