diff --git a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp index f943d9b249f0..58c26e54e60a 100644 --- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp @@ -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 glyphBuf; - float advanceSum = 0; - for (PRUint32 i = runs[c].mCharacterOffset; i < endRun; i++) { Glyph newGlyph; if (glyphs[i].IsSimpleGlyph()) {