FontFile

    Holds font source data and prerendered glyph cache, imported from a dynamic or a bitmap font.

    FontFile.swift:30
    class FontFile

    FontFile contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback Fonts to use.

    Use FontVariation to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text.

    For more complex text processing, use FontVariation in conjunction with TextLine or TextParagraph.

    Supported font formats:

    • Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).

    • Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.

    • Monospace image font importer: All supported image formats.

    Superclasses

    • class Font

      Abstract base class for fonts and font variations.

    Citizens in SwiftGodot

    Conformances

    • protocol CustomStringConvertible

      A type with a customized textual representation.

    • protocol Equatable

      A type that can be compared for value equality.

    • protocol Hashable

      A type that can be hashed into a Hasher to produce an integer hash value.

    • protocol Identifiable<ID>

      A class of types whose instances hold the value of an entity with stable identity.

    • protocol VariantRepresentable

      Types that conform to VariantRepresentable can be stored directly in Variant with no conversion. These include all of the Variant types from Godot (for example GString, Rect, Plane), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.

    • protocol VariantStorable

      Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.

    Type members

    Instance members