зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1108616 - part 3 - Only do language-specific shaping when the language was explicitly tagged. r=jdaggett
This commit is contained in:
Родитель
a896eab424
Коммит
3478d8e504
|
@ -2896,7 +2896,8 @@ gfxFont::InitFakeSmallCapsRun(gfxContext *aContext,
|
|||
} else if (ch != ToLowerCase(ch)) {
|
||||
// ch is upper case
|
||||
chAction = (aSyntheticUpper ? kUppercaseReduce : kNoChange);
|
||||
if (mStyle.language == nsGkAtoms::el) {
|
||||
if (mStyle.explicitLanguage &&
|
||||
mStyle.language == nsGkAtoms::el) {
|
||||
// In Greek, check for characters that will be modified by
|
||||
// the GreekUpperCase mapping - this catches accented
|
||||
// capitals where the accent is to be removed (bug 307039).
|
||||
|
@ -2948,7 +2949,8 @@ gfxFont::InitFakeSmallCapsRun(gfxContext *aContext,
|
|||
TransformString(origString,
|
||||
convertedString,
|
||||
true,
|
||||
mStyle.language,
|
||||
mStyle.explicitLanguage
|
||||
? mStyle.language : nullptr,
|
||||
charsToMergeArray,
|
||||
deletedCharsArray);
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ gfxGraphiteShaper::ShapeText(gfxContext *aContext,
|
|||
grLang = MakeGraphiteLangTag(style->languageOverride);
|
||||
} else if (entry->mLanguageOverride) {
|
||||
grLang = MakeGraphiteLangTag(entry->mLanguageOverride);
|
||||
} else {
|
||||
} else if (style->explicitLanguage) {
|
||||
nsAutoCString langString;
|
||||
style->language->ToUTF8String(langString);
|
||||
grLang = GetGraphiteTagForLang(langString);
|
||||
|
|
|
@ -1228,11 +1228,13 @@ gfxHarfBuzzShaper::ShapeText(gfxContext *aContext,
|
|||
language = hb_ot_tag_to_language(style->languageOverride);
|
||||
} else if (entry->mLanguageOverride) {
|
||||
language = hb_ot_tag_to_language(entry->mLanguageOverride);
|
||||
} else {
|
||||
} else if (style->explicitLanguage) {
|
||||
nsCString langString;
|
||||
style->language->ToUTF8String(langString);
|
||||
language =
|
||||
hb_language_from_string(langString.get(), langString.Length());
|
||||
} else {
|
||||
language = hb_ot_tag_to_language(HB_OT_TAG_DEFAULT_LANGUAGE);
|
||||
}
|
||||
hb_buffer_set_language(buffer, language);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче