faceCreate

fnharfbuzz.face.Face faceCreate(harfbuzz.blob.Blob blob, uint index)

Constructs a new face object from the specified blob and a face index into that blob.

The face index is used for blobs of file formats such as TTC and DFont that can contain more than one face. Face indices within such collections are zero-based.

<note>

Note

If the blob font format is not a collection, index

is ignored. Otherwise, only the lower 16-bits of index are used. The unmodified index can be accessed via [harfbuzz.global.faceGetIndex].</note>

<note>Note: The high 16-bits of index, if non-zero, are used by

[harfbuzz.global.fontCreate] to load named-instances in variable fonts. See [harfbuzz.global.fontCreate] for details.</note>

Parameters

blob#hb_blob_t to work upon
indexThe index of the face within blob

Returns

The new face object