/** * SECTION:hb-ot-name * @title: hb-ot-name * @short_description: OpenType font name information * @include: hb-ot.h * * Functions for fetching name strings from OpenType fonts.
**/
/** * hb_ot_name_list_names: * @face: font face. * @num_entries: (out) (optional): number of returned 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. * * Returns: (transfer none) (array length=num_entries): Array of available name entries. * Since: 2.1.0
**/ const hb_ot_name_entry_t *
hb_ot_name_list_names (hb_face_t *face, unsignedint *num_entries /* OUT */)
{ const OT::name_accelerator_t &name = *face->table.name; if (num_entries) *num_entries = name.names.length; return (const hb_ot_name_entry_t *) name.names;
}
if (text_size)
{ if (*text_size)
*text = 0;
*text_size = 0;
} return 0;
}
/** * hb_ot_name_get_utf8: * @face: font face. * @name_id: OpenType name identifier to fetch. * @language: language to fetch the name for. * @text_size: (inout) (optional): input size of @text buffer, and output size of * text written to buffer. * @text: (out caller-allocates) (array length=text_size): buffer to write fetched name into. * * 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. * * Returns: full length of the requested string, or 0 if not found. * Since: 2.1.0
**/ unsignedint
hb_ot_name_get_utf8 (hb_face_t *face,
hb_ot_name_id_t name_id,
hb_language_t language, unsignedint *text_size /* IN/OUT */, char *text /* OUT */)
{ return hb_ot_name_get_utf<hb_utf8_t> (face, name_id, language, text_size,
(hb_utf8_t::codepoint_t *) text);
}
/** * hb_ot_name_get_utf16: * @face: font face. * @name_id: OpenType name identifier to fetch. * @language: language to fetch the name for. * @text_size: (inout) (optional): input size of @text buffer, and output size of * text written to buffer. * @text: (out caller-allocates) (array length=text_size): buffer to write fetched name into. * * 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. * * Returns: full length of the requested string, or 0 if not found. * Since: 2.1.0
**/ unsignedint
hb_ot_name_get_utf16 (hb_face_t *face,
hb_ot_name_id_t name_id,
hb_language_t language, unsignedint *text_size /* IN/OUT */,
uint16_t *text /* OUT */)
{ return hb_ot_name_get_utf<hb_utf16_t> (face, name_id, language, text_size, text);
}
/** * hb_ot_name_get_utf32: * @face: font face. * @name_id: OpenType name identifier to fetch. * @language: language to fetch the name for. * @text_size: (inout) (optional): input size of @text buffer, and output size of * text written to buffer. * @text: (out caller-allocates) (array length=text_size): buffer to write fetched name into. * * 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. * * Returns: full length of the requested string, or 0 if not found. * Since: 2.1.0
**/ unsignedint
hb_ot_name_get_utf32 (hb_face_t *face,
hb_ot_name_id_t name_id,
hb_language_t language, unsignedint *text_size /* IN/OUT */,
uint32_t *text /* OUT */)
{ return hb_ot_name_get_utf<hb_utf32_t> (face, name_id, language, text_size, text);
}
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.