Convert to uppercase in hb_ot_tag_from_language()
This commit is contained in:
parent
6f729b45b0
commit
fde6f5bd68
|
@ -599,8 +599,10 @@ hb_ot_tag_from_language (hb_language_t language)
|
||||||
int i;
|
int i;
|
||||||
lang_str += 6;
|
lang_str += 6;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < 4 && lang_str[i]) {
|
#define IS_LETTER(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z'))
|
||||||
tag[i] = lang_str[i];
|
#define TO_UPPER(c) (((c) >= 'a' && (c) <= 'z') ? (c) + 'A' - 'a' : (c))
|
||||||
|
while (i < 4 && IS_LETTER (lang_str[i])) {
|
||||||
|
tag[i] = TO_UPPER (lang_str[i]);
|
||||||
}
|
}
|
||||||
while (i < 4)
|
while (i < 4)
|
||||||
tag[i] = ' ';
|
tag[i] = ' ';
|
||||||
|
|
Loading…
Reference in New Issue