Fix FreeType glyph caching for high resolution
authorJiang Jiang <jiang.jiang@nokia.com>
Wed, 16 May 2012 16:14:45 +0000 (18:14 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 18 May 2012 08:39:49 +0000 (10:39 +0200)
commita56ee60791538e5442b3d97b75270b25dc4986db
tree0f16f04138787d0f151e92ffa223bc53d0829764
parenta605d25ae249fc416f321ec1264b7aa33e15c46f
Fix FreeType glyph caching for high resolution

For high resolution or extremely large font sizes, the advance
cached here is likely to overflow, since FreeType returns 26.6
fixed point value and we only take signed char here for advance.

In those cases we should skip caching because there won't be
that many big glyphs after all.

Also move the metrics caching block a bit down to take glyph
embolden and oblique into account.

As a result we also don't need to increase the linearAdvance
size because any linearAdvance less than 128 should fit in
the old 10.6 fixed format.

Change-Id: Ic4920ada49954ce1e0a8673c9f33f30e385e3046
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/gui/text/qfontengine_ft.cpp
src/gui/text/qfontengine_ft_p.h