[config] Add HB_NO_NAME
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
1fc0772117
commit
0e78d4ddae
|
@ -49,7 +49,7 @@
|
||||||
#define HB_NO_COLOR
|
#define HB_NO_COLOR
|
||||||
#define HB_NO_GETENV
|
#define HB_NO_GETENV
|
||||||
#define HB_NO_MATH
|
#define HB_NO_MATH
|
||||||
#define HB_NO_OT_NAME_LANGUAGE
|
#define HB_NO_NAME
|
||||||
#define HB_NO_OT_LAYOUT_UNUSED
|
#define HB_NO_OT_LAYOUT_UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -85,6 +85,10 @@
|
||||||
#define HB_NO_OT_SHAPE_FALLBACK
|
#define HB_NO_OT_SHAPE_FALLBACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HB_NO_NAME
|
||||||
|
#define HB_NO_OT_NAME_LANGUAGE
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HB_NO_OT_SHAPE_FALLBACK
|
#ifdef HB_NO_OT_SHAPE_FALLBACK
|
||||||
#define HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK
|
#define HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK
|
||||||
#define HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
|
#define HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
|
||||||
|
|
|
@ -58,6 +58,11 @@ const hb_ot_name_entry_t *
|
||||||
hb_ot_name_list_names (hb_face_t *face,
|
hb_ot_name_list_names (hb_face_t *face,
|
||||||
unsigned int *num_entries /* OUT */)
|
unsigned int *num_entries /* OUT */)
|
||||||
{
|
{
|
||||||
|
#ifdef HB_NO_NAME
|
||||||
|
if (num_entries)
|
||||||
|
*num_entries = 0;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
const OT::name_accelerator_t &name = *face->table.name;
|
const OT::name_accelerator_t &name = *face->table.name;
|
||||||
if (num_entries) *num_entries = name.names.length;
|
if (num_entries) *num_entries = name.names.length;
|
||||||
return (const hb_ot_name_entry_t *) name.names;
|
return (const hb_ot_name_entry_t *) name.names;
|
||||||
|
@ -167,6 +172,11 @@ hb_ot_name_get_utf8 (hb_face_t *face,
|
||||||
unsigned int *text_size /* IN/OUT */,
|
unsigned int *text_size /* IN/OUT */,
|
||||||
char *text /* OUT */)
|
char *text /* OUT */)
|
||||||
{
|
{
|
||||||
|
#ifdef HB_NO_NAME
|
||||||
|
if (text_size)
|
||||||
|
*text_size = 0;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
return hb_ot_name_get_utf<hb_utf8_t> (face, name_id, language, text_size,
|
return hb_ot_name_get_utf<hb_utf8_t> (face, name_id, language, text_size,
|
||||||
(hb_utf8_t::codepoint_t *) text);
|
(hb_utf8_t::codepoint_t *) text);
|
||||||
}
|
}
|
||||||
|
@ -194,6 +204,11 @@ hb_ot_name_get_utf16 (hb_face_t *face,
|
||||||
unsigned int *text_size /* IN/OUT */,
|
unsigned int *text_size /* IN/OUT */,
|
||||||
uint16_t *text /* OUT */)
|
uint16_t *text /* OUT */)
|
||||||
{
|
{
|
||||||
|
#ifdef HB_NO_NAME
|
||||||
|
if (text_size)
|
||||||
|
*text_size = 0;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
return hb_ot_name_get_utf<hb_utf16_t> (face, name_id, language, text_size, text);
|
return hb_ot_name_get_utf<hb_utf16_t> (face, name_id, language, text_size, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,5 +235,10 @@ hb_ot_name_get_utf32 (hb_face_t *face,
|
||||||
unsigned int *text_size /* IN/OUT */,
|
unsigned int *text_size /* IN/OUT */,
|
||||||
uint32_t *text /* OUT */)
|
uint32_t *text /* OUT */)
|
||||||
{
|
{
|
||||||
|
#ifdef HB_NO_NAME
|
||||||
|
if (text_size)
|
||||||
|
*text_size = 0;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
return hb_ot_name_get_utf<hb_utf32_t> (face, name_id, language, text_size, text);
|
return hb_ot_name_get_utf<hb_utf32_t> (face, name_id, language, text_size, text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue