[config] HB_NO_OT_NAME_LANGUAGE AAT

This commit is contained in:
Behdad Esfahbod 2019-05-11 01:24:23 -07:00
parent 4381bb2de7
commit 1fc0772117
3 changed files with 8 additions and 3 deletions

View File

@ -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_NAME_TABLE_AAT #define HB_NO_OT_NAME_LANGUAGE
#define HB_NO_OT_LAYOUT_UNUSED #define HB_NO_OT_LAYOUT_UNUSED
#endif #endif
@ -67,7 +67,7 @@
#endif #endif
#ifdef HB_NO_AAT #ifdef HB_NO_AAT
#define HB_NO_NAME_TABLE_AAT #define HB_NO_OT_NAME_LANGUAGE_AAT
#define HB_NO_SHAPE_AAT #define HB_NO_SHAPE_AAT
#endif #endif

View File

@ -430,6 +430,9 @@ _hb_ot_name_language_for (unsigned int code,
const hb_ot_language_map_t *array, const hb_ot_language_map_t *array,
unsigned int len) unsigned int len)
{ {
#ifdef HB_NO_OT_NAME_LANGUAGE
return HB_LANGUAGE_INVALID;
#endif
const hb_ot_language_map_t *entry = (const hb_ot_language_map_t *) const hb_ot_language_map_t *entry = (const hb_ot_language_map_t *)
hb_bsearch (&code, hb_bsearch (&code,
array, array,

View File

@ -51,6 +51,7 @@ struct NameRecord
{ {
hb_language_t language (hb_face_t *face) const hb_language_t language (hb_face_t *face) const
{ {
#ifndef HB_NO_OT_NAME_LANGUAGE
unsigned int p = platformID; unsigned int p = platformID;
unsigned int l = languageID; unsigned int l = languageID;
@ -60,11 +61,12 @@ struct NameRecord
if (p == 1) if (p == 1)
return _hb_ot_name_language_for_mac_code (l); return _hb_ot_name_language_for_mac_code (l);
#ifndef HB_NO_NAME_TABLE_AAT #ifndef HB_NO_OT_NAME_LANGUAGE_AAT
if (p == 0) if (p == 0)
return _hb_aat_language_get (face, l); return _hb_aat_language_get (face, l);
#endif #endif
#endif
return HB_LANGUAGE_INVALID; return HB_LANGUAGE_INVALID;
} }