qt5base-lts/tests/auto/gui/text/qfontdatabase
Simon Hausmann 3745b0ca12 Fix application font population on OS X
This patch fixes two issues that prevented the application font related tests
of tst_QFontDatabase from passing:

* The code for creating the font descriptor after the registration of an app font
  with file name using CTFontDescriptorCreateWithAttributes must create a dictionary
  with kCTFontURLAttribute as key and the CFURLRef pointing to the on-disk file as
  value. Unfortunately the code mixed up keys and values in the dictionary.

* Registration of app fonts within QFontDatabase itself on Windows and Fontconfig
  platforms works by QFontDatabase calling addApplicationFont on the platform db
  after calling populateFontDatabase(). It assumes that addApplicationFont on the
  platform db is capable of registering the font right away. This part was also
  missing from the Mac implementation and this patch implements it by moving the
  common registration code from a CTFontDescriptorRef out into a separate method,
  called from populateFontDatabase() as well as addApplicationFont().

Task-number: QTBUG-23062

Change-Id: Ide5e6bf277d99f3cab50ee0d4631cc3fba6d0d45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-07-31 07:54:01 +02:00
..
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
FreeMono.ttf Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
qfontdatabase.pro API-cleanup: Add QPlatformFontDatabase::registerAliasToFontFamily(). 2013-07-16 16:02:51 +02:00
tst_qfontdatabase.cpp Fix application font population on OS X 2013-07-31 07:54:01 +02:00