[name] Return full string length from API

This commit is contained in:
Behdad Esfahbod 2018-10-16 19:55:17 -07:00
parent 8d304ef7f9
commit b4d4d1ea78
2 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ hb_ot_name_get_names (hb_face_t *face,
template <typename utf_t> template <typename utf_t>
static inline hb_bool_t static inline unsigned int
hb_ot_name_get_utf (hb_face_t *face, hb_ot_name_get_utf (hb_face_t *face,
hb_name_id_t name_id, hb_name_id_t name_id,
hb_language_t language, hb_language_t language,
@ -71,10 +71,10 @@ hb_ot_name_get_utf (hb_face_t *face,
if (text_size) if (text_size)
*text_size = bytes.len / 2; //TODO *text_size = bytes.len / 2; //TODO
/* TODO Fallback? */ /* TODO Fallback? */
return true; //XXX return *text_size; //XXX
} }
hb_bool_t unsigned int
hb_ot_name_get_utf16 (hb_face_t *face, hb_ot_name_get_utf16 (hb_face_t *face,
hb_name_id_t name_id, hb_name_id_t name_id,
hb_language_t language, hb_language_t language,

View File

@ -50,7 +50,7 @@ typedef unsigned int hb_name_id_t;
#if 0 #if 0
HB_EXTERN hb_bool_t HB_EXTERN unsigned int
Xhb_ot_name_get_utf8 (hb_face_t *face, Xhb_ot_name_get_utf8 (hb_face_t *face,
hb_name_id_t name_id, hb_name_id_t name_id,
hb_language_t language, hb_language_t language,
@ -58,7 +58,7 @@ Xhb_ot_name_get_utf8 (hb_face_t *face,
char *text /* OUT */); char *text /* OUT */);
#endif #endif
HB_EXTERN hb_bool_t HB_EXTERN unsigned int
hb_ot_name_get_utf16 (hb_face_t *face, hb_ot_name_get_utf16 (hb_face_t *face,
hb_name_id_t name_id, hb_name_id_t name_id,
hb_language_t language, hb_language_t language,
@ -66,7 +66,7 @@ hb_ot_name_get_utf16 (hb_face_t *face,
uint16_t *text /* OUT */); uint16_t *text /* OUT */);
#if 0 #if 0
HB_EXTERN hb_bool_t HB_EXTERN unsigned int
Xhb_ot_name_get_utf32 (hb_face_t *face, Xhb_ot_name_get_utf32 (hb_face_t *face,
hb_name_id_t name_id, hb_name_id_t name_id,
hb_language_t language, hb_language_t language,