From 20c9b985f1727402dc96c2e9d8a4a2f6d8a121db Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 1 Mar 2012 10:12:25 +1100 Subject: Bug #3494492. Change aveCharWidth in FontMeasurements to actually store fractional width. This change complements change set 3994. Make WidthText() and AverageCharWidth() actually return fractional widths under Direct2D. From Marko Njezic. --- src/LineMarker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/LineMarker.cxx') diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 267ea18f4..99e83265e 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -338,7 +338,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac } else if (markType >= SC_MARK_CHARACTER) { char character[1]; character[0] = static_cast(markType - SC_MARK_CHARACTER); - int width = surface->WidthText(fontForCharacter, character, 1); + XYPOSITION width = surface->WidthText(fontForCharacter, character, 1); rc.left += (rc.Width() - width) / 2; rc.right = rc.left + width; surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2, -- cgit v1.2.3