harfbuzzjs
    Preparing search index...

    Class Face

    An object representing a HarfBuzz face. A face represents a single face in a binary font file and is the foundation for creating Font objects used in text shaping.

    Index

    Constructors

    • Parameters

      • blob: Blob

        A Blob containing font data.

      • index: number = 0

        The index of the font in the blob. (0 for most files, or a 0-indexed font number if the blob came from a font collection file.)

      Returns Face

    Properties

    ptr: number
    upem: number

    Methods

    • Return unicodes the face supports.

      Returns Uint32Array

      A Uint32Array of supported Unicode code points.

    • Return variation axis infos.

      Returns Record<string, AxisInfo>

      A dictionary mapping axis tags to {min, default, max} values.

    • Get the name IDs of the specified feature.

      Parameters

      • table: string

        The table to query, either "GSUB" or "GPOS".

      • featureIndex: number

        The index of the feature to query.

      Returns FeatureNameIds | null

      An object with name IDs, or null if not found.

    • Return all features in the specified face's GSUB table or GPOS table, underneath the specified script and language.

      Parameters

      • table: string

        The table to query, either "GSUB" or "GPOS".

      • scriptIndex: number

        The index of the script to query.

      • languageIndex: number

        The index of the language to query.

      Returns string[]

      An array of 4-character feature tag strings.

    • Get the name of the specified face.

      Parameters

      • nameId: number

        The ID of the name to get.

      • language: string

        The language of the name to get.

      Returns string

      The name string.

    • Return language tags in the given face's GSUB or GPOS table, underneath the specified script index.

      Parameters

      • table: string

        The table to query, either "GSUB" or "GPOS".

      • scriptIndex: number

        The index of the script to query.

      Returns string[]

      An array of 4-character language tag strings.

    • Return all features enumerated in the specified face's GSUB table or GPOS table.

      Parameters

      • table: string

        The table to query, either "GSUB" or "GPOS".

      Returns string[]

      An array of 4-character feature tag strings.

    • Return all scripts enumerated in the specified face's GSUB table or GPOS table.

      Parameters

      • table: string

        The table to query, either "GSUB" or "GPOS".

      Returns string[]

      An array of 4-character script tag strings.

    • Return the binary contents of an OpenType table.

      Parameters

      • table: string

        Table name

      Returns Uint8Array<ArrayBufferLike> | undefined

      A Uint8Array of the table data, or undefined if the table is not found.