[name] Add hb_ot_name_get_utf()
This commit is contained in:
parent
c783d36324
commit
75cd8c86bd
|
@ -29,6 +29,7 @@
|
||||||
#include "hb-ot-name-table.hh"
|
#include "hb-ot-name-table.hh"
|
||||||
|
|
||||||
#include "hb-ot-face.hh"
|
#include "hb-ot-face.hh"
|
||||||
|
#include "hb-utf.hh"
|
||||||
|
|
||||||
|
|
||||||
static inline const OT::name_accelerator_t&
|
static inline const OT::name_accelerator_t&
|
||||||
|
@ -50,12 +51,13 @@ hb_ot_name_get_names (hb_face_t *face,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hb_bool_t
|
template <typename utf_t>
|
||||||
hb_ot_name_get_utf16 (hb_face_t *face,
|
static inline hb_bool_t
|
||||||
hb_name_id_t name_id,
|
hb_ot_name_get_utf (hb_face_t *face,
|
||||||
hb_language_t language,
|
hb_name_id_t name_id,
|
||||||
unsigned int *text_size /* IN/OUT */,
|
hb_language_t language,
|
||||||
uint16_t *text /* OUT */)
|
unsigned int *text_size /* IN/OUT */,
|
||||||
|
typename utf_t::codepoint_t *text /* OUT */)
|
||||||
{
|
{
|
||||||
const OT::name_accelerator_t &name = _get_name (face);
|
const OT::name_accelerator_t &name = _get_name (face);
|
||||||
unsigned int idx = 0; //XXX
|
unsigned int idx = 0; //XXX
|
||||||
|
@ -70,3 +72,13 @@ hb_ot_name_get_utf16 (hb_face_t *face,
|
||||||
/* TODO Fallback? */
|
/* TODO Fallback? */
|
||||||
return true; //XXX
|
return true; //XXX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hb_bool_t
|
||||||
|
hb_ot_name_get_utf16 (hb_face_t *face,
|
||||||
|
hb_name_id_t name_id,
|
||||||
|
hb_language_t language,
|
||||||
|
unsigned int *text_size /* IN/OUT */,
|
||||||
|
uint16_t *text /* OUT */)
|
||||||
|
{
|
||||||
|
return hb_ot_name_get_utf<hb_utf16_t> (face, name_id, language, text_size, text);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue