Bug 1811471 - Merge Hiragana and Katakana scripts for text-shaping purposes, to allow kerning across both alphabets. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D167402
This commit is contained in:
Jonathan Kew 2023-01-20 18:26:29 +00:00
Родитель 3165b435c1
Коммит f17f8c8ec4
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -195,6 +195,13 @@ bool gfxScriptItemizer::Next(uint32_t& aRunStart, uint32_t& aRunLimit,
}
}
// Both Hiragana and Katakana are shaped as OpenType 'kana'. Merge them
// here to avoid script-run breaks and allow kerning to apply between the
// two alphabets.
if (sc == Script::HIRAGANA) {
sc = Script::KATAKANA;
}
if (SameScript(scriptCode, sc, ch)) {
if (scriptCode == Script::COMMON) {
// If we have not yet resolved a specific scriptCode for the run,