From d230cf144f84c8a50b932c8b89daa55c1a3620d8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 Jan 2009 20:15:20 -0500 Subject: [PATCH] Make FcCharSetMerge() public That's needed for apps to be abled to do pruning themselves without the performance penalty of recreating new charsets all the time. --- doc/fccharset.fncs | 13 +++++++++++++ fontconfig/fontconfig.h | 3 +++ src/fcint.h | 3 --- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/fccharset.fncs b/doc/fccharset.fncs index f4c7d32..93e1f5c 100644 --- a/doc/fccharset.fncs +++ b/doc/fccharset.fncs @@ -98,6 +98,19 @@ Returns a set including only those chars found in either aa but not b. @@ +@RET@ FcCharSet * +@FUNC@ FcCharSetMerge +@TYPE1@ const FcCharSet * @ARG1@ a +@TYPE2@ const FcCharSet * @ARG2@ b +@PURPOSE@ Merge charsets +@DESC@ +If a is NULL, returns a copy of b. +If a is an FcCharSet object owned by fontconfig that +cannot be modified, it returns the union of a and +b in a newly-created FcCharSet object. +Otherwise, adds all chars in b to a and returns a. In other words, this is an in-place versionof FcCharSetUnion. +@@ + @RET@ FcBool @FUNC@ FcCharSetHasChar @TYPE1@ const FcCharSet * @ARG1@ fcs diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index 529456f..606580d 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -439,6 +439,9 @@ FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); FcPublic FcCharSet* FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b); +FcPublic FcCharSet * +FcCharSetMerge (FcCharSet *a, const FcCharSet *b); + FcPublic FcBool FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4); diff --git a/src/fcint.h b/src/fcint.h index c8ff228..0b41d59 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -653,9 +653,6 @@ FcNameUnparseValueList (FcStrBuf *buf, FcPrivate FcCharLeaf * FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4); -FcPrivate FcCharSet * -FcCharSetMerge (FcCharSet *a, const FcCharSet *b); - FcPrivate FcBool FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs); -- 2.39.5