From 74cade1ee42dbe15d3242b08d5880e08e6294e2e Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Thu, 9 Jan 2014 01:57:41 +0100 Subject: 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 --- tests/auto/gui/text/qfontdatabase/FreeMono.ttf | Bin 267400 -> 0 bytes tests/auto/gui/text/qfontdatabase/LED_REAL.TTF | Bin 0 -> 4708 bytes .../gui/text/qfontdatabase/LED_REAL_readme.txt | 34 +++++++++++++++++++++ .../gui/text/qfontdatabase/tst_qfontdatabase.cpp | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) delete mode 100644 tests/auto/gui/text/qfontdatabase/FreeMono.ttf create mode 100644 tests/auto/gui/text/qfontdatabase/LED_REAL.TTF create mode 100644 tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt (limited to 'tests/auto/gui/text/qfontdatabase') diff --git a/tests/auto/gui/text/qfontdatabase/FreeMono.ttf b/tests/auto/gui/text/qfontdatabase/FreeMono.ttf deleted file mode 100644 index d7ce52ddc7..0000000000 Binary files a/tests/auto/gui/text/qfontdatabase/FreeMono.ttf and /dev/null differ diff --git a/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF b/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF new file mode 100644 index 0000000000..f87ea95e0e Binary files /dev/null and b/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF differ 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")) { } -- cgit v1.2.3