mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
Add hb_ot_tag_to_script()
This commit is contained in:
1 parent
5035530904
commit
b490fa3433
2 files changed
+17
No files matched your search
@@ -134,6 +134,20 @@ hb_ot_tags_from_script (hb_script_t script)
|
||||
return ot_scripts[script];
|
||||
}
|
||||
|
||||
hb_script_t
|
||||
hb_ot_tag_to_script (hb_tag_t tag)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_LENGTH (ot_scripts); i++) {
|
||||
hb_tag_t *p = ot_scripts[i];
|
||||
while (*p)
|
||||
if (tag == *p)
|
||||
return i;
|
||||
}
|
||||
|
||||
return HB_SCRIPT_UNKNOWN;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
char language[6];
|
||||
|
||||
@@ -38,6 +38,9 @@ HB_BEGIN_DECLS
|
||||
const hb_tag_t *
|
||||
hb_ot_tags_from_script (hb_script_t script);
|
||||
|
||||
hb_script_t
|
||||
hb_ot_tag_to_script (hb_tag_t tag);
|
||||
|
||||
hb_tag_t
|
||||
hb_ot_tag_from_language (hb_language_t language);
|
||||
|
||||
|
||||
Reference in new issue
Block a user