summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-06-02 13:41:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-06-02 13:41:23 +0200
commitebf8a285b21b168be6e9853b8178d2352e58acc1 (patch)
tree1133614c4a8f353ca81848fb7821cae2b1278f52
parent2de28295fc899065d6be129a2294cf5554cb717b (diff)
downloadvdr-ebf8a285b21b168be6e9853b8178d2352e58acc1.tar.gz
vdr-ebf8a285b21b168be6e9853b8178d2352e58acc1.tar.bz2
Fixed font handling with fontconfig 2.9.0 or newer
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--font.c5
3 files changed, 5 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 99b06db8..f0c5e3dd 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2780,6 +2780,7 @@ Dominik Strasser <dominik@die-strassers.de>
Joerg Bornkessel <hd_brummy@gentoo.org>
for adding LDFLAGS to the linker calls in the Makefiles
+ for fixing font handling with fontconfig 2.9.0 or newer
Andreas Oberritter <obi@opendreambox.org>
for suggesting to retrieve the include path to the freetype2 header files
diff --git a/HISTORY b/HISTORY
index 53073f5d..fb20a60a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7138,3 +7138,4 @@ Video Disk Recorder Revision History
- Finally removed the code marked with __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS
and LEGACY_CRECEIVER.
- Now making sure that the "small font" is never larger than the "osd font".
+- Fixed font handling with fontconfig 2.9.0 or newer (thanks to Joerg Bornkessel).
diff --git a/font.c b/font.c
index f6ffd61b..0bcdc9bb 100644
--- a/font.c
+++ b/font.c
@@ -6,7 +6,7 @@
*
* BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya.
*
- * $Id: font.c 2.12 2012/06/02 13:32:19 kls Exp $
+ * $Id: font.c 2.13 2012/06/02 13:38:28 kls Exp $
*/
#include "font.h"
@@ -482,7 +482,8 @@ cString cFont::GetFontFileName(const char *FontName)
FcPatternAddBool(pat, FC_SCALABLE, FcTrue);
FcConfigSubstitute(NULL, pat, FcMatchPattern);
FcDefaultSubstitute(pat);
- FcFontSet *fontset = FcFontSort(NULL, pat, FcFalse, NULL, NULL);
+ FcResult fresult;
+ FcFontSet *fontset = FcFontSort(NULL, pat, FcFalse, NULL, &fresult);
if (fontset) {
for (int i = 0; i < fontset->nfont; i++) {
FcBool scalable;