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.

  • ptr

    Untyped pointer to the underlying PangoFontFamily instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • font_family_ptr Default implementation

    Typed pointer to the underlying PangoFontFamily instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the PangoFontFamily instance.

    Declaration

    Swift

    var font_family_ptr: UnsafeMutablePointer<PangoFontFamily>! { get }
  • Required Initialiser for types conforming to FontFamilyProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

FontFamily Class: FontFamilyProtocol extension (methods and fields)

  • getFace(name:) Extension method

    Gets the PangoFontFace of family with the given name.

    Declaration

    Swift

    @inlinable
    func getFace(name: UnsafePointer<CChar>? = nil) -> Pango.FontFaceRef!
  • getName() Extension method

    Gets the name of the family.

    The name is unique among all fonts for the font backend and can be used in a PangoFontDescription to specify that a face from this family is desired.

    Declaration

    Swift

    @inlinable
    func getName() -> String!
  • list(faces:nFaces:) Extension method

    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.

    PangoFontFamily also implemented the [ifaceGio.ListModel] interface for enumerating faces.

    Declaration

    Swift

    @inlinable
    func list(faces: UnsafeMutablePointer<UnsafeMutablePointer<UnsafeMutablePointer<PangoFontFace>?>?>! = nil, nFaces: UnsafeMutablePointer<gint>!)
  • isMonospace Extension method

    A 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 [methodPango.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 }
  • isVariable Extension method

    A variable font is a font which has axes that can be modified to produce different faces.

    Such axes are also known as variations; see [methodPango.FontDescription.set_variations] for more information.

    Declaration

    Swift

    @inlinable
    var isVariable: Bool { get }
  • name Extension method

    Gets the name of the family.

    The name is unique among all fonts for the font backend and can be used in a PangoFontDescription to specify that a face from this family is desired.

    Declaration

    Swift

    @inlinable
    var name: String! { get }
  • parentInstance Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentInstance: GObject { get }