bug 693610 - accumulate advanceSum so that we don't overlap successive glyph runs when drawing text to azure canvas. r=bas

This commit is contained in:
Jonathan Kew 2011-10-12 08:27:28 +01:00
Родитель d5f11d731f
Коммит cb20552e37
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -3066,6 +3066,8 @@ struct NS_STACK_CLASS nsCanvasBidiProcessorAzure : public nsBidiPresUtils::BidiP
Point baselineOrigin =
Point(point.x * devUnitsPerAppUnit, point.y * devUnitsPerAppUnit);
float advanceSum = 0;
for (PRUint32 c = 0; c < numRuns; c++) {
gfxFont *font = runs[c].mFont;
PRUint32 endRun = 0;
@ -3084,8 +3086,6 @@ struct NS_STACK_CLASS nsCanvasBidiProcessorAzure : public nsBidiPresUtils::BidiP
std::vector<Glyph> glyphBuf;
float advanceSum = 0;
for (PRUint32 i = runs[c].mCharacterOffset; i < endRun; i++) {
Glyph newGlyph;
if (glyphs[i].IsSimpleGlyph()) {