Function

HarfBuzz-0.0HarfBuzzft_face_create_from_file_or_failSince 10.1.0

  • Creates an HarfBuzz.face_t face object from the specified font file and face index.

    This is similar in functionality to hb_face_create_from_file_or_fail(), but uses the FreeType library for loading the font file. This can be useful, for example, to load WOFF and WOFF2 font data.

    Parameters

    • file_name: string

      A font filename

    • index: number

      The index of the face within the file

    Returns face_t

    The new face object, or NULL if no face is found at the specified index or the file cannot be read.

    10.1.0