diff options
Diffstat (limited to 'fontconfig/src/fcfs.c')
-rw-r--r-- | fontconfig/src/fcfs.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fontconfig/src/fcfs.c b/fontconfig/src/fcfs.c index 941abba8f..21c6c7cbb 100644 --- a/fontconfig/src/fcfs.c +++ b/fontconfig/src/fcfs.c @@ -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__ |