]> git.wh0rd.org - fontconfig.git/blobdiff - doc/fcpattern.fncs
Implement FcPatternFormat and use it in cmdline tools (bug #17107)
[fontconfig.git] / doc / fcpattern.fncs
index 7297e019468df7c000e16c41bbd087f51dfdc33d..c89706a424b87e738fec977a59df0b8501a28d8e 100644 (file)
@@ -395,3 +395,21 @@ 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 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 RPM 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".
+The return value refers to newly allocated memory which should be freed by the
+caller using free().
+@@