diff options
| author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-05-16 08:20:54 (GMT) |
|---|---|---|
| committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-05-16 08:39:24 (GMT) |
| commit | 4d5b8f66d82e9087d9d58a4e76e6b46ce7bb53cc (patch) | |
| tree | 72d2f949182c689bc62773375336b7aa93d89d94 /doc/src/snippets/code | |
| parent | 7a1c29f101b95c9cc2cb53f8b80d231b5a994a9a (diff) | |
| download | Qt-4d5b8f66d82e9087d9d58a4e76e6b46ce7bb53cc.zip Qt-4d5b8f66d82e9087d9d58a4e76e6b46ce7bb53cc.tar.gz Qt-4d5b8f66d82e9087d9d58a4e76e6b46ce7bb53cc.tar.bz2 | |
Workaround a bug in Core Text to select Light fonts
Currently in Core Text there is not proper way to select fonts with
Light weight, for example:
QFont font("Helvetica"); font.setWeight(QFont::Light);
will give you Helvetica-Light, as with:
QFont font("Helvetica"); font.setWeight(QFont::Normal);
because of a bug in Core Text, applying 0 symbolic traits with
CTFontCreateCopyWithSymbolicTraits will always return the Light
variant of that font family. Thus, we should only do this unless
symbolicTraits is not 0 or font.weight is not Normal (Light is not
a symbolic trait, but CT doesn't support selecting Light weight
numerically).
Reviewed-by: Eskil
Diffstat (limited to 'doc/src/snippets/code')
0 files changed, 0 insertions, 0 deletions
