Add hb_script_from_string()
This commit is contained in:
parent
8f0d7e0c3f
commit
0e8d35c093
|
@ -492,6 +492,12 @@ hb_script_from_iso15924_tag (hb_tag_t tag)
|
|||
return HB_SCRIPT_UNKNOWN;
|
||||
}
|
||||
|
||||
hb_script_t
|
||||
hb_script_from_string (const char *s)
|
||||
{
|
||||
return hb_script_from_iso15924_tag (hb_tag_from_string (s));
|
||||
}
|
||||
|
||||
hb_tag_t
|
||||
hb_script_to_iso15924_tag (hb_script_t script)
|
||||
{
|
||||
|
|
|
@ -295,6 +295,10 @@ hb_unicode_get_eastasian_width (hb_unicode_funcs_t *ufuncs,
|
|||
hb_script_t
|
||||
hb_script_from_iso15924_tag (hb_tag_t tag);
|
||||
|
||||
/* suger for tag_from_string() then script_from_iso15924_tag */
|
||||
hb_script_t
|
||||
hb_script_from_string (const char *s);
|
||||
|
||||
hb_tag_t
|
||||
hb_script_to_iso15924_tag (hb_script_t script);
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ _hb_cr_text_glyphs (cairo_t *cr,
|
|||
|
||||
hb_buffer_add_utf8 (hb_buffer, text, len, 0, len);
|
||||
if (script)
|
||||
hb_buffer_set_script (hb_buffer, hb_script_from_iso15924_tag (hb_tag_from_string (script)));
|
||||
hb_buffer_set_script (hb_buffer, hb_script_from_string (script));
|
||||
else
|
||||
hb_buffer_set_script (hb_buffer, HB_SCRIPT_INVALID);
|
||||
hb_buffer_set_direction (hb_buffer, HB_DIRECTION_INVALID);
|
||||
|
|
Loading…
Reference in New Issue