Update doc to include the version info of `since when'
[platform/upstream/fontconfig.git] / doc / fccharset.fncs
index 93e1f5c..7245a2a 100644 (file)
@@ -7,15 +7,15 @@
  * 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.
  *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
@@ -46,11 +46,23 @@ memory referenced is freed.
 @TYPE2@                FcChar32%               @ARG2@          ucs4 
 @PURPOSE@      Add a character to a charset
 @DESC@
-<function>FcCharSetAddChar</function> adds a single unicode char to the set,
+<function>FcCharSetAddChar</function> adds a single Unicode char to the set,
 returning FcFalse on failure, either as a result of a constant set or from
 running out of memory. 
 @@
 
+@RET@          FcBool 
+@FUNC@         FcCharSetDelChar
+@TYPE1@                FcCharSet *             @ARG1@          fcs
+@TYPE2@                FcChar32%               @ARG2@          ucs4 
+@PURPOSE@      Add a character to a charset
+@DESC@
+<function>FcCharSetDelChar</function> deletes a single Unicode char from the set,
+returning FcFalse on failure, either as a result of a constant set or from
+running out of memory.
+@SINCE@                2.9.0
+@@
+
 @RET@          FcCharSet *
 @FUNC@         FcCharSetCopy
 @TYPE1@                FcCharSet *             @ARG1@          src
@@ -67,7 +79,7 @@ than increment the reference count on <parameter>src</parameter>.
 @PURPOSE@      Compare two charsets
 @DESC@
 Returns whether <parameter>a</parameter> and <parameter>b</parameter>
-contain the same set of unicode chars.
+contain the same set of Unicode chars.
 @@
 
 @RET@          FcCharSet *
@@ -98,17 +110,19 @@ Returns a set including only those chars found in either <parameter>a</parameter
 Returns a set including only those chars found in <parameter>a</parameter> but not <parameter>b</parameter>. 
 @@
 
-@RET@          FcCharSet *
+@RET@          FcBool
 @FUNC@         FcCharSetMerge
-@TYPE1@                const FcCharSet *       @ARG1@          a
+@TYPE1@                FcCharSet *             @ARG1@          a
 @TYPE2@                const FcCharSet *       @ARG2@          b
+@TYPE3@                FcBool *                @ARG3@          changed
 @PURPOSE@      Merge charsets
 @DESC@
-If <parameter>a</parameter> is NULL, returns a copy of <parameter>b</parameter>.
-If <parameter>a</parameter> is an FcCharSet object owned by fontconfig that
-cannot be modified, it returns the union of <parameter>a</parameter> and
-<parameter>b</parameter> in a newly-created FcCharSet object.
-Otherwise, adds all chars in <parameter>b</parameter> to <parameter>a</parameter> and returns <parameter>a</parameter>.  In other words, this is an in-place versionof FcCharSetUnion.
+Adds all chars in <parameter>b</parameter> to <parameter>a</parameter>.
+In other words, this is an in-place version of FcCharSetUnion.
+If <parameter>changed</parameter> is not NULL, then it returns whether any new
+chars from <parameter>b</parameter> were added to <parameter>a</parameter>.
+Returns FcFalse on failure, either when <parameter>a</parameter> is a constant
+set or from running out of memory.
 @@
 
 @RET@          FcBool 
@@ -125,7 +139,7 @@ Returns whether <parameter>fcs</parameter> contains the char <parameter>ucs4</pa
 @TYPE1@                const FcCharSet *       @ARG1@          a
 @PURPOSE@      Count entries in a charset
 @DESC@
-Returns the total number of unicode chars in <parameter>a</parameter>. 
+Returns the total number of Unicode chars in <parameter>a</parameter>. 
 @@
 
 @RET@          FcChar32
@@ -162,9 +176,27 @@ Returns whether <parameter>a</parameter> is a subset of <parameter>b</parameter>
 @TYPE3@                FcChar32 *              @ARG3@          next
 @PURPOSE@      Start enumerating charset contents
 @DESC@
-Builds an array of bits marking the first page of Unicode coverage of
-<parameter>a</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in the
-font.
+Builds an array of bits in <parameter>map</parameter> marking the
+first page of Unicode coverage of <parameter>a</parameter>.
+<parameter>*next</parameter> is set to contains the base code point
+for the next page in <parameter>a</parameter>.  Returns the base code
+point for the page, or <constant>FC_CHARSET_DONE</constant> if
+<parameter>a</parameter> contains no pages.  As an example, if
+<function>FcCharSetFirstPage</function> returns
+<literal>0x300</literal> and fills <parameter>map</parameter> with
+<literallayout class="monospaced">
+0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003
+</literallayout>
+Then the page contains code points <literal>0x300</literal> through
+<literal>0x33f</literal> (the first 64 code points on the page)
+because <parameter>map[0]</parameter> and
+<parameter>map[1]</parameter> both have all their bits set.  It also
+contains code points <literal>0x343</literal> (<parameter>0x300 + 32*2
++ (4-1)</parameter>) and <literal>0x35e</literal> (<parameter>0x300 +
+32*2 + (31-1)</parameter>) because <parameter>map[2]</parameter> has
+the 4th and 31st bits set.  The code points represented by
+<literal>map[3]</literal> and later are left as an excercise for the
+reader ;).
 @@
 
 @RET@          FcChar32
@@ -174,9 +206,15 @@ font.
 @TYPE3@                FcChar32 *              @ARG3@          next
 @PURPOSE@      Continue enumerating charset contents
 @DESC@
-Builds an array of bits marking the Unicode coverage of <parameter>a</parameter> for page
-<parameter>*next</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in
-the font. 
+Builds an array of bits in <parameter>map</parameter> marking the
+Unicode coverage of <parameter>a</parameter> for page containing
+<parameter>*next</parameter> (see the
+<function>FcCharSetFirstPage</function> description for details).
+<parameter>*next</parameter> is set to contains the base code point
+for the next page in <parameter>a</parameter>.  Returns the base of
+code point for the page, or <constant>FC_CHARSET_DONE</constant> if
+<parameter>a</parameter> does not contain
+<parameter>*next</parameter>.
 @@
 
 @RET@          FcChar32