Index: Source/platform/graphics/GraphicsContext.cpp |
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp |
index 8c3c69cbb93109c57ab46372a8e8d86021a23223..f40f5c98a3d134f14998cef88eab492597ef62f7 100644 |
--- a/Source/platform/graphics/GraphicsContext.cpp |
+++ b/Source/platform/graphics/GraphicsContext.cpp |
@@ -1031,6 +1031,7 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run |
FloatPoint currPoint = point; |
BidiCharacterRun* bidiRun = bidiRuns.firstRun(); |
+ float width = 0; |
while (bidiRun) { |
TextRun subrun = run.subRun(bidiRun->start(), bidiRun->stop() - bidiRun->start()); |
bool isRTL = bidiRun->level() % 2; |
@@ -1039,12 +1040,12 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run |
TextRunPaintInfo subrunInfo(subrun); |
subrunInfo.bounds = runInfo.bounds; |
- font.drawText(this, subrunInfo, currPoint, customFontNotReadyAction); |
+ width = font.drawText(this, subrunInfo, currPoint, customFontNotReadyAction); |
+ |
bidiRun = bidiRun->next(); |
- // FIXME: Have Font::drawText return the width of what it drew so that we don't have to re-measure here. |
if (bidiRun) |
- currPoint.move(font.width(subrun), 0); |
+ currPoint.move(width, 0); |
} |
bidiRuns.deleteRuns(); |