|
Ultralight C API 2.0.0
|
Font file interface.
#include <Ultralight/CAPI/CAPI_FontFile.h>
The font file interface represents a font file: either on-disk path or in-memory file contents.
Functions | |
| ULFontFile | ulFontFileCreateFromFilePath (ULString file_path) |
| Create a font file from an on-disk file path. | |
| ULFontFile | ulFontFileCreateFromBuffer (ULBuffer buffer) |
| Create a font file from an in-memory buffer. | |
| ULFontFile | ulFontFileCreateFromFilePathWithFaceIndex (ULString file_path, int face_index) |
| Create a font file from an on-disk file path, naming the face within a font collection. | |
| ULFontFile | ulFontFileCreateFromBufferWithFaceIndex (ULBuffer buffer, int face_index) |
| Create a font file from an in-memory buffer, naming the face within a font collection. | |
| void | ulDestroyFontFile (ULFontFile font_file) |
| Destroy a font file previously created with ulFontFileCreateFromFilePath() or ulFontFileCreateFromBuffer(). | |
| bool | ulFontFileIsInMemory (ULFontFile font_file) |
| Whether or not this font file was created from an in-memory buffer. | |
| ULString | ulFontFileGetFilePath (ULFontFile font_file) |
| Get the file path for this font file (if created from a file path). | |
| ULBuffer | ulFontFileGetBuffer (ULFontFile font_file) |
| Get the in-memory buffer for this font file (if created from a buffer). | |
| int | ulFontFileGetFaceIndex (ULFontFile font_file) |
| Get the index of the face within a font collection, or -1 when the library chooses the face. | |
| unsigned int | ulFontFileGetHash (ULFontFile font_file) |
| Get the unique hash for this font file. | |
| void ulDestroyFontFile | ( | ULFontFile | font_file | ) |
Destroy a font file previously created with ulFontFileCreateFromFilePath() or ulFontFileCreateFromBuffer().
| font_file | The font file to destroy. |
| ULFontFile ulFontFileCreateFromBuffer | ( | ULBuffer | buffer | ) |
Create a font file from an in-memory buffer.
| buffer | A buffer containing the font file data (TTF/OTF). |
| ULFontFile ulFontFileCreateFromBufferWithFaceIndex | ( | ULBuffer | buffer, |
| int | face_index ) |
Create a font file from an in-memory buffer, naming the face within a font collection.
| buffer | A buffer containing the font file data (TTF/OTF, or a collection). |
| face_index | The index of the face to use when the data is a font collection. Pass -1 to let the library choose the face that best matches the requested weight and style. |
| ULFontFile ulFontFileCreateFromFilePath | ( | ULString | file_path | ) |
Create a font file from an on-disk file path.
| file_path | The path to the font file on disk. The file should already exist. |
| ULFontFile ulFontFileCreateFromFilePathWithFaceIndex | ( | ULString | file_path, |
| int | face_index ) |
Create a font file from an on-disk file path, naming the face within a font collection.
| file_path | The path to the font file on disk. The file should already exist. |
| face_index | The index of the face to use when the file is a font collection (eg, a .ttc holding several families). Pass -1 to let the library choose the face that best matches the requested weight and style. |
| ULBuffer ulFontFileGetBuffer | ( | ULFontFile | font_file | ) |
Get the in-memory buffer for this font file (if created from a buffer).
| int ulFontFileGetFaceIndex | ( | ULFontFile | font_file | ) |
Get the index of the face within a font collection, or -1 when the library chooses the face.
| ULString ulFontFileGetFilePath | ( | ULFontFile | font_file | ) |
Get the file path for this font file (if created from a file path).
| unsigned int ulFontFileGetHash | ( | ULFontFile | font_file | ) |
Get the unique hash for this font file.
| bool ulFontFileIsInMemory | ( | ULFontFile | font_file | ) |
Whether or not this font file was created from an in-memory buffer.