]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccharset.c
Bug 44826 - <alias> must contain only a single <family>
[fontconfig.git] / src / fccharset.c
index 9228b0904bfbb5330b20bf32f20c8a52a06e9b1e..df1d2b538ff9434ece57756a0b42351d5a6a4080 100644 (file)
@@ -7,9 +7,9 @@
  * documentation for any purpose is hereby granted without fee, provided that
  * the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
+ * documentation, and that the name of the author(s) not be used in
  * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
+ * specific, written prior permission.  The authors make no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
@@ -262,6 +262,23 @@ FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4)
     return FcTrue;
 }
 
+FcBool
+FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4)
+{
+    FcCharLeaf *leaf;
+    FcChar32   *b;
+
+    if (fcs->ref == FC_REF_CONSTANT)
+       return FcFalse;
+    leaf = FcCharSetFindLeaf (fcs, ucs4);
+    if (!leaf)
+       return FcTrue;
+    b = &leaf->map[(ucs4 & 0xff) >> 5];
+    *b &= ~(1 << (ucs4 & 0x1f));
+    /* We don't bother removing the leaf if it's empty */
+    return FcTrue;
+}
+
 /*
  * An iterator for the leaves of a charset
  */