Go to file
Roger Maclean e65f568a8f 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>
2013-10-27 23:51:16 +01:00
bin Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
config.tests Add configuration for building with imf support on QNX 2013-10-25 20:17:40 +02:00
dist Add empty dist/changes-5.3.0 file 2013-10-26 00:39:51 +02:00
doc Doc: Remove Plug & Paint plugins from the list of examples 2013-10-09 11:01:35 +02:00
examples Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Clean up common winrt/winphone mkspec 2013-10-25 09:19:01 +02:00
qmake qmake: Support MSVC2013 for WinRT builds 2013-10-25 09:00:37 +02:00
src Improve mapping between Font Config and Qt font attributes 2013-10-27 23:51:16 +01:00
tests QPrintSupport: Move QAbstractPrintDialog test into QPrintSupport 2013-10-26 00:39:51 +02:00
tools Add configuration for building with imf support on QNX 2013-10-25 20:17:40 +02:00
util QTimeZone - Define new class and api 2013-09-22 22:21:15 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Long live QCommandLineParser! 2013-08-24 21:33:39 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Add configuration for building with imf support on QNX 2013-10-25 20:17:40 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL INSTALL: Fix URL of Installing Qt documentation 2013-04-11 16:09:07 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro Merge remote-tracking branch 'origin/stable' into dev 2013-06-27 13:06:38 +02:00
sync.profile put ANGLE includes in a QtANGLE subdir 2013-06-10 21:12:13 +02:00