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:
Jonathan Kew 2015-12-07 19:22:06 -05:00
Родитель 158db1411f
Коммит d7a175fd88
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -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;