Store styleName in font database
authorJiang Jiang <jiang.jiang@nokia.com>
Thu, 9 Jun 2011 13:58:09 +0000 (15:58 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 27 Jun 2011 08:59:28 +0000 (10:59 +0200)
commit1fda23c0c63e0b445e303c1fd64ecb9d925b6976
tree4f211e9743f867d1150700c6c54de4bd4a47c323
parenta06c8405d053b16327d65415f3335eceb37abd3b
Store styleName in font database

So that queries like QFontDatabase::styles() can return exactly
the same styles as the system does. Then application can use
QFont::setStyleName() to select those styles later. With a lot
of fonts not providing correct numeric weight/width values and
even if they did, values are usually not directly mapped to
QFont enums, styleName is probably the only reliable way to
select any possible font in the system.

Reviewed-by: QTBUG-13518
Change-Id: Id8a9469b804f1b5bb81d8c7378e7e8778f9a4fff
Reviewed-on: http://codereview.qt.nokia.com/739
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/gui/text/qfontdatabase.cpp
src/gui/text/qfontdatabase_mac.cpp
src/gui/text/qfontdatabase_x11.cpp