bug 808288 - part 1 - leave missing glyphs blank in <canvas> text, rather than rendering arbitrary (incorrect) glyphs. r=bas

This commit is contained in:
Jonathan Kew 2012-11-03 23:01:32 +00:00
parent 12b4ff3df2
commit da23de4959

View File

@ -3038,6 +3038,11 @@ struct NS_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcesso
gfxTextRun::DetailedGlyph *detailedGlyphs =
mTextRun->GetDetailedGlyphs(i);
if (glyphs[i].IsMissing()) {
advanceSum += detailedGlyphs[0].mAdvance * devUnitsPerAppUnit;
continue;
}
for (uint32_t c = 0; c < glyphs[i].GetGlyphCount(); c++) {
newGlyph.mIndex = detailedGlyphs[c].mGlyphID;
if (mTextRun->IsRightToLeft()) {