1 --- fontconfig/src/Makefile.am Mon Sep 18 07:06:41 2006
2 +++ fontconfig/src/Makefile.am Sat Aug 18 20:48:45 2007
6 install-libtool-import-lib:
7 - $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
8 $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
11 --- fontconfig/src/Makefile.in Sun Dec 3 10:27:33 2006
12 +++ fontconfig/src/Makefile.in Sat Aug 18 20:53:40 2007
16 @OS_WIN32_TRUE@install-libtool-import-lib:
17 - @OS_WIN32_TRUE@ $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
18 @OS_WIN32_TRUE@ $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
21 --- fontconfig/src/fcinit.c Sun Dec 3 07:10:30 2006
22 +++ fontconfig/src/fcinit.c Sun Aug 19 00:52:07 2007
30 + #include <windows.h>
33 + static char *IsWindowsDir(char *p_dir_in, char **p_dir_out)
37 + if( ! strcmp( p_dir_in, "WINDOWSFONTDIR" ))
41 + *p_dir_out = malloc( 1000 );
44 + fprintf( stderr, "Fontconfig error: out of memory" );
47 + rc = GetWindowsDirectory( *p_dir_out, 800 );
48 + if( rc == 0 || rc > 800 )
50 + fprintf( stderr, "Fontconfig error: GetWindowsDirectory failed" );
56 + if( (*p_dir_out)[ rc - 1 ] != '\\' )
57 + strcpy( (*p_dir_out)+rc, "\\" );
58 + strcat( *p_dir_out, "fonts" );
62 + else if( ! strcmp( p_dir_in, "WINDOWSTEMPDIR" ))
66 + *p_dir_out = malloc( 1000 );
69 + fprintf( stderr, "Fontconfig error: out of memory" );
72 + rc = GetTempPath( 800, *p_dir_out );
73 + if( rc == 0 || rc > 800 )
75 + fprintf( stderr, "Fontconfig error: GetTempPath failed" );
86 + #define IsWindowsDir(A, B) A
90 FcInitFallbackConfig (void)
92 + char *p_dir_out = NULL;
99 ! if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
101 ! if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR))
107 ! if (!FcConfigAddDir (config, (FcChar8 *) IsWindowsDir(FC_DEFAULT_FONTS, &p_dir_out)))
113 ! if (!FcConfigAddCacheDir (config, (FcChar8 *) IsWindowsDir(FC_CACHEDIR, &p_dir_out)))
119 FcConfigDestroy (config);
127 if (config->cacheDirs && config->cacheDirs->num == 0)
130 "Fontconfig warning: no <cachedir> elements found. Check configuration.\n");
132 "Fontconfig warning: adding <cachedir>%s</cachedir>\n",
135 "Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>\n");
136 ! if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR) ||
137 !FcConfigAddCacheDir (config, (FcChar8 *) "~/.fontconfig"))
140 if (config->cacheDirs && config->cacheDirs->num == 0)
142 + char *p_dir_out = NULL;
145 "Fontconfig warning: no <cachedir> elements found. Check configuration.\n");
147 "Fontconfig warning: adding <cachedir>%s</cachedir>\n",
148 ! IsWindowsDir(FC_CACHEDIR, &p_dir_out));
150 "Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>\n");
155 ! if (!FcConfigAddCacheDir (config, (FcChar8 *) IsWindowsDir(FC_CACHEDIR, &p_dir_out)) ||
156 !FcConfigAddCacheDir (config, (FcChar8 *) "~/.fontconfig"))
161 "Fontconfig error: out of memory");
162 FcConfigDestroy (config);
168 return FcInitFallbackConfig ();