32 #if !defined(HB_NO_SETLOCALE) && (!defined(HAVE_NEWLOCALE) || !defined(HAVE_USELOCALE))
33 #define HB_NO_SETLOCALE 1
36 #ifndef HB_NO_SETLOCALE
44 #define hb_locale_t _locale_t
46 #define hb_locale_t locale_t
48 #define hb_setlocale setlocale
49 #define hb_uselocale uselocale
53 #define hb_locale_t void *
54 #define hb_setlocale(Category, Locale) "C"
55 #define hb_uselocale(Locale) ((hb_locale_t) 0)
78 u.opts.initialized =
true;
80 const char *
c = getenv (
"HB_OPTIONS");
85 const char *
p = strchr (
c,
':');
89 #define OPTION(name, symbol) \
90 if (0 == strncmp (c, name, p - c) && strlen (name) == static_cast<size_t>(p - c)) do { u.opts.symbol = true; } while (0)
92 OPTION (
"uniscribe-bug-compatible", uniscribe_bug_compatible);
133 for (
i = 0;
i < (unsigned)
len &&
str[
i];
i++)
154 buf[0] = (char) (uint8_t) (
tag >> 24);
155 buf[1] = (char) (uint8_t) (
tag >> 16);
156 buf[2] = (char) (uint8_t) (
tag >> 8);
157 buf[3] = (char) (uint8_t) (
tag >> 0);
195 char c = TOLOWER (
str[0]);
230 static const char canon_map[256] = {
231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
'-', 0, 0,
234 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9', 0, 0, 0, 0, 0, 0,
235 0,
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
236 'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z', 0, 0, 0, 0,
'-',
237 0,
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
238 'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z', 0, 0, 0, 0, 0
245 const unsigned char *
p1 = (
const unsigned char *)
v1;
246 const unsigned char *
p2 = (
const unsigned char *)
v2;
248 while (*
p1 && *
p1 == canon_map[*
p2]) {
253 return *
p1 == canon_map[*
p2];
258 lang_hash (
const void *
key)
260 const unsigned char *
p =
key;
262 while (canon_map[*
p])
264 h = (
h << 5) -
h + canon_map[*
p];
279 {
return lang_equal (
lang,
s); }
288 memcpy((
unsigned char *)
lang,
s,
len);
289 for (
unsigned char *
p = (
unsigned char *)
lang; *
p;
p++)
309 if (
unlikely (!langs.cmpexch (first_lang,
nullptr)))
321 lang_find_or_insert (
const char *
key)
334 lang->next = first_lang;
381 len = hb_min (
len, (
int)
sizeof (strbuf) - 1);
382 memcpy (strbuf,
str,
len);
384 item = lang_find_or_insert (strbuf);
387 item = lang_find_or_insert (
str);
465 tag = (
tag & 0xDFDFDFDFu) | 0x00202020u;
490 if (((uint32_t)
tag & 0xE0E0E0E0u) == 0x40606060u)
714 parse_space (
const char **pp,
const char *
end)
716 while (*pp <
end && ISSPACE (**pp))
722 parse_char (
const char **pp,
const char *
end,
char c)
724 parse_space (pp,
end);
726 if (*pp ==
end || **pp !=
c)
734 parse_uint (
const char **pp,
const char *
end,
unsigned int *pv)
746 parse_uint32 (
const char **pp,
const char *
end, uint32_t *pv)
758 parse_bool (
const char **pp,
const char *
end, uint32_t *pv)
760 parse_space (pp,
end);
768 && TOLOWER (
p[0]) ==
'o'
769 && TOLOWER (
p[1]) ==
'n')
771 else if (*pp -
p == 3
772 && TOLOWER (
p[0]) ==
'o'
773 && TOLOWER (
p[1]) ==
'f'
774 && TOLOWER (
p[2]) ==
'f')
785 parse_feature_value_prefix (
const char **pp,
const char *
end,
hb_feature_t *feature)
787 if (parse_char (pp,
end,
'-'))
790 parse_char (pp,
end,
'+');
800 parse_space (pp,
end);
804 if (*pp <
end && (**pp ==
'\'' || **pp ==
'"'))
811 while (*pp <
end && (
ISALNUM(**pp) || **pp ==
'_'))
814 if (
p == *pp || *pp -
p > 4)
825 if (*pp ==
end || **pp != quote)
834 parse_feature_indices (
const char **pp,
const char *
end,
hb_feature_t *feature)
836 parse_space (pp,
end);
843 if (!parse_char (pp,
end,
'['))
846 has_start = parse_uint (pp,
end, &feature->
start);
848 if (parse_char (pp,
end,
':') || parse_char (pp,
end,
';')) {
849 parse_uint (pp,
end, &feature->
end);
855 return parse_char (pp,
end,
']');
859 parse_feature_value_postfix (
const char **pp,
const char *
end,
hb_feature_t *feature)
861 bool had_equal = parse_char (pp,
end,
'=');
862 bool had_value = parse_uint32 (pp,
end, &feature->
value) ||
863 parse_bool (pp,
end, &feature->
value);
867 return !had_equal || had_value;
871 parse_one_feature (
const char **pp,
const char *
end,
hb_feature_t *feature)
873 return parse_feature_value_prefix (pp,
end, feature) &&
874 parse_tag (pp,
end, &feature->
tag) &&
875 parse_feature_indices (pp,
end, feature) &&
876 parse_feature_value_postfix (pp,
end, feature) &&
877 parse_space (pp,
end) &&
947 memset (feature, 0,
sizeof (*feature));
970 unsigned int len = 0;
971 if (feature->
value == 0)
975 while (
len &&
s[
len - 1] ==
' ')
982 if (feature->
end != feature->
start + 1) {
989 if (feature->
value > 1)
1003 parse_variation_value (
const char **pp,
const char *
end,
hb_variation_t *variation)
1005 parse_char (pp,
end,
'=');
1014 parse_one_variation (
const char **pp,
const char *
end,
hb_variation_t *variation)
1016 return parse_tag (pp,
end, &variation->
tag) &&
1017 parse_variation_value (pp,
end, variation) &&
1018 parse_space (pp,
end) &&
1059 memset (variation, 0,
sizeof (*variation));
1063 #ifndef HB_NO_SETLOCALE
1065 static inline void free_static_C_locale ();
1067 static struct hb_C_locale_lazy_loader_t :
hb_lazy_loader_t<hb_remove_pointer<hb_locale_t>,
1068 hb_C_locale_lazy_loader_t>
1091 void free_static_C_locale ()
1093 static_C_locale.free_instance ();
1099 return static_C_locale.get_unconst ();
1123 unsigned int len = 0;
1126 while (
len &&
s[
len - 1] ==
' ')
1209 #ifdef HB_NO_VISIBILITY
1210 #undef HB_NO_VISIBILITY
1212 #define HB_NO_VISIBILITY 1
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer xE1 xA7 xA1 xE1 xA7 xAA xE0 xBB x90 Latin Subscript xE2 x82 x92 xE2 x82 x80 xEA x93 xB3 xF0 x96 xB9 xA1 xF0 x96 xB9 x9B xF0 x96 xB9 xAF xE1 x80 x9D xE1 x80 x84 xE1 x80 x82 no script
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer HB_SCRIPT_INVALID
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC HB_SCRIPT_GEORGIAN
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F HB_SCRIPT_CYRILLIC
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer xE1 xA7 xA1 xE1 xA7 xAA xE0 xBB x90 Latin Subscript xE2 x82 x92 xE2 x82 x80 xEA x93 xB3 xF0 x96 xB9 xA1 xF0 x96 xB9 x9B xF0 x96 xB9 xAF xE1 x80 x9D xE1 x80 x84 xE1 x80 x82 no Old HB_SCRIPT_OLD_TURKIC
xD9 x84 xD8 xAD xD9 x80 HB_SCRIPT_AVESTAN
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 HB_SCRIPT_COPTIC
hb_tag_t hb_script_to_iso15924_tag(hb_script_t script)
void hb_tag_to_string(hb_tag_t tag, char *buf)
hb_script_t hb_script_from_string(const char *str, int len)
void hb_variation_to_string(hb_variation_t *variation, char *buf, unsigned int size)
hb_direction_t hb_direction_from_string(const char *str, int len)
hb_bool_t hb_feature_from_string(const char *str, int len, hb_feature_t *feature)
hb_atomic_int_t _hb_options
uint8_t() hb_color_get_red(hb_color_t color)
void hb_feature_to_string(hb_feature_t *feature, char *buf, unsigned int size)
const char direction_strings[][4]
hb_language_t hb_language_from_string(const char *str, int len)
const char * hb_language_to_string(hb_language_t language)
uint8_t() hb_color_get_blue(hb_color_t color)
uint8_t() hb_color_get_alpha(hb_color_t color)
#define hb_uselocale(Locale)
hb_tag_t hb_tag_from_string(const char *str, int len)
uint8_t() hb_color_get_green(hb_color_t color)
void hb_version(unsigned int *major, unsigned int *minor, unsigned int *micro)
#define hb_setlocale(Category, Locale)
const char * hb_version_string()
hb_bool_t hb_version_atleast(unsigned int major, unsigned int minor, unsigned int micro)
#define OPTION(name, symbol)
hb_language_t hb_language_get_default()
hb_direction_t hb_script_get_horizontal_direction(hb_script_t script)
const char * hb_direction_to_string(hb_direction_t direction)
hb_script_t hb_script_from_iso15924_tag(hb_tag_t tag)
hb_bool_t hb_variation_from_string(const char *str, int len, hb_variation_t *variation)
void const void *obj HB_UNUSED
bool hb_parse_int(const char **pp, const char *end, int *pv, bool whole_buffer)
bool hb_parse_double(const char **pp, const char *end, double *pv, bool whole_buffer)
PCRE2_SIZE PRIV() strlen(PCRE2_SPTR str)
GLint GLfloat GLfloat GLfloat v2
GLsizei const GLfloat * v
[13]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLfloat GLfloat GLfloat GLfloat h
#define HB_LANGUAGE_INVALID
const struct hb_language_impl_t * hb_language_t
HB_BEGIN_DECLS typedef int hb_bool_t
#define HB_TAG(c1, c2, c3, c4)
@ HB_SCRIPT_MEROITIC_CURSIVE
@ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN
@ HB_SCRIPT_OLD_NORTH_ARABIAN
@ HB_SCRIPT_MENDE_KIKAKUI
@ HB_SCRIPT_IMPERIAL_ARAMAIC
@ HB_SCRIPT_MEROITIC_HIEROGLYPHS
@ HB_SCRIPT_PSALTER_PAHLAVI
@ HB_SCRIPT_OLD_HUNGARIAN
@ HB_SCRIPT_OLD_SOUTH_ARABIAN
@ HB_SCRIPT_HANIFI_ROHINGYA
@ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI
#define HB_FEATURE_GLOBAL_END
#define HB_FEATURE_GLOBAL_START
#define HB_VERSION_ATLEAST(major, minor, micro)
#define HB_VERSION_STRING
bool cmpexch(const T *old, T *new_) const
struct hb_language_item_t * next
hb_language_item_t & operator=(const char *s)
bool operator==(const char *s) const
static void destroy(Stored *p)
static const Stored * get_null()
XmlOutput::xml_output tag(const QString &name)