Do not use charset loaded by fontconfig
authorJiang Jiang <jiang.jiang@nokia.com>
Wed, 9 May 2012 14:38:54 +0000 (16:38 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 10 May 2012 23:42:02 +0000 (01:42 +0200)
commit2b39093d2f811a1d6593fcbbfdc7ead993d68f59
tree4c7159f2c59c8ea6303ff794668b874429298bf6
parent954c2f4cf1466ac7a8d9be2ea20dc0e4aeb53c7a
Do not use charset loaded by fontconfig

The only use for storing charset loaded by fontconfig in font engines
is for determine if a font supports certain codepoint, however FreeType
already does that. The charset loaded is sometimes not complete, for
instance in fontconfig 2.9.0 it removed Apple Roman platform support
for cmap loading, thus results a regression in common symbol fonts
(Wingdings, Webdings) rendering. Because those symbol fonts produced
by Monotype only contain two cmap tables: Apple Roman and Microsoft
Symbol, since the Microsoft Symbol table has a weird 0xF000 offset,
we always fallback to the Apple Roman cmap table.

Removing freetype charset cache also make each font engine consuming
less memory.

Change-Id: I88f3f44981f3a1c517b84809a3f5b834ffff7681
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/gui/text/qfontengine_ft.cpp
src/gui/text/qfontengine_ft_p.h
src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp