From: Jean-Baptiste Kempf Date: Tue, 27 Apr 2010 13:37:21 +0000 (+0200) Subject: Fontconfig: hardcode fonts path on Win32 X-Git-Tag: 1.2.0-pre1~6865 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=07e5aced3f8d067c348911baef41e7b685c4f51f;p=vlc Fontconfig: hardcode fonts path on Win32 Signed-off-by: Jean-Baptiste Kempf --- diff --git a/extras/contrib/src/Patches/fontconfig-noxml2.patch b/extras/contrib/src/Patches/fontconfig-noxml2.patch index ac7515bf75..6f7f6f5d79 100644 --- a/extras/contrib/src/Patches/fontconfig-noxml2.patch +++ b/extras/contrib/src/Patches/fontconfig-noxml2.patch @@ -88,3 +88,23 @@ diff -ruN fontconfig/src/fcxml.c fontconfig.new/src/fcxml.c XML_Parser p; FcChar8 *filename; int fd; +--- fontconfig/src/fcinit.c 2010-04-27 15:31:41.000000000 +0200 ++++ fontconfig.new/src/fcinit.c 2010-04-27 15:35:42.000000000 +0200 +@@ -34,11 +34,16 @@ + config = FcConfigCreate (); + if (!config) + goto bail0; +- if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS)) ++ char *path = malloc( MAX_PATH + 1 ); ++ GetWindowsDirectory( path, MAX_PATH + 1 ); ++ strcat( path, "\\fonts" ); ++// printf( "Fonts dir: %s\n", path ); ++ if (!FcConfigAddDir (config, (FcChar8 *) path)) + goto bail1; + char dir[MAX_PATH+5]; + SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, dir ); + strncat( dir, "\\vlc", 4 ); ++// printf( "Cache dir: %s\n", dir ); + if (!FcConfigAddCacheDir (config, (FcChar8 *)dir)) + goto bail1; + return config;