summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-11-05 14:33:41 -0500
committerBehdad Esfahbod <behdad@behdad.org>2018-11-05 14:33:41 -0500
commit252632c477b963f305116d69fcafacd8bf7b97bf (patch)
treeca12ce50aa4e2a6b67d969dffc1f9a109244c667
parentbb380ec18394b2c581b672ecbf98991e14897f2e (diff)
[uniscribe] Fix use of deprecated API
-rw-r--r--src/hb-uniscribe.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 26b99ed1..e77825b3 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -853,7 +853,13 @@ retry:
#undef MAX_ITEMS
- OPENTYPE_TAG language_tag = hb_uint32_swap (hb_ot_tag_from_language (buffer->props.language));
+ hb_tag_t lang_tag;
+ unsigned int lang_count = 1;
+ hb_ot_tags_from_script_and_language (buffer->props.script,
+ buffer->props.language,
+ nullptr, nullptr,
+ &lang_count, &lang_tag);
+ OPENTYPE_TAG language_tag = hb_uint32_swap (lang_count ? lang_tag : HB_TAG_NONE);
hb_vector_t<TEXTRANGE_PROPERTIES*> range_properties;
hb_vector_t<int> range_char_counts;