summaryrefslogtreecommitdiff
path: root/src/fclist.c
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2005-11-01 05:26:27 +0000
committerPatrick Lam <plam@MIT.EDU>2005-11-01 05:26:27 +0000
commite77c17184a6172d6368dd3193c791c4027065bbd (patch)
treec65be8e0335b94d5d14b016a991f547eac3a8767 /src/fclist.c
parentbe99726f672cef086b4256ad34163f6f9ed9d4a5 (diff)
downloadfontconfig-e77c17184a6172d6368dd3193c791c4027065bbd.tar.gz
Reinstate basename patch, but keep a hash table linking FcPatterns to their
fully-qualified font names for clients' benefit. Clients only pay for the font names once they request the FC_FILE property from an FcPattern, but the font name is malloc'd at that point (i.e. not mmapped: that's impossible, since it may vary between machines.) Clients do have to pay for a copy of the path name per cache file. Note that FcPatternGetString now does some rewriting if you ask for an FC_FILE, appending the pathname as appropriate.
Diffstat (limited to 'src/fclist.c')
-rw-r--r--src/fclist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fclist.c b/src/fclist.c
index 35d68ae..fa567a0 100644
--- a/src/fclist.c
+++ b/src/fclist.c
@@ -422,6 +422,14 @@ FcListAppend (FcListHashTable *table,
else
defidx = 0;
+ /* Also, copy over the full path info. */
+ if (!strcmp (os->objects[o], FC_FILE))
+ {
+ FcChar8 * s;
+ FcPatternGetString (font, FC_FILE, 0, &s);
+ FcPatternAddFullFname (bucket->pattern, FcPatternFindFullFname(font));
+ }
+
e = FcPatternFindElt (font, os->objects[o]);
if (e)
{