Bug 372629. Try to fix Windows reftests by special-casing ZWSP to never display a missing-glyph box.

This commit is contained in:
roc+@cs.cmu.edu 2007-03-26 21:34:49 -07:00
Родитель 15eac4df7c
Коммит 284e1a994f
1 изменённых файлов: 10 добавлений и 1 удалений

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

@ -869,6 +869,8 @@ static const char *sCJKLangGroup[] = {
#define STATIC_STRING_LENGTH 100
#define UNICODE_ZWSP 0x200B
/**
* XXX We could use a bunch of nsAutoTArrays to avoid memory allocation
* for non-huge strings.
@ -1170,7 +1172,14 @@ public:
PRInt32 advance = mAdvances[k]*appUnitsPerDevUnit;
WORD glyph = mGlyphs[k];
if (missing) {
aRun->SetMissingGlyph(runOffset, mString[offset]);
// Special-case ZWSP so that it always "works" even if the
// font doesn't have the glyph. Don't draw a hexbox and
// don't give it width.
if (mString[offset] == UNICODE_ZWSP) {
aRun->SetCharacterGlyph(runOffset, g.IsMissing());
} else {
aRun->SetMissingGlyph(runOffset, mString[offset]);
}
} else if (glyphCount == 1 && advance >= 0 &&
mOffsets[k].dv == 0 && mOffsets[k].du == 0 &&
gfxTextRun::CompressedGlyph::IsSimpleAdvance(advance) &&