diff options
author | Fabian Bumberger <fbumberger@rim.com> | 2014-01-09 01:57:41 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-27 14:41:53 +0100 |
commit | 74cade1ee42dbe15d3242b08d5880e08e6294e2e (patch) | |
tree | 9382c4db63e691bec53cfd4442bd5a35e4bfb7f0 /tests/auto | |
parent | 7ca958eb61eec6c01d4fcc6720941ba37bd2924d (diff) |
Fix application font removal when using FontConfig
This patch fixes an issue when a font that was added with
QFontDatabase::addApplicationFont can not be removed any more.
The reason for that is that QFontconfigDatabase::addApplicationFont
adds the font to the FontConfig application set from where it
cannot be removed any more and is picked up every time the font database
is repopulated (e.g. after a call to QFontDatabase::removeApplicationFont).
This also fixes the QFontDatabase autotest which unfortunately does
not fail on linux, because it tries to add "FreeMono" (which in most
cases is already there as a system font). So this patch removes FreeMono
and adds LED_REAL as test font.
Change-Id: I70fc823075923aa426da1eb3e052affcc416e399
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/FreeMono.ttf | bin | 267400 -> 0 bytes | |||
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/LED_REAL.TTF | bin | 0 -> 4708 bytes | |||
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt | 34 | ||||
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | 2 |
4 files changed, 35 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qfontdatabase/FreeMono.ttf b/tests/auto/gui/text/qfontdatabase/FreeMono.ttf Binary files differdeleted file mode 100644 index d7ce52ddc7..0000000000 --- a/tests/auto/gui/text/qfontdatabase/FreeMono.ttf +++ /dev/null diff --git a/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF b/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF Binary files differnew file mode 100644 index 0000000000..f87ea95e0e --- /dev/null +++ b/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF diff --git a/tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt b/tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt new file mode 100644 index 0000000000..06a5b40313 --- /dev/null +++ b/tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt @@ -0,0 +1,34 @@ +Font: LED Real (led_real.ttf) +Created By: Matthew Welch +E-Mail: daffy-duck@worldnet.att.net +Web Address: http://home.att.net/~daffy-duck + (PGP public key available here) + +LED Real, like all of my fonts, is free. You can use it for most +personal or business uses you'd like, and I ask for no money. I +would, however, like to hear from you. If you use my fonts for +something please send me a postcard or e-mail letting me know how +you used it. Send me a copy if you can or let me know where I can +find your work. + +You may use this font for graphical or printed work, but you may not +sell it or include it in a collection of fonts (on CD or otherwise) +being sold. You can redistribute this font as long as you charge +nothing to receive it. If you redistribute it include this text file +with it as is (without modifications). + +If you use this font for commercial purposes please credit me in +at least some little way. + +About the font: + +Unlike most LED/LCD style fonts mine could be recreated with an +actual LED. I created this font working from memories of the good +old Speak and Spell display. Since I don't have an actual Speak +and Spell to work from I had to just do as well as I could in its +spirit. Be warned that some characters look just like others. The +( and the <, for instance. Also C and [. Most of these will be +pretty clear in context. To see all the sections of the LED "lit +up" at once use character 127 (hold down alt and type 0127 on the +numeric keypad). This font is, of course, monospaced. + diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index fa5c81a2f0..28db0ba291 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -83,7 +83,7 @@ private: }; tst_QFontDatabase::tst_QFontDatabase() - : m_testFont(QFINDTESTDATA("FreeMono.ttf")) + : m_testFont(QFINDTESTDATA("LED_REAL.TTF")) { } |