diff --git a/gfx/thebes/src/gfxWindowsFonts.cpp b/gfx/thebes/src/gfxWindowsFonts.cpp index 7559967bba9a..b112b23b3596 100644 --- a/gfx/thebes/src/gfxWindowsFonts.cpp +++ b/gfx/thebes/src/gfxWindowsFonts.cpp @@ -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) &&