]> git.sesse.net Git - vlc/commitdiff
Fontconfig: hardcode fonts path on Win32
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 27 Apr 2010 13:37:21 +0000 (15:37 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 27 Apr 2010 14:46:24 +0000 (16:46 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
extras/contrib/src/Patches/fontconfig-noxml2.patch

index ac7515bf75f1b8e2f3835b831a83955637cd3591..6f7f6f5d790ae4760fae9fe0810899f1d813e521 100644 (file)
@@ -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;