From d7940f85ba69fbd7b9b7fc8f742f97ec5d7e87b5 Mon Sep 17 00:00:00 2001 From: eknauel Date: Sun, 16 Nov 2003 15:18:21 +0000 Subject: [PATCH] fixed fontconfig init calls --- c/libs/xft.c | 8 ++++++-- c/libs/xft.h | 4 ---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/c/libs/xft.c b/c/libs/xft.c index 94de5cb..75cd9ea 100644 --- a/c/libs/xft.c +++ b/c/libs/xft.c @@ -378,11 +378,15 @@ s48_value scx_XftListFontsPatternObjects(s48_value sdpy, s48_value sscreenno, s48_value sxp, s48_value sxo) { XftFontSet *fs; +#if XFT_VERSION > 1 + FcConfig *fcc; +#endif S48_DECLARE_GC_PROTECT(4); S48_GC_PROTECT_4(sdpy, sscreenno, sxp, sxo); #if XFT_VERSION > 1 - fs = FcFontList(global_fcconfig, scx_extract_xftpattern(sxp), + fcc = FcConfigGetCurrent(); + fs = FcFontList(fcc, scx_extract_xftpattern(sxp), scx_extract_xftobjectset(sxo)); #else fs = XftListFontsPatternObjects(scx_extract_display(sdpy), @@ -553,7 +557,7 @@ s48_value scx_xftfontset_pattern_ref(s48_value sxfs, s48_value index) void scx_xft_init(void) { #if XFT_VERSION > 1 - global_fcconfig = FcInitLoadConfig(); + FcInit(); #endif XFT_GC_PROTECT_IMPORT_BINDING(scx_xftpattern_record_type, "xft-pattern"); diff --git a/c/libs/xft.h b/c/libs/xft.h index 54f6487..bbcb069 100644 --- a/c/libs/xft.h +++ b/c/libs/xft.h @@ -38,10 +38,6 @@ #define SCX_XFT_CHAR_WIDTH 22 /* Int */ #define SCX_XFT_CHAR_HEIGHT 23 /* Int */ -#if XFT_VERSION > 1 -static FcConfig *global_fcconfig; -#endif - enum xft_pattern_get_return_type { SCX_XFT_INVALID, SCX_XFT_UNIMPLEMENTED,