зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1230497 - Ignore font fallback in Core Text shaping if it's just for a join-control character. r=jdaggett
This commit is contained in:
Родитель
158db1411f
Коммит
d7a175fd88
|
@ -184,11 +184,14 @@ gfxCoreTextShaper::ShapeText(gfxContext *aContext,
|
|||
const void* font2 = ::CFDictionaryGetValue(runAttr, kCTFontAttributeName);
|
||||
if (font1 != font2) {
|
||||
// ...except that if the fallback was only for a variation
|
||||
// selector that is otherwise unsupported, we just ignore it.
|
||||
if (range.length == 1 &&
|
||||
gfxFontUtils::IsVarSelector(aText[range.location -
|
||||
startOffset])) {
|
||||
continue;
|
||||
// selector or join control that is otherwise unsupported,
|
||||
// we just ignore it.
|
||||
if (range.length == 1) {
|
||||
char16_t ch = aText[range.location - startOffset];
|
||||
if (gfxFontUtils::IsJoinControl(ch) ||
|
||||
gfxFontUtils::IsVarSelector(ch)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
NS_WARNING("unexpected font fallback in Core Text");
|
||||
success = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче