diff options
author | Roger Maclean <rmaclean@qnx.com> | 2013-10-21 14:33:23 -0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-27 23:51:16 +0100 |
commit | e65f568a8f6d6fbb89bc241b0ea78b18708ad2d5 (patch) | |
tree | 88f168cea47e5c4f1895c28a1fa959c6ec3993ca /examples/widgets/widgets/spinboxes/window.h | |
parent | 7f1017931ca709bd18085d930d352a3aae877fb3 (diff) |
Improve mapping between Font Config and Qt font attributes
It was sometimes impossible to select the desired font due to the code
completely ignoring the FC_WIDTH attribute and poor mapping of the
FC_WEIGHT attribute. The result was that it was easy to have a font file
that was inaccessible by Qt since it shared attributes with another
font file.
The FC_WIDTH attribute is now fetched and used unchanged as the font's
stretch value other than ensuring it is within the allowed range.
For FC_WEIGHT, the code no longer matches the value with the closest
QFont::Weight enum but instead does a piecewise linear mapping so
that Qt enum values match Font Config ones to the extent possible.
Also removed bogus call to fetch the width that was doing nothing with it.
Change-Id: Id39715f14a617c1d0e00ecf5a7d391cab99adc03
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'examples/widgets/widgets/spinboxes/window.h')
0 files changed, 0 insertions, 0 deletions