diff options
author | Akira TAGOH <akira@tagoh.org> | 2013-12-05 19:15:47 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2013-12-20 11:57:16 +0900 |
commit | 7a6622f25cdfab5ab775324bef1833b67109801b (patch) | |
tree | b86ccd5635d4171da698caf3d7c47fed5d10cc36 /src/fcfs.c | |
parent | 5c725f2f5829238d16116f782d00d8bb0defaf08 (diff) | |
download | fontconfig-7a6622f25cdfab5ab775324bef1833b67109801b.tar.gz |
Improve the performance issue on rescanning directories
Diffstat (limited to 'src/fcfs.c')
-rw-r--r-- | src/fcfs.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -122,6 +122,28 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s) return s_serialize; } + +FcFontSet * +FcFontSetDeserialize (const FcFontSet *set) +{ + int i; + FcFontSet *new = FcFontSetCreate (); + + if (!new) + return NULL; + for (i = 0; i < set->nfont; i++) + { + if (!FcFontSetAdd (new, FcPatternDuplicate (FcFontSetFont (set, i)))) + goto bail; + } + + return new; +bail: + FcFontSetDestroy (new); + + return NULL; +} + #define __fcfs__ #include "fcaliastail.h" #undef __fcfs__ |