]> git.wh0rd.org Git - fontconfig.git/commitdiff
Only add basename to patterns' FC_FILE element, not any part of the
authorPatrick Lam <plam@MIT.EDU>
Tue, 25 Oct 2005 22:29:13 +0000 (22:29 +0000)
committerPatrick Lam <plam@MIT.EDU>
Tue, 25 Oct 2005 22:29:13 +0000 (22:29 +0000)
    dirname.

ChangeLog
src/fcfreetype.c

index 095bcb5986aacb53cf2289bd2cc36d497054b73e..3eef5ab7369826d73876d953a2e069e91465e5f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-25  Patrick Lam  <plam@mit.edu>
+       * src/fcfreetype.c (FcFreeTypeQuery):
+
+       Only add basename to patterns' FC_FILE element, not any part of
+       the dirname.
+
 2005-10-22  Patrick Lam  <plam@mit.edu>
        * src/fcfreetype.c:
 
index 20194f1818ec04474536aa61b73fd4cb30bc8f50..0a5629c404eead919735dd2003d41e938dbe8e2e 100644 (file)
@@ -47,6 +47,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <libgen.h>
 #include "fcint.h"
 #include <ft2build.h>
 #include FT_FREETYPE_H
@@ -1287,7 +1288,7 @@ FcFreeTypeQuery (const FcChar8    *file,
                printf ("Saving unique fullname %s\n", full);
     }
 
-    if (!FcPatternAddString (pat, FC_FILE, file))
+    if (!FcPatternAddString (pat, FC_FILE, (FcChar8 *)basename((char *)file)))
        goto bail1;
 
     if (!FcPatternAddInteger (pat, FC_INDEX, id))