diff options
author | Akira TAGOH <akira@tagoh.org> | 2019-01-31 07:52:09 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2019-04-03 12:02:09 +0000 |
commit | def1d00036a4e828382027292a167203c6c7a0b4 (patch) | |
tree | 5827dd8f8247ccdbdf2a631b6ac9ce3a8ef9d2cf /src/fcstr.c | |
parent | 5e46f1545100f12ee1daaa41bccc6c3914bd2d83 (diff) |
Add reset-dirs element
This element removes all of fonts directories where added by
dir elements. it is useful to override fonts dirs from system
to their own dirs only.
Diffstat (limited to 'src/fcstr.c')
-rw-r--r-- | src/fcstr.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fcstr.c b/src/fcstr.c index 4e0a2b6..53cd1f7 100644 --- a/src/fcstr.c +++ b/src/fcstr.c @@ -1388,6 +1388,22 @@ FcStrSetDel (FcStrSet *set, const FcChar8 *s) return FcFalse; } +FcBool +FcStrSetDeleteAll (FcStrSet *set) +{ + int i; + + if (FcRefIsConst (&set->ref)) + return FcFalse; + + for (i = set->num; i > 0; i--) + { + FcStrFree (set->strs[i - 1]); + set->num--; + } + return FcTrue; +} + /* TODO Make public */ static FcStrSet * FcStrSetReference (FcStrSet *set) |