fixed fontconfig init calls

This commit is contained in:
eknauel 2003-11-16 15:18:21 +00:00
parent 26bd8b06e6
commit d7940f85ba
2 changed files with 6 additions and 6 deletions

View File

@ -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");

View File

@ -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,