Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 677726b3 authored by Raph Levien's avatar Raph Levien
Browse files

Implement language-specific GSUB processing

This patch allows HarfBuzz to select language-specific features based
on the language. It is a fix for bug 7004056.

Change-Id: I63f01b9580250728b900f19f357cefdeb9d36c72
parent 80a058b3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -721,7 +721,8 @@ void TextLayoutShaper::computeRunValues(const SkPaint* paint, const UChar* conte
        
        hb_buffer_set_direction(mBuffer, isRTL ? HB_DIRECTION_RTL : HB_DIRECTION_LTR);
        hb_buffer_set_script(mBuffer, run.script);
        // Should set language here (for bug 7004056)
        SkString langString = paint->getPaintOptionsAndroid().getLanguage().getTag();
        hb_buffer_set_language(mBuffer, hb_language_from_string(langString.c_str(), -1));
        hb_buffer_add_utf16(mBuffer, contextChars, contextCount, start + run.pos, run.length);

        // Initialize Harfbuzz Shaper and get the base glyph count for offsetting the glyphIDs