]> git.wh0rd.org - fontconfig.git/blobdiff - doc/fcpattern.fncs
Replace 'KEITH PACKARD' with 'THE AUTHOR(S)' in license text in all files
[fontconfig.git] / doc / fcpattern.fncs
index 5a9912f4465a720321fe366dcaf76778fd7056b9..8948e88a3a7d98ea48e90377207dcf3c44444743 100644 (file)
@@ -13,9 +13,9 @@
  * 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
@@ -253,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
@@ -261,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
@@ -393,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.
 @@