Index: Source/platform/fonts/shaping/HarfBuzzShaper.cpp |
diff --git a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp |
index 8115d36eb2faa0b84ab373fa9885a0c9f76eb034..e44d55753560c693ca44de87c11439bebc244319 100644 |
--- a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp |
+++ b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp |
@@ -818,6 +818,7 @@ bool HarfBuzzShaper::shapeHarfBuzzRuns() |
const FontDescription& fontDescription = m_font->fontDescription(); |
const String& localeString = fontDescription.locale(); |
CString locale = localeString.latin1(); |
+ const hb_language_t language = hb_language_from_string(locale.data(), locale.length()); |
HarfBuzzRun* previousRun = nullptr; |
for (unsigned i = 0; i < m_harfBuzzRuns.size(); ++i) { |
@@ -830,7 +831,7 @@ bool HarfBuzzShaper::shapeHarfBuzzRuns() |
if (!face) |
return false; |
- hb_buffer_set_language(harfBuzzBuffer.get(), hb_language_from_string(locale.data(), locale.length())); |
+ hb_buffer_set_language(harfBuzzBuffer.get(), language); |
hb_buffer_set_script(harfBuzzBuffer.get(), currentRun->script()); |
hb_buffer_set_direction(harfBuzzBuffer.get(), currentRun->direction()); |