Top |
const hb_ot_name_entry_t * | hb_ot_name_list_names () |
unsigned int | hb_ot_name_get_utf16 () |
unsigned int | hb_ot_name_get_utf32 () |
unsigned int | hb_ot_name_get_utf8 () |
const hb_ot_name_entry_t * hb_ot_name_list_names (hb_face_t *face
,unsigned int *num_entries
);
Enumerates all available name IDs and language combinations. Returned
array is owned by the face
and should not be modified. It can be
used as long as face
is alive.
Since: 2.1.0
unsigned int hb_ot_name_get_utf16 (hb_face_t *face
,hb_ot_name_id_t name_id
,hb_language_t language
,unsigned int *text_size
,uint16_t *text
);
Fetches a font name from the OpenType 'name' table.
If language
is HB_LANGUAGE_INVALID, English ("en") is assumed.
Returns string in UTF-16 encoding. A NUL terminator is always written
for convenience, and isn't included in the output text_size
.
face |
font face. |
|
name_id |
OpenType name identifier to fetch. |
|
language |
language to fetch the name for. |
|
text_size |
input size of |
[inout][optional] |
text |
buffer to write fetched name into. |
[out caller-allocates][array length=text_size] |
Since: 2.1.0
unsigned int hb_ot_name_get_utf32 (hb_face_t *face
,hb_ot_name_id_t name_id
,hb_language_t language
,unsigned int *text_size
,uint32_t *text
);
Fetches a font name from the OpenType 'name' table.
If language
is HB_LANGUAGE_INVALID, English ("en") is assumed.
Returns string in UTF-32 encoding. A NUL terminator is always written
for convenience, and isn't included in the output text_size
.
face |
font face. |
|
name_id |
OpenType name identifier to fetch. |
|
language |
language to fetch the name for. |
|
text_size |
input size of |
[inout][optional] |
text |
buffer to write fetched name into. |
[out caller-allocates][array length=text_size] |
Since: 2.1.0
unsigned int hb_ot_name_get_utf8 (hb_face_t *face
,hb_ot_name_id_t name_id
,hb_language_t language
,unsigned int *text_size
,char *text
);
Fetches a font name from the OpenType 'name' table.
If language
is HB_LANGUAGE_INVALID, English ("en") is assumed.
Returns string in UTF-8 encoding. A NUL terminator is always written
for convenience, and isn't included in the output text_size
.
face |
font face. |
|
name_id |
OpenType name identifier to fetch. |
|
language |
language to fetch the name for. |
|
text_size |
input size of |
[inout][optional] |
text |
buffer to write fetched name into. |
[out caller-allocates][array length=text_size] |
Since: 2.1.0
typedef unsigned int hb_ot_name_id_t;
An integral type representing an OpenType 'name' table name identifier. There are predefined name IDs, as well as name IDs return from other API. These can be used to fetch name strings from a font face.
For more information on these fields, see the OpenType spec.
Since: 2.0.0
typedef struct { hb_ot_name_id_t name_id; hb_language_t language; } hb_ot_name_entry_t;
Structure representing a name ID in a particular language.
Since: 2.1.0