FontFamilyProtocol
public protocol FontFamilyProtocol : ObjectProtocol
A PangoFontFamily is 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 FontFamilyProtocol protocol exposes the methods and properties of an underlying PangoFontFamily instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see FontFamily.
Alternatively, use FontFamilyRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
PangoFontFamilyinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
font_family_ptrDefault implementationTyped pointer to the underlying
PangoFontFamilyinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
PangoFontFamilyinstance.Declaration
Swift
var font_family_ptr: UnsafeMutablePointer<PangoFontFamily>! { get } -
Required Initialiser for types conforming to
FontFamilyProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getFace(name:Extension method) Gets the
PangoFontFaceoffamilywith the given name.Declaration
Swift
@inlinable func getFace(name: UnsafePointer<CChar>? = nil) -> Pango.FontFaceRef! -
getName()Extension methodGets the name of the family.
The name is unique among all fonts for the font backend and can be used in a
PangoFontDescriptionto specify that a face from this family is desired.Declaration
Swift
@inlinable func getName() -> String! -
list(faces:Extension methodnFaces: ) Lists the different font faces that make up
family.The faces in a family share a common design, but differ in slant, weight, width and other aspects.
Note that the returned faces are not in any particular order, and multiple faces may have the same name or characteristics.
PangoFontFamilyalso implemented the [ifaceGio.ListModel] interface for enumerating faces.Declaration
Swift
@inlinable func list(faces: UnsafeMutablePointer<UnsafeMutablePointer<UnsafeMutablePointer<PangoFontFace>?>?>! = nil, nFaces: UnsafeMutablePointer<gint>!) -
isMonospaceExtension methodA monospace font is a font designed for text display where the the characters form a regular grid.
For Western languages this would mean that the advance width of all characters are the same, but this categorization also includes Asian fonts which include double-width characters: characters that occupy two grid cells.
g_unichar_iswide()returns a result that indicates whether a character is typically double-width in a monospace font.The best way to find out the grid-cell size is to call [method
Pango.FontMetrics.get_approximate_digit_width], since the results of [methodPango.FontMetrics.get_approximate_char_width] may be affected by double-width characters.Declaration
Swift
@inlinable var isMonospace: Bool { get } -
isVariableExtension methodA variable font is a font which has axes that can be modified to produce different faces.
Such axes are also known as variations; see [method
Pango.FontDescription.set_variations] for more information.Declaration
Swift
@inlinable var isVariable: Bool { get } -
nameExtension methodGets the name of the family.
The name is unique among all fonts for the font backend and can be used in a
PangoFontDescriptionto specify that a face from this family is desired.Declaration
Swift
@inlinable var name: String! { get } -
parentInstanceExtension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GObject { get }
View on GitHub
Install in Dash
FontFamilyProtocol Protocol Reference