From 4e5544b2607e1e981eeb1df7e565d8ff35b66985 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Tue, 11 Jan 2011 13:14:23 +0200 Subject: OpenVG paint engine doesn't draw glyphs well to non-integer offsets. Solution is to round adjustment offsets to integer values to prevent blurry text. Task-number: QTBUG-16240 Reviewed-by: Alessandro Portale (cherry picked from commit e0ed2387bc818f11b16460b0150d4ea75bcf37d6) --- src/openvg/qpaintengine_vg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index d2304e7..09cbc36 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3539,8 +3539,8 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem) QVarLengthArray adjustments_x(numGlyphs); QVarLengthArray adjustments_y(numGlyphs); for (int i = 1; i < numGlyphs; ++i) { - adjustments_x[i-1] = (positions[i].x - positions[i-1].x).toReal(); - adjustments_y[i-1] = (positions[i].y - positions[i-1].y).toReal(); + adjustments_x[i-1] = (positions[i].x - positions[i-1].x).round().toReal(); + adjustments_y[i-1] = (positions[i].y - positions[i-1].y).round().toReal(); } // Set the glyph drawing origin. -- cgit v0.12