Fix rendering of subpixel positioned native text
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tue, 5 Mar 2013 13:21:04 +0000 (14:21 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 7 Mar 2013 10:58:50 +0000 (11:58 +0100)
commite70f21152aa8b2459c903db0cf4ca30bde5bd178
tree5ffcba97224577f071eb136999e55abdadc49d38
parentb659615a088dfce560ccf7f1933b0e02915c2eda
Fix rendering of subpixel positioned native text

To get accurate sampling of the native text rendering, we use
nearest filtering. This, however, does not work well when we're
sampling in the middle of pixels and the result is that with
text which is positioned at 0.5 offsets, we will sample the
wrong pixels and get artifacts from this. The main use case
for native rendered text is unrotated and unscaled text,
so we fix this use case by pixel-aligning the translation
factor.

Done-with: Samuel

Task-number: QTBUG-30022
Change-Id: I6911196d6ff491dca3b329c42da1c6dd7263cff0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
src/quick/scenegraph/coreapi/qsgmaterial.cpp
src/quick/scenegraph/coreapi/qsgmaterial.h
src/quick/scenegraph/qsgdefaultglyphnode_p.cpp