]> git.wh0rd.org - fontconfig.git/blobdiff - doc/fcpattern.fncs
Call git tools using "git cmd" instead of "git-cmd" syntax
[fontconfig.git] / doc / fcpattern.fncs
index 95529184e37c643f5b9789e2e876dc3f481f712f..35ef68bdfbf9eb04da21ff638250c398bd270262 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * fontconfig/doc/fcpattern.fncs
  *
  * Copyright © 2003 Keith Packard
  *
@@ -77,6 +77,18 @@ Returns whether <parameter>pa</parameter> and <parameter>pb</parameter> have exa
 objects in <parameter>os</parameter>.
 @@
 
+@RET@          FcPattern *
+@FUNC@         FcPatternFilter
+@TYPE1@                FcPattern *                     @ARG1@           p
+@TYPE2@                const FcObjectSet *             @ARG1@           os
+@PURPOSE@      Filter the objects of pattern
+@DESC@
+Returns a new pattern that only has those objects from
+<parameter>p</parameter> that are in <parameter>os</parameter>.
+If <parameter>os</parameter> is NULL, a duplicate of
+<parameter>p</parameter> is returned.
+@@
+
 @RET@          FcChar32
 @FUNC@         FcPatternHash
 @TYPE1@                const FcPattern *               @ARG1@          p
@@ -241,7 +253,7 @@ within the pattern directly.  Applications must not free this value.
 @TYPE4+++++@   FcBool *                        @ARG4+++++@     b 
 
 @PROTOTYPE++++++@
-@RET++++++@    FcBool
+@RET++++++@    FcResult
 @FUNC++++++@   FcPatternGetFTFace
 @TYPE1++++++@  FcPattern *                     @ARG1++++++@    p
 @TYPE2++++++@  const char *                    @ARG2++++++@    object
@@ -249,7 +261,7 @@ within the pattern directly.  Applications must not free this value.
 @TYPE3++++++@  FT_Face *                       @ARG3++++++@    f
 
 @PROTOTYPE+++++++@
-@RET+++++++@   FcBool
+@RET+++++++@   FcResult
 @FUNC+++++++@  FcPatternGetLangSet
 @TYPE1+++++++@         FcPattern *                     @ARG1+++++++@   p
 @TYPE2+++++++@ const char *                    @ARG2+++++++@   object
@@ -267,20 +279,20 @@ in preference to FcPatternGet to provide compile-time typechecking.
 
 @RET@          FcPattern *
 @FUNC@         FcPatternBuild
-@TYPE1@                FcPattern *                     @ARG1@          orig
+@TYPE1@                FcPattern *                     @ARG1@          pattern
 @TYPE2@        ...
 
 @PROTOTYPE+@
 @RET+@         FcPattern *
 @FUNC+@                FcPatternVaBuild
-@TYPE1+@       FcPattern *                     @ARG1+@         orig
+@TYPE1+@       FcPattern *                     @ARG1+@         pattern
 @TYPE2+@       va_list%                        @ARG2+@         va
 
 @PROTOTYPE++@
 @RET++@                void
 @FUNC++@       FcPatternVapBuild
 @TYPE1++@      FcPattern *                     @ARG1++@        result
-@TYPE2++@      FcPattern *                     @ARG2++@        orig
+@TYPE2++@      FcPattern *                     @ARG2++@        pattern
 @TYPE3++@      va_list%                        @ARG3++@        va
 
 @PURPOSE@      Create patterns from arguments
@@ -381,5 +393,25 @@ Converts <parameter>name</parameter> from the standard text format described abo
 @DESC@
 Converts the given pattern into the standard text format described above.
 The return value is not static, but instead refers to newly allocated memory
-which should be freed by the caller.
+which should be freed by the caller using free().
+@@
+
+@RET@          FcChar8 *
+@FUNC@         FcPatternFormat
+@TYPE1@                FcPattern *                     @ARG1@          pat
+@TYPE2@                const FcChar8 *                 @ARG2@          format
+@PURPOSE@      Format a pattern into a string according to a format specifier
+@DESC@
+
+Converts the given pattern into text format described by the format specifier.
+The format specifier is similar to a C style printf string, which the
+printf(2) man page provides a good introduction to. However, as fontconfig
+already knows the type of data that is being printed, you must omit the type
+specifier. In its place put the element name you wish to print enclosed in
+curly braces ({}). For example, to print the family name and style the
+pattern, use the format "%{family} %{style}\n".
+There can be an option width specifier after the percent sign and before
+the opening brace.  The width modifier acts similar to those in printf.
+The return value refers to newly allocated memory which should be freed by the
+caller using free(), or NULL if <parameter>format</parameter> is invalid.
 @@