fontconfig-devel.txt revision 1cc69409
11cc69409SmrgFontconfig Developers Reference, Version 2.14.2
22c393a42Smrg
3ca08ab68Smrg   Copyright © 2002 Keith Packard
42c393a42Smrg
5eceda581Smrg   Permission to use, copy, modify, distribute, and sell this
6eceda581Smrg   software and its documentation for any purpose is hereby
7eceda581Smrg   granted without fee, provided that the above copyright notice
8eceda581Smrg   appear in all copies and that both that copyright notice and
9eceda581Smrg   this permission notice appear in supporting documentation, and
10eceda581Smrg   that the name of the author(s) not be used in advertising or
11eceda581Smrg   publicity pertaining to distribution of the software without
12eceda581Smrg   specific, written prior permission. The authors make no
13eceda581Smrg   representations about the suitability of this software for any
14eceda581Smrg   purpose. It is provided "as is" without express or implied
15eceda581Smrg   warranty.
16eceda581Smrg
17eceda581Smrg   THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
18eceda581Smrg   SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19eceda581Smrg   AND FITNESS, IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
20eceda581Smrg   SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21eceda581Smrg   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
22eceda581Smrg   IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23eceda581Smrg   ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24eceda581Smrg   THIS SOFTWARE.
25eceda581Smrg           _______________________________________________
262c393a42Smrg
27ca08ab68Smrg   Table of Contents
28eceda581Smrg   DESCRIPTION
29eceda581Smrg   FUNCTIONAL OVERVIEW
30eceda581Smrg   Datatypes
31eceda581Smrg   FUNCTIONS
322c393a42Smrg
33a6844aabSmrgDESCRIPTION
342c393a42Smrg
35ca08ab68Smrg   Fontconfig is a library designed to provide system-wide font
36ca08ab68Smrg   configuration, customization and application access.
37eceda581Smrg     __________________________________________________________
382c393a42Smrg
39a6844aabSmrgFUNCTIONAL OVERVIEW
40a6844aabSmrg
41eceda581Smrg   Fontconfig contains two essential modules, the configuration
42eceda581Smrg   module which builds an internal configuration from XML files
43eceda581Smrg   and the matching module which accepts font patterns and returns
44eceda581Smrg   the nearest matching font.
45eceda581Smrg     __________________________________________________________
46eceda581Smrg
47eceda581SmrgFONT CONFIGURATION
48eceda581Smrg
49eceda581Smrg   The configuration module consists of the FcConfig datatype,
50eceda581Smrg   libexpat and FcConfigParse which walks over an XML tree and
51eceda581Smrg   amends a configuration with data found within. From an external
52eceda581Smrg   perspective, configuration of the library consists of
53eceda581Smrg   generating a valid XML tree and feeding that to FcConfigParse.
54eceda581Smrg   The only other mechanism provided to applications for changing
55eceda581Smrg   the running configuration is to add fonts and directories to
56eceda581Smrg   the list of application-provided font files.
57eceda581Smrg
58eceda581Smrg   The intent is to make font configurations relatively static,
59eceda581Smrg   and shared by as many applications as possible. It is hoped
60eceda581Smrg   that this will lead to more stable font selection when passing
61eceda581Smrg   names from one application to another. XML was chosen as a
62eceda581Smrg   configuration file format because it provides a format which is
63eceda581Smrg   easy for external agents to edit while retaining the correct
64ca08ab68Smrg   structure and syntax.
65a6844aabSmrg
66eceda581Smrg   Font configuration is separate from font matching; applications
67eceda581Smrg   needing to do their own matching can access the available fonts
68eceda581Smrg   from the library and perform private matching. The intent is to
69eceda581Smrg   permit applications to pick and choose appropriate
70eceda581Smrg   functionality from the library instead of forcing them to
71eceda581Smrg   choose between this library and a private configuration
72eceda581Smrg   mechanism. The hope is that this will ensure that configuration
73eceda581Smrg   of fonts for all applications can be centralized in one place.
74eceda581Smrg   Centralizing font configuration will simplify and regularize
75eceda581Smrg   font installation and customization.
76eceda581Smrg     __________________________________________________________
77eceda581Smrg
78eceda581SmrgFONT PROPERTIES
79eceda581Smrg
80eceda581Smrg   While font patterns may contain essentially any properties,
81eceda581Smrg   there are some well known properties with associated types.
82eceda581Smrg   Fontconfig uses some of these properties for font matching and
83eceda581Smrg   font completion. Others are provided as a convenience for the
84eceda581Smrg   application's rendering mechanism.
852c393a42Smrg                 Property Definitions
862c393a42Smrg
87ca08ab68Smrg    Property       C Preprocessor Symbol  Type    Description
882c393a42Smrg    ----------------------------------------------------
89ca08ab68Smrg    family         FC_FAMILY              String  Font family names
90eceda581Smrg    familylang     FC_FAMILYLANG          String  Language corresponding
91eceda581Smrg to
92ca08ab68Smrg                                                  each family name
93eceda581Smrg    style          FC_STYLE               String  Font style. Overrides
94eceda581Smrgweight
95ca08ab68Smrg                                                  and slant
96eceda581Smrg    stylelang      FC_STYLELANG           String  Language corresponding
97eceda581Smrg to
98ca08ab68Smrg                                                  each style name
99eceda581Smrg    fullname       FC_FULLNAME            String  Font face full name wh
100eceda581Smrgere
101eceda581Smrg                                                  different from family
102eceda581Smrgand
103ca08ab68Smrg                                                  family + style
104eceda581Smrg    fullnamelang   FC_FULLNAMELANG        String  Language corresponding
105eceda581Smrg to
106ca08ab68Smrg                                                  each fullname
107eceda581Smrg    slant          FC_SLANT               Int     Italic, oblique or rom
108eceda581Smrgan
109eceda581Smrg    weight         FC_WEIGHT              Int     Light, medium, demibol
110eceda581Smrgd,
111ca08ab68Smrg                                                  bold or black
112eceda581Smrg    width          FC_WIDTH               Int     Condensed, normal or e
113eceda581Smrgxpanded
114a4e54154Smrg    size           FC_SIZE                Double  Point size
115eceda581Smrg    aspect         FC_ASPECT              Double  Stretches glyphs horiz
116eceda581Smrgontally
117ca08ab68Smrg                                                  before hinting
118ca08ab68Smrg    pixelsize      FC_PIXEL_SIZE          Double  Pixel size
119eceda581Smrg    spacing        FC_SPACING             Int     Proportional, dual-wid
120eceda581Smrgth,
121ca08ab68Smrg                                                  monospace or charcell
122ca08ab68Smrg    foundry        FC_FOUNDRY             String  Font foundry name
123ca08ab68Smrg    antialias      FC_ANTIALIAS           Bool    Whether glyphs can be
124ca08ab68Smrg                                                  antialiased
125eceda581Smrg    hintstyle      FC_HINT_STYLE          Int     Automatic hinting styl
126eceda581Smrge
127eceda581Smrg    hinting        FC_HINTING             Bool    Whether the rasterizer
128eceda581Smrg should
129ca08ab68Smrg                                                  use hinting
130ca08ab68Smrg    verticallayout FC_VERTICAL_LAYOUT     Bool    Use vertical layout
131eceda581Smrg    autohint       FC_AUTOHINT            Bool    Use autohinter instead
132eceda581Smrg of
133ca08ab68Smrg                                                  normal hinter
134eceda581Smrg    globaladvance  FC_GLOBAL_ADVANCE      Bool    Use font global advanc
135eceda581Smrge data (deprecated)
136eceda581Smrg    file           FC_FILE                String  The filename holding t
137eceda581Smrghe font
138eceda581Smrg                                                  relative to the config
139eceda581Smrg's sysroot
140eceda581Smrg    index          FC_INDEX               Int     The index of the font
141eceda581Smrgwithin
142ca08ab68Smrg                                                  the file
143eceda581Smrg    ftface         FC_FT_FACE             FT_Face Use the specified Free
144eceda581SmrgType
145ca08ab68Smrg                                                  face object
146eceda581Smrg    rasterizer     FC_RASTERIZER          String  Which rasterizer is in
147eceda581Smrg use (deprecated)
148eceda581Smrg    outline        FC_OUTLINE             Bool    Whether the glyphs are
149eceda581Smrg outlines
150eceda581Smrg    scalable       FC_SCALABLE            Bool    Whether glyphs can be
151eceda581Smrgscaled
152ca08ab68Smrg    dpi            FC_DPI                 Double  Target dots per inch
153eceda581Smrg    rgba           FC_RGBA                Int     unknown, rgb, bgr, vrg
154eceda581Smrgb,
155eceda581Smrg                                                  vbgr, none - subpixel
156eceda581Smrggeometry
157eceda581Smrg    scale          FC_SCALE               Double  Scale factor for point
158eceda581Smrg->pixel
159eceda581Smrg                                                  conversions (deprecate
160eceda581Smrgd)
161eceda581Smrg    minspace       FC_MINSPACE            Bool    Eliminate leading from
162eceda581Smrg line
163ca08ab68Smrg                                                  spacing
164eceda581Smrg    charset        FC_CHARSET             CharSet Unicode chars encoded
165eceda581Smrgby
166ca08ab68Smrg                                                  the font
167ca08ab68Smrg    lang           FC_LANG                LangSet Set of RFC-3066-style
168eceda581Smrg                                                  languages this font su
169eceda581Smrgpports
170eceda581Smrg    fontversion    FC_FONTVERSION         Int     Version number of the
171eceda581Smrgfont
172eceda581Smrg    capability     FC_CAPABILITY          String  List of layout capabil
173eceda581Smrgities in
174ca08ab68Smrg                                                  the font
175eceda581Smrg    fontformat     FC_FONTFORMAT          String  String name of the fon
176eceda581Smrgt format
177ca08ab68Smrg    embolden       FC_EMBOLDEN            Bool    Rasterizer should
178eceda581Smrg                                                  synthetically embolden
179eceda581Smrg the font
180eceda581Smrg    embeddedbitmap FC_EMBEDDED_BITMAP     Bool    Use the embedded bitma
181eceda581Smrgp instead
182953daebaSmrg                                                  of the outline
183eceda581Smrg    decorative     FC_DECORATIVE          Bool    Whether the style is a
184eceda581Smrg decorative
185953daebaSmrg                                                  variant
186a4e54154Smrg    lcdfilter      FC_LCD_FILTER          Int     Type of LCD filter
187eceda581Smrg    namelang       FC_NAMELANG            String  Language name to be us
188eceda581Smrged for the
189eceda581Smrg                                                  default value of famil
190eceda581Smrgylang,
191eceda581Smrg                                                  stylelang and fullname
192eceda581Smrglang
193eceda581Smrg    fontfeatures   FC_FONT_FEATURES       String  List of extra feature
194eceda581Smrgtags in
195a4e54154Smrg                                                  OpenType to be enabled
196eceda581Smrg    prgname        FC_PRGNAME             String  Name of the running pr
197eceda581Smrgogram
198eceda581Smrg    hash           FC_HASH                String  SHA256 hash value of t
199eceda581Smrghe font data
200eceda581Smrg                                                  with "sha256:" prefix
201eceda581Smrg(deprecated)
202eceda581Smrg    postscriptname FC_POSTSCRIPT_NAME     String  Font name in PostScrip
203eceda581Smrgt
204eceda581Smrg    symbol         FC_SYMBOL              Bool    Whether font uses MS s
205eceda581Smrgymbol-font encoding
206eceda581Smrg    color          FC_COLOR               Bool    Whether any glyphs hav
207eceda581Smrge color
208eceda581Smrg    fontvariations FC_FONT_VARIATIONS     String  comma-separated string
209eceda581Smrg of axes in variable font
210eceda581Smrg    variable       FC_VARIABLE            Bool    Whether font is Variab
211eceda581Smrgle Font
212eceda581Smrg    fonthashint    FC_FONT_HAS_HINT       Bool    Whether font has hinti
213eceda581Smrgng
214eceda581Smrg    order          FC_ORDER               Int     Order number of the fo
215eceda581Smrgnt
216eceda581Smrg     __________________________________________________________
217a6844aabSmrg
218a6844aabSmrgDatatypes
2192c393a42Smrg
220eceda581Smrg   Fontconfig uses abstract data types to hide internal
221eceda581Smrg   implementation details for most data structures. A few
222eceda581Smrg   structures are exposed where appropriate.
223eceda581Smrg     __________________________________________________________
2242c393a42Smrg
225eceda581SmrgFcChar8, FcChar16, FcChar32, FcBool
2262c393a42Smrg
227eceda581Smrg   These are primitive data types; the FcChar* types hold
228eceda581Smrg   precisely the number of bits stated (if supported by the C
229eceda581Smrg   implementation). FcBool holds one of two C preprocessor
230eceda581Smrg   symbols: FcFalse or FcTrue.
231eceda581Smrg     __________________________________________________________
232a6844aabSmrg
233eceda581SmrgFcMatrix
234a6844aabSmrg
235eceda581Smrg   An FcMatrix holds an affine transformation, usually used to
236eceda581Smrg   reshape glyphs. A small set of matrix operations are provided
237eceda581Smrg   to manipulate these.
238eceda581Smrg        typedef struct _FcMatrix {
239eceda581Smrg                double xx, xy, yx, yy;
240eceda581Smrg        } FcMatrix;
241eceda581Smrg     __________________________________________________________
242a6844aabSmrg
243eceda581SmrgFcCharSet
244a6844aabSmrg
245eceda581Smrg   An FcCharSet is an abstract type that holds the set of encoded
246eceda581Smrg   Unicode chars in a font. Operations to build and compare these
247eceda581Smrg   sets are provided.
248eceda581Smrg     __________________________________________________________
2492c393a42Smrg
250eceda581SmrgFcLangSet
2512c393a42Smrg
252eceda581Smrg   An FcLangSet is an abstract type that holds the set of
253eceda581Smrg   languages supported by a font. Operations to build and compare
254eceda581Smrg   these sets are provided. These are computed for a font based on
255eceda581Smrg   orthographic information built into the fontconfig library.
256eceda581Smrg   Fontconfig has orthographies for all of the ISO 639-1 languages
257eceda581Smrg   except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA.
258eceda581Smrg   If you have orthographic information for any of these
259eceda581Smrg   languages, please submit them.
260eceda581Smrg     __________________________________________________________
2612c393a42Smrg
262eceda581SmrgFcLangResult
263a32e9e42Smrg
264eceda581Smrg   An FcLangResult is an enumeration used to return the results of
265eceda581Smrg   comparing two language strings or FcLangSet objects.
266eceda581Smrg   FcLangEqual means the objects match language and territory.
267eceda581Smrg   FcLangDifferentTerritory means the objects match in language
268eceda581Smrg   but differ in territory. FcLangDifferentLang means the objects
269eceda581Smrg   differ in language.
270eceda581Smrg     __________________________________________________________
271a32e9e42Smrg
272eceda581SmrgFcType
2732c393a42Smrg
274ca08ab68Smrg   Tags the kind of data stored in an FcValue.
275eceda581Smrg     __________________________________________________________
276eceda581Smrg
277eceda581SmrgFcValue
278eceda581Smrg
279eceda581Smrg   An FcValue object holds a single value with one of a number of
280eceda581Smrg   different types. The 'type' tag indicates which member is
281eceda581Smrg   valid.
282eceda581Smrg        typedef struct _FcValue {
283eceda581Smrg                FcType type;
284eceda581Smrg                union {
285eceda581Smrg                        const FcChar8 *s;
286eceda581Smrg                        int i;
287eceda581Smrg                        FcBool b;
288eceda581Smrg                        double d;
289eceda581Smrg                        const FcMatrix *m;
290eceda581Smrg                        const FcCharSet *c;
291eceda581Smrg                        void *f;
292eceda581Smrg                        const FcLangSet *l;
293eceda581Smrg                        const FcRange   *r;
294eceda581Smrg                } u;
295eceda581Smrg        } FcValue;
296eceda581Smrg
297eceda581Smrg                  FcValue Members
298eceda581Smrg
299eceda581Smrg        Type            Union member    Datatype
300eceda581Smrg        --------------------------------
301eceda581Smrg        FcTypeVoid      (none)          (none)
302eceda581Smrg        FcTypeInteger   i               int
303eceda581Smrg        FcTypeDouble    d               double
304eceda581Smrg        FcTypeString    s               FcChar8 *
305eceda581Smrg        FcTypeBool      b               b
306eceda581Smrg        FcTypeMatrix    m               FcMatrix *
307eceda581Smrg        FcTypeCharSet   c               FcCharSet *
308eceda581Smrg        FcTypeFTFace    f               void * (FT_Face)
309eceda581Smrg        FcTypeLangSet   l               FcLangSet *
310eceda581Smrg        FcTypeRange     r               FcRange *
311eceda581Smrg     __________________________________________________________
312eceda581Smrg
313eceda581SmrgFcPattern, FcPatternIter
314eceda581Smrg
315eceda581Smrg   An FcPattern holds a set of names with associated value lists;
316eceda581Smrg   each name refers to a property of a font. FcPatterns are used
317eceda581Smrg   as inputs to the matching code as well as holding information
318eceda581Smrg   about specific fonts. Each property can hold one or more
319eceda581Smrg   values; conventionally all of the same type, although the
320eceda581Smrg   interface doesn't demand that. An FcPatternIter is used during
321eceda581Smrg   iteration to access properties in FcPattern.
322eceda581Smrg     __________________________________________________________
323eceda581Smrg
324eceda581SmrgFcFontSet
325eceda581Smrg
326eceda581Smrg        typedef struct _FcFontSet {
327eceda581Smrg                int nfont;
328eceda581Smrg                int sfont;
329eceda581Smrg                FcPattern **fonts;
330eceda581Smrg        } FcFontSet;
331eceda581Smrg
332eceda581Smrg   An FcFontSet contains a list of FcPatterns. Internally
333eceda581Smrg   fontconfig uses this data structure to hold sets of fonts.
334eceda581Smrg   Externally, fontconfig returns the results of listing fonts in
335eceda581Smrg   this format. 'nfont' holds the number of patterns in the
336eceda581Smrg   'fonts' array; 'sfont' is used to indicate the size of that
337eceda581Smrg   array.
338eceda581Smrg     __________________________________________________________
339eceda581Smrg
340eceda581SmrgFcStrSet, FcStrList
341eceda581Smrg
342eceda581Smrg   FcStrSet holds a list of strings that can be appended to and
343eceda581Smrg   enumerated. Its unique characteristic is that the enumeration
344eceda581Smrg   works even while strings are appended during enumeration.
345eceda581Smrg   FcStrList is used during enumeration to safely and correctly
346eceda581Smrg   walk the list of strings even while that list is edited in the
347eceda581Smrg   middle of enumeration.
348eceda581Smrg     __________________________________________________________
349eceda581Smrg
350eceda581SmrgFcObjectSet
351eceda581Smrg
352eceda581Smrg        typedef struct _FcObjectSet {
353eceda581Smrg                int nobject;
354eceda581Smrg                int sobject;
355eceda581Smrg                const char **objects;
356eceda581Smrg        } FcObjectSet;
357eceda581Smrg
358eceda581Smrg   holds a set of names and is used to specify which fields from
359eceda581Smrg   fonts are placed in the the list of returned patterns when
360eceda581Smrg   listing fonts.
361eceda581Smrg     __________________________________________________________
362eceda581Smrg
363eceda581SmrgFcObjectType
364eceda581Smrg
365eceda581Smrg        typedef struct _FcObjectType {
366eceda581Smrg                const char *object;
367eceda581Smrg                FcType type;
368eceda581Smrg        } FcObjectType;
369eceda581Smrg
370eceda581Smrg   marks the type of a pattern element generated when parsing font
371eceda581Smrg   names. Applications can add new object types so that font names
372eceda581Smrg   may contain the new elements.
373eceda581Smrg     __________________________________________________________
374eceda581Smrg
375eceda581SmrgFcConstant
376eceda581Smrg
377eceda581Smrg        typedef struct _FcConstant {
378eceda581Smrg            const FcChar8 *name;
379eceda581Smrg            const char *object;
380eceda581Smrg            int value;
381eceda581Smrg        } FcConstant;
382eceda581Smrg
383eceda581Smrg   Provides for symbolic constants for new pattern elements. When
384eceda581Smrg   'name' is seen in a font name, an 'object' element is created
385eceda581Smrg   with value 'value'.
386eceda581Smrg     __________________________________________________________
387eceda581Smrg
388eceda581SmrgFcBlanks
389eceda581Smrg
390eceda581Smrg   holds a list of Unicode chars which are expected to be blank;
391eceda581Smrg   unexpectedly blank chars are assumed to be invalid and are
392eceda581Smrg   elided from the charset associated with the font.
393eceda581Smrg
394eceda581Smrg   FcBlanks is deprecated and should not be used in newly written
395eceda581Smrg   code. It is still accepted by some functions for compatibility
396eceda581Smrg   with older code but will be removed in the future.
397eceda581Smrg     __________________________________________________________
398eceda581Smrg
399eceda581SmrgFcFileCache
400eceda581Smrg
401eceda581Smrg   holds the per-user cache information for use while loading the
402eceda581Smrg   font database. This is built automatically for the current
403eceda581Smrg   configuration when that is loaded. Applications must always
404eceda581Smrg   pass '0' when one is requested.
405eceda581Smrg     __________________________________________________________
406eceda581Smrg
407eceda581SmrgFcConfig
408eceda581Smrg
409eceda581Smrg   holds a complete configuration of the library; there is one
410eceda581Smrg   default configuration, other can be constructed from XML data
411eceda581Smrg   structures. All public entry points that need global data can
412eceda581Smrg   take an optional FcConfig* argument; passing 0 uses the default
413eceda581Smrg   configuration. FcConfig objects hold two sets of fonts, the
414eceda581Smrg   first contains those specified by the configuration, the second
415eceda581Smrg   set holds those added by the application at run-time.
416eceda581Smrg   Interfaces that need to reference a particular set use one of
417ca08ab68Smrg   the FcSetName enumerated values.
418eceda581Smrg     __________________________________________________________
419eceda581Smrg
420eceda581SmrgFcSetName
421eceda581Smrg
422eceda581Smrg   Specifies one of the two sets of fonts available in a
423eceda581Smrg   configuration; FcSetSystem for those fonts specified in the
424eceda581Smrg   configuration and FcSetApplication which holds fonts provided
425eceda581Smrg   by the application.
426eceda581Smrg     __________________________________________________________
427eceda581Smrg
428eceda581SmrgFcResult
429eceda581Smrg
430eceda581Smrg   Used as a return type for functions manipulating FcPattern
431eceda581Smrg   objects.
432eceda581Smrg      FcResult Values
433eceda581Smrg        Result Code             Meaning
434eceda581Smrg        -----------------------------------------------------------
435eceda581Smrg        FcResultMatch           Object exists with the specified ID
436eceda581Smrg        FcResultNoMatch         Object doesn't exist at all
437eceda581Smrg        FcResultTypeMismatch    Object exists, but the type doesn't matc
438eceda581Smrgh
439eceda581Smrg        FcResultNoId            Object exists, but has fewer values
440eceda581Smrg                                than specified
441eceda581Smrg        FcResultOutOfMemory     malloc failed
442eceda581Smrg     __________________________________________________________
443eceda581Smrg
444eceda581SmrgFcAtomic
445eceda581Smrg
446eceda581Smrg   Used for locking access to configuration files. Provides a safe
447eceda581Smrg   way to update configuration files.
448eceda581Smrg     __________________________________________________________
449eceda581Smrg
450eceda581SmrgFcCache
451eceda581Smrg
452eceda581Smrg   Holds information about the fonts contained in a single
453eceda581Smrg   directory. Normal applications need not worry about this as
454eceda581Smrg   caches for font access are automatically managed by the
455eceda581Smrg   library. Applications dealing with cache management may want to
456eceda581Smrg   use some of these objects in their work, however the included
457eceda581Smrg   'fc-cache' program generally suffices for all of that.
458eceda581Smrg     __________________________________________________________
4592c393a42Smrg
460a6844aabSmrgFUNCTIONS
4612c393a42Smrg
462eceda581Smrg   These are grouped by functionality, often using the main data
463eceda581Smrg   type being manipulated.
464eceda581Smrg     __________________________________________________________
4652c393a42Smrg
466eceda581SmrgInitialization
467a6844aabSmrg
468ca08ab68Smrg   Table of Contents
469eceda581Smrg   FcInitLoadConfig -- load configuration
470eceda581Smrg   FcInitLoadConfigAndFonts -- load configuration and font data
471eceda581Smrg   FcInit -- initialize fontconfig library
472eceda581Smrg   FcFini -- finalize fontconfig library
473eceda581Smrg   FcGetVersion -- library version number
474eceda581Smrg   FcInitReinitialize -- re-initialize library
475eceda581Smrg   FcInitBringUptoDate -- reload configuration files if needed
476a6844aabSmrg
477eceda581Smrg   These functions provide some control over how the library is
478eceda581Smrg   initialized.
479a32e9e42Smrg
480eceda581SmrgFcInitLoadConfig
4812c393a42Smrg
4822c393a42SmrgName
4832c393a42Smrg
484eceda581Smrg   FcInitLoadConfig -- load configuration
4852c393a42Smrg
4862c393a42SmrgSynopsis
4872c393a42Smrg
488eceda581Smrg#include <fontconfig/fontconfig.h>
489a6844aabSmrg
490ca08ab68Smrg   FcConfig * FcInitLoadConfig(void);
4912c393a42Smrg
4922c393a42SmrgDescription
4932c393a42Smrg
494ca08ab68Smrg   Loads the default configuration file and returns the resulting
495ca08ab68Smrg   configuration. Does not load any font information.
4962c393a42Smrg
497eceda581SmrgFcInitLoadConfigAndFonts
4982c393a42Smrg
4992c393a42SmrgName
5002c393a42Smrg
501eceda581Smrg   FcInitLoadConfigAndFonts -- load configuration and font data
5022c393a42Smrg
5032c393a42SmrgSynopsis
5042c393a42Smrg
505eceda581Smrg#include <fontconfig/fontconfig.h>
506a6844aabSmrg
507ca08ab68Smrg   FcConfig * FcInitLoadConfigAndFonts(void);
5082c393a42Smrg
5092c393a42SmrgDescription
5102c393a42Smrg
511eceda581Smrg   Loads the default configuration file and builds information
512eceda581Smrg   about the available fonts. Returns the resulting configuration.
5132c393a42Smrg
514eceda581SmrgFcInit
5152c393a42Smrg
5162c393a42SmrgName
5172c393a42Smrg
518eceda581Smrg   FcInit -- initialize fontconfig library
5192c393a42Smrg
5202c393a42SmrgSynopsis
5212c393a42Smrg
522eceda581Smrg#include <fontconfig/fontconfig.h>
523a6844aabSmrg
524ca08ab68Smrg   FcBool FcInit(void);
5252c393a42Smrg
5262c393a42SmrgDescription
5272c393a42Smrg
528eceda581Smrg   Loads the default configuration file and the fonts referenced
529eceda581Smrg   therein and sets the default configuration to that result.
530eceda581Smrg   Returns whether this process succeeded or not. If the default
531eceda581Smrg   configuration has already been loaded, this routine does
532eceda581Smrg   nothing and returns FcTrue.
5332c393a42Smrg
534eceda581SmrgFcFini
5352c393a42Smrg
5362c393a42SmrgName
5372c393a42Smrg
538eceda581Smrg   FcFini -- finalize fontconfig library
5392c393a42Smrg
5402c393a42SmrgSynopsis
5412c393a42Smrg
542eceda581Smrg#include <fontconfig/fontconfig.h>
543a6844aabSmrg
544ca08ab68Smrg   void FcFini(void);
5452c393a42Smrg
5462c393a42SmrgDescription
5472c393a42Smrg
548eceda581Smrg   Frees all data structures allocated by previous calls to
549eceda581Smrg   fontconfig functions. Fontconfig returns to an uninitialized
550eceda581Smrg   state, requiring a new call to one of the FcInit functions
551eceda581Smrg   before any other fontconfig function may be called.
5522c393a42Smrg
553eceda581SmrgFcGetVersion
5542c393a42Smrg
5552c393a42SmrgName
5562c393a42Smrg
557eceda581Smrg   FcGetVersion -- library version number
5582c393a42Smrg
5592c393a42SmrgSynopsis
5602c393a42Smrg
561eceda581Smrg#include <fontconfig/fontconfig.h>
562a6844aabSmrg
563ca08ab68Smrg   int FcGetVersion(void);
5642c393a42Smrg
5652c393a42SmrgDescription
5662c393a42Smrg
567ca08ab68Smrg   Returns the version number of the library.
5682c393a42Smrg
569eceda581SmrgFcInitReinitialize
5702c393a42Smrg
5712c393a42SmrgName
5722c393a42Smrg
573eceda581Smrg   FcInitReinitialize -- re-initialize library
5742c393a42Smrg
5752c393a42SmrgSynopsis
5762c393a42Smrg
577eceda581Smrg#include <fontconfig/fontconfig.h>
578a6844aabSmrg
579ca08ab68Smrg   FcBool FcInitReinitialize(void);
5802c393a42Smrg
5812c393a42SmrgDescription
5822c393a42Smrg
583eceda581Smrg   Forces the default configuration file to be reloaded and resets
584eceda581Smrg   the default configuration. Returns FcFalse if the configuration
585eceda581Smrg   cannot be reloaded (due to configuration file errors,
586eceda581Smrg   allocation failures or other issues) and leaves the existing
587eceda581Smrg   configuration unchanged. Otherwise returns FcTrue.
5882c393a42Smrg
589eceda581SmrgFcInitBringUptoDate
5902c393a42Smrg
5912c393a42SmrgName
5922c393a42Smrg
593eceda581Smrg   FcInitBringUptoDate -- reload configuration files if needed
5942c393a42Smrg
5952c393a42SmrgSynopsis
5962c393a42Smrg
597eceda581Smrg#include <fontconfig/fontconfig.h>
598a6844aabSmrg
599ca08ab68Smrg   FcBool FcInitBringUptoDate(void);
6002c393a42Smrg
6012c393a42SmrgDescription
6022c393a42Smrg
603eceda581Smrg   Checks the rescan interval in the default configuration,
604eceda581Smrg   checking the configuration if the interval has passed and
605eceda581Smrg   reloading the configuration if when any changes are detected.
606eceda581Smrg   Returns FcFalse if the configuration cannot be reloaded (see
607eceda581Smrg   FcInitReinitialize). Otherwise returns FcTrue.
608eceda581Smrg     __________________________________________________________
609ca08ab68Smrg
610eceda581SmrgFcPattern
611ca08ab68Smrg
612ca08ab68Smrg   Table of Contents
613eceda581Smrg   FcPatternCreate -- Create a pattern
614eceda581Smrg   FcPatternDuplicate -- Copy a pattern
615eceda581Smrg   FcPatternReference -- Increment pattern reference count
616eceda581Smrg   FcPatternDestroy -- Destroy a pattern
617eceda581Smrg   FcPatternObjectCount -- Returns the number of the object
618eceda581Smrg   FcPatternEqual -- Compare patterns
619eceda581Smrg   FcPatternEqualSubset -- Compare portions of patterns
620eceda581Smrg   FcPatternFilter -- Filter the objects of pattern
621eceda581Smrg   FcPatternHash -- Compute a pattern hash value
622eceda581Smrg   FcPatternAdd -- Add a value to a pattern
623eceda581Smrg   FcPatternAddWeak -- Add a value to a pattern with weak binding
624eceda581Smrg   FcPatternAdd-Type -- Add a typed value to a pattern
625eceda581Smrg   FcPatternGetWithBinding -- Return a value with binding from a
626eceda581Smrg          pattern
627ca08ab68Smrg
628eceda581Smrg   FcPatternGet -- Return a value from a pattern
629eceda581Smrg   FcPatternGet-Type -- Return a typed value from a pattern
630eceda581Smrg   FcPatternBuild -- Create patterns from arguments
631eceda581Smrg   FcPatternDel -- Delete a property from a pattern
632eceda581Smrg   FcPatternRemove -- Remove one object of the specified type from
633eceda581Smrg          the pattern
634a32e9e42Smrg
635eceda581Smrg   FcPatternIterStart -- Initialize the iterator with the first
636eceda581Smrg          iterator in the pattern
637a32e9e42Smrg
638eceda581Smrg   FcPatternIterNext --
639eceda581Smrg   FcPatternIterEqual -- Compare iterators
640eceda581Smrg   FcPatternFindIter -- Set the iterator to point to the object in
641eceda581Smrg          the pattern
642a32e9e42Smrg
643eceda581Smrg   FcPatternIterIsValid -- Check whether the iterator is valid or
644eceda581Smrg          not
645a32e9e42Smrg
646eceda581Smrg   FcPatternIterGetObject -- Returns an object name which the
647eceda581Smrg          iterator point to
648a32e9e42Smrg
649eceda581Smrg   FcPatternIterValueCount -- Returns the number of the values
650eceda581Smrg          which the iterator point to
651a32e9e42Smrg
652eceda581Smrg   FcPatternIterGetValue -- Returns a value which the iterator
653eceda581Smrg          point to
654a32e9e42Smrg
655eceda581Smrg   FcPatternPrint -- Print a pattern for debugging
656eceda581Smrg   FcDefaultSubstitute -- Perform default substitutions in a
657eceda581Smrg          pattern
658a32e9e42Smrg
659eceda581Smrg   FcNameParse -- Parse a pattern string
660eceda581Smrg   FcNameUnparse -- Convert a pattern back into a string that can
661eceda581Smrg          be parsed
662a32e9e42Smrg
663eceda581Smrg   FcPatternFormat -- Format a pattern into a string according to
664eceda581Smrg          a format specifier
665a32e9e42Smrg
666eceda581Smrg   An FcPattern is an opaque type that holds both patterns to
667eceda581Smrg   match against the available fonts, as well as the information
668eceda581Smrg   about each font.
669a32e9e42Smrg
670eceda581SmrgFcPatternCreate
6712c393a42Smrg
6722c393a42SmrgName
6732c393a42Smrg
674eceda581Smrg   FcPatternCreate -- Create a pattern
6752c393a42Smrg
6762c393a42SmrgSynopsis
6772c393a42Smrg
678eceda581Smrg#include <fontconfig/fontconfig.h>
679a6844aabSmrg
680ca08ab68Smrg   FcPattern * FcPatternCreate(void);
6812c393a42Smrg
6822c393a42SmrgDescription
6832c393a42Smrg
684eceda581Smrg   Creates a pattern with no properties; used to build patterns
685eceda581Smrg   from scratch.
6862c393a42Smrg
687eceda581SmrgFcPatternDuplicate
6882c393a42Smrg
6892c393a42SmrgName
6902c393a42Smrg
691eceda581Smrg   FcPatternDuplicate -- Copy a pattern
6922c393a42Smrg
6932c393a42SmrgSynopsis
6942c393a42Smrg
695eceda581Smrg#include <fontconfig/fontconfig.h>
696a6844aabSmrg
697ca08ab68Smrg   FcPattern * FcPatternDuplicate(const FcPattern *p);
6982c393a42Smrg
6992c393a42SmrgDescription
7002c393a42Smrg
701eceda581Smrg   Copy a pattern, returning a new pattern that matches p. Each
702eceda581Smrg   pattern may be modified without affecting the other.
7032c393a42Smrg
704eceda581SmrgFcPatternReference
7052c393a42Smrg
7062c393a42SmrgName
7072c393a42Smrg
708eceda581Smrg   FcPatternReference -- Increment pattern reference count
7092c393a42Smrg
7102c393a42SmrgSynopsis
7112c393a42Smrg
712eceda581Smrg#include <fontconfig/fontconfig.h>
713a6844aabSmrg
714ca08ab68Smrg   void FcPatternReference(FcPattern *p);
7152c393a42Smrg
7162c393a42SmrgDescription
7172c393a42Smrg
718eceda581Smrg   Add another reference to p. Patterns are freed only when the
719eceda581Smrg   reference count reaches zero.
7202c393a42Smrg
721eceda581SmrgFcPatternDestroy
7222c393a42Smrg
7232c393a42SmrgName
7242c393a42Smrg
725eceda581Smrg   FcPatternDestroy -- Destroy a pattern
7262c393a42Smrg
7272c393a42SmrgSynopsis
7282c393a42Smrg
729eceda581Smrg#include <fontconfig/fontconfig.h>
730a6844aabSmrg
731ca08ab68Smrg   void FcPatternDestroy(FcPattern *p);
7322c393a42Smrg
7332c393a42SmrgDescription
7342c393a42Smrg
735eceda581Smrg   Decrement the pattern reference count. If all references are
736eceda581Smrg   gone, destroys the pattern, in the process destroying all
737eceda581Smrg   related values.
738a32e9e42Smrg
739eceda581SmrgFcPatternObjectCount
740a32e9e42Smrg
741a32e9e42SmrgName
742a32e9e42Smrg
743eceda581Smrg   FcPatternObjectCount -- Returns the number of the object
744a32e9e42Smrg
745a32e9e42SmrgSynopsis
746a32e9e42Smrg
747eceda581Smrg#include <fontconfig/fontconfig.h>
748a32e9e42Smrg
749a32e9e42Smrg   int FcPatternObjectCount(const FcPattern *p);
750a32e9e42Smrg
751a32e9e42SmrgDescription
752a32e9e42Smrg
753a32e9e42Smrg   Returns the number of the object p has.
754a32e9e42Smrg
755a32e9e42SmrgSince
756a32e9e42Smrg
757a32e9e42Smrg   version 2.13.1
7582c393a42Smrg
759eceda581SmrgFcPatternEqual
7602c393a42Smrg
7612c393a42SmrgName
7622c393a42Smrg
763eceda581Smrg   FcPatternEqual -- Compare patterns
7642c393a42Smrg
7652c393a42SmrgSynopsis
7662c393a42Smrg
767eceda581Smrg#include <fontconfig/fontconfig.h>
768a32e9e42Smrg
769eceda581Smrg   FcBool FcPatternEqual(const FcPattern *pa, const FcPattern
770eceda581Smrg   *pb);
7712c393a42Smrg
7722c393a42SmrgDescription
7732c393a42Smrg
774ca08ab68Smrg   Returns whether pa and pb are exactly alike.
7752c393a42Smrg
776eceda581SmrgFcPatternEqualSubset
7772c393a42Smrg
7782c393a42SmrgName
7792c393a42Smrg
780eceda581Smrg   FcPatternEqualSubset -- Compare portions of patterns
7812c393a42Smrg
7822c393a42SmrgSynopsis
7832c393a42Smrg
784eceda581Smrg#include <fontconfig/fontconfig.h>
785a6844aabSmrg
786eceda581Smrg   FcBool FcPatternEqualSubset(const FcPattern *pa, const
787eceda581Smrg   FcPattern *pb, const FcObjectSet *os);
7882c393a42Smrg
7892c393a42SmrgDescription
7902c393a42Smrg
791eceda581Smrg   Returns whether pa and pb have exactly the same values for all
792eceda581Smrg   of the objects in os.
7932c393a42Smrg
794eceda581SmrgFcPatternFilter
795a6844aabSmrg
796a6844aabSmrgName
797a6844aabSmrg
798eceda581Smrg   FcPatternFilter -- Filter the objects of pattern
799a6844aabSmrg
800a6844aabSmrgSynopsis
801a6844aabSmrg
802eceda581Smrg#include <fontconfig/fontconfig.h>
803a32e9e42Smrg
804eceda581Smrg   FcPattern * FcPatternFilter(FcPattern *p, const FcObjectSet
805eceda581Smrg   *os);
806a6844aabSmrg
807a6844aabSmrgDescription
808a6844aabSmrg
809eceda581Smrg   Returns a new pattern that only has those objects from p that
810eceda581Smrg   are in os. If os is NULL, a duplicate of p is returned.
811a6844aabSmrg
812eceda581SmrgFcPatternHash
8132c393a42Smrg
8142c393a42SmrgName
8152c393a42Smrg
816eceda581Smrg   FcPatternHash -- Compute a pattern hash value
8172c393a42Smrg
8182c393a42SmrgSynopsis
8192c393a42Smrg
820eceda581Smrg#include <fontconfig/fontconfig.h>
821a6844aabSmrg
822ca08ab68Smrg   FcChar32 FcPatternHash(const FcPattern *p);
8232c393a42Smrg
8242c393a42SmrgDescription
8252c393a42Smrg
826eceda581Smrg   Returns a 32-bit number which is the same for any two patterns
827eceda581Smrg   which are equal.
8282c393a42Smrg
829eceda581SmrgFcPatternAdd
8302c393a42Smrg
8312c393a42SmrgName
8322c393a42Smrg
833eceda581Smrg   FcPatternAdd -- Add a value to a pattern
8342c393a42Smrg
8352c393a42SmrgSynopsis
8362c393a42Smrg
837eceda581Smrg#include <fontconfig/fontconfig.h>
8382c393a42Smrg
839eceda581Smrg   FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue
840eceda581Smrg   value, FcBool append);
8412c393a42Smrg
8422c393a42SmrgDescription
8432c393a42Smrg
844eceda581Smrg   Adds a single value to the list of values associated with the
845eceda581Smrg   property named `object. If `append is FcTrue, the value is
846eceda581Smrg   added at the end of any existing list, otherwise it is inserted
847eceda581Smrg   at the beginning. `value' is saved (with FcValueSave) when
848eceda581Smrg   inserted into the pattern so that the library retains no
849eceda581Smrg   reference to any application-supplied data structure.
8502c393a42Smrg
851eceda581SmrgFcPatternAddWeak
8522c393a42Smrg
8532c393a42SmrgName
8542c393a42Smrg
855eceda581Smrg   FcPatternAddWeak -- Add a value to a pattern with weak binding
8562c393a42Smrg
8572c393a42SmrgSynopsis
8582c393a42Smrg
859eceda581Smrg#include <fontconfig/fontconfig.h>
860a6844aabSmrg
861eceda581Smrg   FcBool FcPatternAddWeak(FcPattern *p, const char *object,
862eceda581Smrg   FcValue value, FcBool append);
8632c393a42Smrg
8642c393a42SmrgDescription
8652c393a42Smrg
866eceda581Smrg   FcPatternAddWeak is essentially the same as FcPatternAdd except
867eceda581Smrg   that any values added to the list have binding weak instead of
868eceda581Smrg   strong.
8692c393a42Smrg
870eceda581SmrgFcPatternAdd-Type
8712c393a42Smrg
8722c393a42SmrgName
8732c393a42Smrg
874ca08ab68Smrg   FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString,
875ca08ab68Smrg   FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool,
876eceda581Smrg   FcPatternAddFTFace, FcPatternAddLangSet,
877eceda581Smrg   FcPatternAddRange -- Add a typed value to a pattern
8782c393a42Smrg
8792c393a42SmrgSynopsis
8802c393a42Smrg
881eceda581Smrg#include <fontconfig/fontconfig.h>
882a32e9e42Smrg
883eceda581Smrg   FcBool FcPatternAddInteger(FcPattern *p, const char *object,
884eceda581Smrg   int i);
8852c393a42Smrg
886eceda581Smrg   FcBool FcPatternAddDouble(FcPattern *p, const char *object,
887eceda581Smrg   double d);
8882c393a42Smrg
889eceda581Smrg   FcBool FcPatternAddString(FcPattern *p, const char *object,
890eceda581Smrg   const FcChar8 *s);
891a6844aabSmrg
892eceda581Smrg   FcBool FcPatternAddMatrix(FcPattern *p, const char *object,
893eceda581Smrg   const FcMatrix *m);
8942c393a42Smrg
895eceda581Smrg   FcBool FcPatternAddCharSet(FcPattern *p, const char *object,
896eceda581Smrg   const FcCharSet *c);
8972c393a42Smrg
898eceda581Smrg   FcBool FcPatternAddBool(FcPattern *p, const char *object,
899eceda581Smrg   FcBool b);
9002c393a42Smrg
901eceda581Smrg   FcBool FcPatternAddFTFace(FcPattern *p, const char *object,
902eceda581Smrg   const FT_Facef);
9032c393a42Smrg
904eceda581Smrg   FcBool FcPatternAddLangSet(FcPattern *p, const char *object,
905eceda581Smrg   const FcLangSet *l);
9062c393a42Smrg
907eceda581Smrg   FcBool FcPatternAddRange(FcPattern *p, const char *object,
908eceda581Smrg   const FcRange *r);
9092c393a42Smrg
9102c393a42SmrgDescription
9112c393a42Smrg
912eceda581Smrg   These are all convenience functions that insert objects of the
913eceda581Smrg   specified type into the pattern. Use these in preference to
914eceda581Smrg   FcPatternAdd as they will provide compile-time typechecking.
915eceda581Smrg   These all append values to any existing list of values.
916eceda581Smrg   FcPatternAddRange are available since 2.11.91.
9172c393a42Smrg
918eceda581SmrgFcPatternGetWithBinding
9192c393a42Smrg
9202c393a42SmrgName
9212c393a42Smrg
922eceda581Smrg   FcPatternGetWithBinding -- Return a value with binding from a
923eceda581Smrg   pattern
9242c393a42Smrg
9252c393a42SmrgSynopsis
9262c393a42Smrg
927eceda581Smrg#include <fontconfig/fontconfig.h>
928a32e9e42Smrg
929eceda581Smrg   FcResult FcPatternGetWithBinding(FcPattern *p, const char
930eceda581Smrg   *object, int id, FcValue *v, FcValueBinding *b);
9312c393a42Smrg
9322c393a42SmrgDescription
9332c393a42Smrg
934eceda581Smrg   Returns in v the id'th value and b binding for that associated
935eceda581Smrg   with the property object. The Value returned is not a copy, but
936eceda581Smrg   rather refers to the data stored within the pattern directly.
937eceda581Smrg   Applications must not free this value.
938a32e9e42Smrg
939a32e9e42SmrgSince
940a32e9e42Smrg
941a32e9e42Smrg   version 2.12.5
9422c393a42Smrg
943eceda581SmrgFcPatternGet
944a32e9e42Smrg
945a32e9e42SmrgName
946a32e9e42Smrg
947eceda581Smrg   FcPatternGet -- Return a value from a pattern
948a32e9e42Smrg
949a32e9e42SmrgSynopsis
950a32e9e42Smrg
951eceda581Smrg#include <fontconfig/fontconfig.h>
952a32e9e42Smrg
953eceda581Smrg   FcResult FcPatternGet(FcPattern *p, const char *object, int id,
954eceda581Smrg   FcValue *v);
955a32e9e42Smrg
956a32e9e42SmrgDescription
957a32e9e42Smrg
958eceda581Smrg   Returns in v the id'th value associated with the property
959eceda581Smrg   object. The value returned is not a copy, but rather refers to
960eceda581Smrg   the data stored within the pattern directly. Applications must
961eceda581Smrg   not free this value.
962a32e9e42Smrg
963eceda581SmrgFcPatternGet-Type
9642c393a42Smrg
9652c393a42SmrgName
9662c393a42Smrg
967ca08ab68Smrg   FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString,
968ca08ab68Smrg   FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool,
969eceda581Smrg   FcPatternGetFTFace, FcPatternGetLangSet,
970eceda581Smrg   FcPatternGetRange -- Return a typed value from a pattern
9712c393a42Smrg
9722c393a42SmrgSynopsis
9732c393a42Smrg
974eceda581Smrg#include <fontconfig/fontconfig.h>
9752c393a42Smrg
976eceda581Smrg   FcResult FcPatternGetInteger(FcPattern *p, const char *object,
977eceda581Smrg   int n, int *i);
9782c393a42Smrg
979eceda581Smrg   FcResult FcPatternGetDouble(FcPattern *p, const char *object,
980eceda581Smrg   int n, double *d);
981a6844aabSmrg
982eceda581Smrg   FcResult FcPatternGetString(FcPattern *p, const char *object,
983eceda581Smrg   int n, FcChar8 **s);
9842c393a42Smrg
985eceda581Smrg   FcResult FcPatternGetMatrix(FcPattern *p, const char *object,
986eceda581Smrg   int n, FcMatrix **s);
9872c393a42Smrg
988eceda581Smrg   FcResult FcPatternGetCharSet(FcPattern *p, const char *object,
989eceda581Smrg   int n, FcCharSet **c);
9902c393a42Smrg
991eceda581Smrg   FcResult FcPatternGetBool(FcPattern *p, const char *object, int
992eceda581Smrg   n, FcBool *b);
9932c393a42Smrg
994eceda581Smrg   FcResult FcPatternGetFTFace(FcPattern *p, const char *object,
995eceda581Smrg   int n, FT_Face *f);
9962c393a42Smrg
997eceda581Smrg   FcResult FcPatternGetLangSet(FcPattern *p, const char *object,
998eceda581Smrg   int n, FcLangSet **l);
9992c393a42Smrg
1000eceda581Smrg   FcResult FcPatternGetRange(FcPattern *p, const char *object,
1001eceda581Smrg   int n, FcRange **r);
10022c393a42Smrg
10032c393a42SmrgDescription
10042c393a42Smrg
1005eceda581Smrg   These are convenience functions that call FcPatternGet and
1006eceda581Smrg   verify that the returned data is of the expected type. They
1007eceda581Smrg   return FcResultTypeMismatch if this is not the case. Note that
1008eceda581Smrg   these (like FcPatternGet) do not make a copy of any data
1009eceda581Smrg   structure referenced by the return value. Use these in
1010eceda581Smrg   preference to FcPatternGet to provide compile-time
1011eceda581Smrg   typechecking. FcPatternGetRange are available since 2.11.91.
10122c393a42Smrg
1013eceda581SmrgFcPatternBuild
10142c393a42Smrg
10152c393a42SmrgName
10162c393a42Smrg
1017eceda581Smrg   FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create
1018eceda581Smrg   patterns from arguments
10192c393a42Smrg
10202c393a42SmrgSynopsis
10212c393a42Smrg
1022eceda581Smrg#include <fontconfig/fontconfig.h>
10232c393a42Smrg
1024ca08ab68Smrg   FcPattern * FcPatternBuild(FcPattern *pattern, ...);
10252c393a42Smrg
1026ca08ab68Smrg   FcPattern * FcPatternVaBuild(FcPattern *pattern, va_list va);
1027a6844aabSmrg
1028eceda581Smrg   void FcPatternVapBuild(FcPattern *result, FcPattern *pattern,
1029eceda581Smrg   va_list va);
10302c393a42Smrg
10312c393a42SmrgDescription
10322c393a42Smrg
1033eceda581Smrg   Builds a pattern using a list of objects, types and values.
1034eceda581Smrg   Each value to be entered in the pattern is specified with three
1035eceda581Smrg   arguments:
10362c393a42Smrg
1037eceda581Smrg    1. Object name, a string describing the property to be added.
1038eceda581Smrg    2. Object type, one of the FcType enumerated values
1039eceda581Smrg    3. Value, not an FcValue, but the raw type as passed to any of
1040eceda581Smrg       the FcPatternAdd<type> functions. Must match the type of
1041eceda581Smrg       the second argument.
10422c393a42Smrg
1043eceda581Smrg   The argument list is terminated by a null object name, no
1044eceda581Smrg   object type nor value need be passed for this. The values are
1045eceda581Smrg   added to `pattern', if `pattern' is null, a new pattern is
1046eceda581Smrg   created. In either case, the pattern is returned. Example
1047eceda581Smrgpattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *)
1048eceda581Smrg0);
1049a6844aabSmrg
1050eceda581Smrg   FcPatternVaBuild is used when the arguments are already in the
1051eceda581Smrg   form of a varargs value. FcPatternVapBuild is a macro version
1052eceda581Smrg   of FcPatternVaBuild which returns its result directly in the
1053eceda581Smrg   result variable.
1054a32e9e42Smrg
1055eceda581SmrgFcPatternDel
10562c393a42Smrg
10572c393a42SmrgName
10582c393a42Smrg
1059eceda581Smrg   FcPatternDel -- Delete a property from a pattern
10602c393a42Smrg
10612c393a42SmrgSynopsis
10622c393a42Smrg
1063eceda581Smrg#include <fontconfig/fontconfig.h>
1064a6844aabSmrg
1065ca08ab68Smrg   FcBool FcPatternDel(FcPattern *p, const char *object);
10662c393a42Smrg
10672c393a42SmrgDescription
10682c393a42Smrg
1069eceda581Smrg   Deletes all values associated with the property `object',
1070eceda581Smrg   returning whether the property existed or not.
1071a32e9e42Smrg
1072eceda581SmrgFcPatternRemove
1073a32e9e42Smrg
1074a32e9e42SmrgName
1075a32e9e42Smrg
1076eceda581Smrg   FcPatternRemove -- Remove one object of the specified type from
1077eceda581Smrg   the pattern
1078a32e9e42Smrg
1079a32e9e42SmrgSynopsis
1080a32e9e42Smrg
1081eceda581Smrg#include <fontconfig/fontconfig.h>
1082a32e9e42Smrg
1083eceda581Smrg   FcBool FcPatternRemove(FcPattern *p, const char *object, int
1084eceda581Smrg   id);
1085a32e9e42Smrg
1086a32e9e42SmrgDescription
1087a32e9e42Smrg
1088eceda581Smrg   Removes the value associated with the property `object' at
1089eceda581Smrg   position `id', returning whether the property existed and had a
1090eceda581Smrg   value at that position or not.
10912c393a42Smrg
1092eceda581SmrgFcPatternIterStart
10932c393a42Smrg
10942c393a42SmrgName
10952c393a42Smrg
1096eceda581Smrg   FcPatternIterStart -- Initialize the iterator with the first
1097eceda581Smrg   iterator in the pattern
10982c393a42Smrg
10992c393a42SmrgSynopsis
11002c393a42Smrg
1101eceda581Smrg#include <fontconfig/fontconfig.h>
1102a32e9e42Smrg
1103eceda581Smrg   void FcPatternIterStart(const FcPattern *p, FcPatternIter
1104eceda581Smrg   *iter);
11052c393a42Smrg
11062c393a42SmrgDescription
11072c393a42Smrg
1108eceda581Smrg   Initialize iter with the first iterator in p. If there are no
1109eceda581Smrg   objects in p, iter will not have any valid data.
1110a32e9e42Smrg
1111a32e9e42SmrgSince
1112a32e9e42Smrg
1113a32e9e42Smrg   version 2.13.1
11142c393a42Smrg
1115eceda581SmrgFcPatternIterNext
11162c393a42Smrg
11172c393a42SmrgName
11182c393a42Smrg
1119eceda581Smrg   FcPatternIterNext --
11202c393a42Smrg
11212c393a42SmrgSynopsis
11222c393a42Smrg
1123eceda581Smrg#include <fontconfig/fontconfig.h>
1124a6844aabSmrg
1125eceda581Smrg   FcBool FcPatternIterNext(const FcPattern *p, FcPatternIter
1126eceda581Smrg   *iter);
11272c393a42Smrg
11282c393a42SmrgDescription
11292c393a42Smrg
1130eceda581Smrg   Set iter to point to the next object in p and returns FcTrue if
1131eceda581Smrg   iter has been changed to the next object. returns FcFalse
1132eceda581Smrg   otherwise.
11332c393a42Smrg
1134a32e9e42SmrgSince
1135a32e9e42Smrg
1136a32e9e42Smrg   version 2.13.1
1137a32e9e42Smrg
1138eceda581SmrgFcPatternIterEqual
11392c393a42Smrg
11402c393a42SmrgName
11412c393a42Smrg
1142eceda581Smrg   FcPatternIterEqual -- Compare iterators
1143a32e9e42Smrg
1144a32e9e42SmrgSynopsis
1145a32e9e42Smrg
1146eceda581Smrg#include <fontconfig/fontconfig.h>
1147a32e9e42Smrg
1148eceda581Smrg   FcBool FcPatternIterEqual(const FcPattern *p1, FcPatternIter
1149eceda581Smrg   *i1, const FcPattern *p2, FcPatternIter *i2);
1150a32e9e42Smrg
1151a32e9e42SmrgDescription
1152a32e9e42Smrg
1153eceda581Smrg   Return FcTrue if both i1 and i2 point to same object and
1154eceda581Smrg   contains same values. return FcFalse otherwise.
1155a32e9e42Smrg
1156a32e9e42SmrgSince
1157a32e9e42Smrg
1158a32e9e42Smrg   version 2.13.1
1159a32e9e42Smrg
1160eceda581SmrgFcPatternFindIter
1161a32e9e42Smrg
1162a32e9e42SmrgName
1163a32e9e42Smrg
1164eceda581Smrg   FcPatternFindIter -- Set the iterator to point to the object in
1165eceda581Smrg   the pattern
11662c393a42Smrg
11672c393a42SmrgSynopsis
11682c393a42Smrg
1169eceda581Smrg#include <fontconfig/fontconfig.h>
1170a32e9e42Smrg
1171eceda581Smrg   FcBool FcPatternFindIter(const FcPattern *p, FcPatternIter
1172eceda581Smrg   *iter, const char *object);
1173a32e9e42Smrg
1174a32e9e42SmrgDescription
1175a32e9e42Smrg
1176eceda581Smrg   Set iter to point to object in p if any and returns FcTrue.
1177eceda581Smrg   returns FcFalse otherwise.
1178a32e9e42Smrg
1179a32e9e42SmrgSince
1180a32e9e42Smrg
1181a32e9e42Smrg   version 2.13.1
1182a32e9e42Smrg
1183eceda581SmrgFcPatternIterIsValid
1184a32e9e42Smrg
1185a32e9e42SmrgName
1186a32e9e42Smrg
1187eceda581Smrg   FcPatternIterIsValid -- Check whether the iterator is valid or
1188eceda581Smrg   not
1189a32e9e42Smrg
1190a32e9e42SmrgSynopsis
1191a32e9e42Smrg
1192eceda581Smrg#include <fontconfig/fontconfig.h>
1193a32e9e42Smrg
1194eceda581Smrg   FcBool FcPatternIterIsValid(const FcPattern *p, FcPatternIter
1195eceda581Smrg   :iter);
1196a32e9e42Smrg
1197a32e9e42SmrgDescription
1198a32e9e42Smrg
1199eceda581Smrg   Returns FcTrue if iter point to the valid entry in p. returns
1200eceda581Smrg   FcFalse otherwise.
1201a32e9e42Smrg
1202a32e9e42SmrgSince
1203a32e9e42Smrg
1204a32e9e42Smrg   version 2.13.1
1205a32e9e42Smrg
1206eceda581SmrgFcPatternIterGetObject
1207a32e9e42Smrg
1208a32e9e42SmrgName
1209a32e9e42Smrg
1210eceda581Smrg   FcPatternIterGetObject -- Returns an object name which the
1211eceda581Smrg   iterator point to
1212a32e9e42Smrg
1213a32e9e42SmrgSynopsis
1214a32e9e42Smrg
1215eceda581Smrg#include <fontconfig/fontconfig.h>
1216a32e9e42Smrg
1217eceda581Smrg   const char * FcPatternIterGetObject(const FcPattern *p,
1218eceda581Smrg   FcPatternIter *iter);
1219a32e9e42Smrg
1220a32e9e42SmrgDescription
1221a32e9e42Smrg
1222eceda581Smrg   Returns an object name in p which iter point to. returns NULL
1223eceda581Smrg   if iter isn't valid.
1224a32e9e42Smrg
1225a32e9e42SmrgSince
1226a32e9e42Smrg
1227a32e9e42Smrg   version 2.13.1
1228a32e9e42Smrg
1229eceda581SmrgFcPatternIterValueCount
1230a32e9e42Smrg
1231a32e9e42SmrgName
1232a32e9e42Smrg
1233eceda581Smrg   FcPatternIterValueCount -- Returns the number of the values
1234eceda581Smrg   which the iterator point to
1235a32e9e42Smrg
1236a32e9e42SmrgSynopsis
1237a32e9e42Smrg
1238eceda581Smrg#include <fontconfig/fontconfig.h>
1239a32e9e42Smrg
1240eceda581Smrg   int FcPatternIterValueCount(const FcPattern *p, FcPatternIter
1241eceda581Smrg   *iter);
1242a32e9e42Smrg
1243a32e9e42SmrgDescription
1244a32e9e42Smrg
1245eceda581Smrg   Returns the number of the values in the object which iter point
1246eceda581Smrg   to. if iter isn't valid, returns 0.
1247a32e9e42Smrg
1248a32e9e42SmrgSince
1249a32e9e42Smrg
1250a32e9e42Smrg   version 2.13.1
1251a32e9e42Smrg
1252eceda581SmrgFcPatternIterGetValue
1253a32e9e42Smrg
1254a32e9e42SmrgName
1255a32e9e42Smrg
1256eceda581Smrg   FcPatternIterGetValue -- Returns a value which the iterator
1257eceda581Smrg   point to
1258a32e9e42Smrg
1259a32e9e42SmrgSynopsis
1260a32e9e42Smrg
1261eceda581Smrg#include <fontconfig/fontconfig.h>
1262a32e9e42Smrg
1263eceda581Smrg   FcResult FcPatternIterGetValue(const FcPattern *p,
1264eceda581Smrg   FcPatternIter *iter, intid, FcValue *v, FcValueBinding *b);
1265a32e9e42Smrg
1266a32e9e42SmrgDescription
1267a32e9e42Smrg
1268eceda581Smrg   Returns in v the id'th value which iter point to. also binding
1269eceda581Smrg   to b if given. The value returned is not a copy, but rather
1270eceda581Smrg   refers to the data stored within the pattern directly.
1271eceda581Smrg   Applications must not free this value.
1272a32e9e42Smrg
1273a32e9e42SmrgSince
1274a32e9e42Smrg
1275a32e9e42Smrg   version 2.13.1
1276a32e9e42Smrg
1277eceda581SmrgFcPatternPrint
1278a32e9e42Smrg
1279a32e9e42SmrgName
1280a32e9e42Smrg
1281eceda581Smrg   FcPatternPrint -- Print a pattern for debugging
1282a32e9e42Smrg
1283a32e9e42SmrgSynopsis
1284a32e9e42Smrg
1285eceda581Smrg#include <fontconfig/fontconfig.h>
1286a32e9e42Smrg
1287a32e9e42Smrg   void FcPatternPrint(const FcPattern *p);
1288a32e9e42Smrg
1289a32e9e42SmrgDescription
1290a32e9e42Smrg
1291eceda581Smrg   Prints an easily readable version of the pattern to stdout.
1292eceda581Smrg   There is no provision for reparsing data in this format, it's
1293eceda581Smrg   just for diagnostics and debugging.
1294a32e9e42Smrg
1295eceda581SmrgFcDefaultSubstitute
1296a32e9e42Smrg
1297a32e9e42SmrgName
1298a32e9e42Smrg
1299eceda581Smrg   FcDefaultSubstitute -- Perform default substitutions in a
1300eceda581Smrg   pattern
1301a32e9e42Smrg
1302a32e9e42SmrgSynopsis
1303a32e9e42Smrg
1304eceda581Smrg#include <fontconfig/fontconfig.h>
1305a6844aabSmrg
1306ca08ab68Smrg   void FcDefaultSubstitute(FcPattern *pattern);
13072c393a42Smrg
13082c393a42SmrgDescription
13092c393a42Smrg
1310ca08ab68Smrg   Supplies default values for underspecified font patterns:
1311a6844aabSmrg
1312eceda581Smrg     * Patterns without a specified style or weight are set to
1313eceda581Smrg       Medium
1314eceda581Smrg     * Patterns without a specified style or slant are set to
1315eceda581Smrg       Roman
1316eceda581Smrg     * Patterns without a specified pixel size are given one
1317eceda581Smrg       computed from any specified point size (default 12), dpi
1318eceda581Smrg       (default 75) and scale (default 1).
13192c393a42Smrg
1320eceda581SmrgFcNameParse
13212c393a42Smrg
13222c393a42SmrgName
13232c393a42Smrg
1324eceda581Smrg   FcNameParse -- Parse a pattern string
13252c393a42Smrg
13262c393a42SmrgSynopsis
13272c393a42Smrg
1328eceda581Smrg#include <fontconfig/fontconfig.h>
1329a6844aabSmrg
1330ca08ab68Smrg   FcPattern * FcNameParse(const FcChar8 *name);
13312c393a42Smrg
13322c393a42SmrgDescription
13332c393a42Smrg
1334eceda581Smrg   Converts name from the standard text format described above
1335eceda581Smrg   into a pattern.
13362c393a42Smrg
1337eceda581SmrgFcNameUnparse
13382c393a42Smrg
13392c393a42SmrgName
13402c393a42Smrg
1341eceda581Smrg   FcNameUnparse -- Convert a pattern back into a string that can
1342eceda581Smrg   be parsed
13432c393a42Smrg
13442c393a42SmrgSynopsis
13452c393a42Smrg
1346eceda581Smrg#include <fontconfig/fontconfig.h>
1347a6844aabSmrg
1348ca08ab68Smrg   FcChar8 * FcNameUnparse(FcPattern *pat);
13492c393a42Smrg
13502c393a42SmrgDescription
13512c393a42Smrg
1352eceda581Smrg   Converts the given pattern into the standard text format
1353eceda581Smrg   described above. The return value is not static, but instead
1354eceda581Smrg   refers to newly allocated memory which should be freed by the
1355eceda581Smrg   caller using free().
1356eceda581Smrg
1357eceda581SmrgFcPatternFormat
1358eceda581Smrg
1359eceda581SmrgName
1360eceda581Smrg
1361eceda581Smrg   FcPatternFormat -- Format a pattern into a string according to
1362eceda581Smrg   a format specifier
1363eceda581Smrg
1364eceda581SmrgSynopsis
1365eceda581Smrg
1366eceda581Smrg#include <fontconfig/fontconfig.h>
1367eceda581Smrg
1368eceda581Smrg   FcChar8 * FcPatternFormat(FcPattern *pat, const FcChar8
1369eceda581Smrg   *format);
1370eceda581Smrg
1371eceda581SmrgDescription
1372eceda581Smrg
1373eceda581Smrg   Converts given pattern pat into text described by the format
1374eceda581Smrg   specifier format. The return value refers to newly allocated
1375eceda581Smrg   memory which should be freed by the caller using free(), or
1376eceda581Smrg   NULL if format is invalid.
1377eceda581Smrg
1378eceda581Smrg   The format is loosely modeled after printf-style format string.
1379eceda581Smrg   The format string is composed of zero or more directives:
1380eceda581Smrg   ordinary characters (not "%"), which are copied unchanged to
1381eceda581Smrg   the output stream; and tags which are interpreted to construct
1382eceda581Smrg   text from the pattern in a variety of ways (explained below).
1383eceda581Smrg   Special characters can be escaped using backslash. C-string
1384eceda581Smrg   style special characters like \n and \r are also supported
1385eceda581Smrg   (this is useful when the format string is not a C string
1386eceda581Smrg   literal). It is advisable to always escape curly braces that
1387eceda581Smrg   are meant to be copied to the output as ordinary characters.
1388eceda581Smrg
1389eceda581Smrg   Each tag is introduced by the character "%", followed by an
1390eceda581Smrg   optional minimum field width, followed by tag contents in curly
1391eceda581Smrg   braces ({}). If the minimum field width value is provided the
1392eceda581Smrg   tag will be expanded and the result padded to achieve the
1393eceda581Smrg   minimum width. If the minimum field width is positive, the
1394eceda581Smrg   padding will right-align the text. Negative field width will
1395eceda581Smrg   left-align. The rest of this section describes various
1396eceda581Smrg   supported tag contents and their expansion.
1397eceda581Smrg
1398eceda581Smrg   A simple tag is one where the content is an identifier. When
1399eceda581Smrg   simple tags are expanded, the named identifier will be looked
1400eceda581Smrg   up in pattern and the resulting list of values returned, joined
1401eceda581Smrg   together using comma. For example, to print the family name and
1402eceda581Smrg   style of the pattern, use the format "%{family} %{style}\n". To
1403eceda581Smrg   extend the family column to forty characters use
1404eceda581Smrg   "%-40{family}%{style}\n".
1405eceda581Smrg
1406eceda581Smrg   Simple tags expand to list of all values for an element. To
1407eceda581Smrg   only choose one of the values, one can index using the syntax
1408eceda581Smrg   "%{elt[idx]}". For example, to get the first family name only,
1409eceda581Smrg   use "%{family[0]}".
1410eceda581Smrg
1411eceda581Smrg   If a simple tag ends with "=" and the element is found in the
1412eceda581Smrg   pattern, the name of the element followed by "=" will be output
1413eceda581Smrg   before the list of values. For example, "%{weight=}" may expand
1414eceda581Smrg   to the string "weight=80". Or to the empty string if pattern
1415eceda581Smrg   does not have weight set.
1416eceda581Smrg
1417eceda581Smrg   If a simple tag starts with ":" and the element is found in the
1418eceda581Smrg   pattern, ":" will be printed first. For example, combining this
1419eceda581Smrg   with the =, the format "%{:weight=}" may expand to ":weight=80"
1420eceda581Smrg   or to the empty string if pattern does not have weight set.
1421eceda581Smrg
1422eceda581Smrg   If a simple tag contains the string ":-", the rest of the the
1423eceda581Smrg   tag contents will be used as a default string. The default
1424eceda581Smrg   string is output if the element is not found in the pattern.
1425eceda581Smrg   For example, the format "%{:weight=:-123}" may expand to
1426eceda581Smrg   ":weight=80" or to the string ":weight=123" if pattern does not
1427eceda581Smrg   have weight set.
1428eceda581Smrg
1429eceda581Smrg   A count tag is one that starts with the character "#" followed
1430eceda581Smrg   by an element name, and expands to the number of values for the
1431eceda581Smrg   element in the pattern. For example, "%{#family}" expands to
1432eceda581Smrg   the number of family names pattern has set, which may be zero.
1433eceda581Smrg
1434eceda581Smrg   A sub-expression tag is one that expands a sub-expression. The
1435eceda581Smrg   tag contents are the sub-expression to expand placed inside
1436eceda581Smrg   another set of curly braces. Sub-expression tags are useful for
1437eceda581Smrg   aligning an entire sub-expression, or to apply converters
1438eceda581Smrg   (explained later) to the entire sub-expression output. For
1439eceda581Smrg   example, the format "%40{{%{family} %{style}}}" expands the
1440eceda581Smrg   sub-expression to construct the family name followed by the
1441eceda581Smrg   style, then takes the entire string and pads it on the left to
1442eceda581Smrg   be at least forty characters.
1443eceda581Smrg
1444eceda581Smrg   A filter-out tag is one starting with the character "-"
1445eceda581Smrg   followed by a comma-separated list of element names, followed
1446eceda581Smrg   by a sub-expression enclosed in curly braces. The
1447eceda581Smrg   sub-expression will be expanded but with a pattern that has the
1448eceda581Smrg   listed elements removed from it. For example, the format
1449eceda581Smrg   "%{-size,pixelsize{sub-expr}}" will expand "sub-expr" with
1450eceda581Smrg   pattern sans the size and pixelsize elements.
1451eceda581Smrg
1452eceda581Smrg   A filter-in tag is one starting with the character "+" followed
1453eceda581Smrg   by a comma-separated list of element names, followed by a
1454eceda581Smrg   sub-expression enclosed in curly braces. The sub-expression
1455eceda581Smrg   will be expanded but with a pattern that only has the listed
1456eceda581Smrg   elements from the surrounding pattern. For example, the format
1457eceda581Smrg   "%{+family,familylang{sub-expr}}" will expand "sub-expr" with a
1458eceda581Smrg   sub-pattern consisting only the family and family lang elements
1459eceda581Smrg   of pattern.
1460eceda581Smrg
1461eceda581Smrg   A conditional tag is one starting with the character "?"
1462eceda581Smrg   followed by a comma-separated list of element conditions,
1463eceda581Smrg   followed by two sub-expression enclosed in curly braces. An
1464eceda581Smrg   element condition can be an element name, in which case it
1465eceda581Smrg   tests whether the element is defined in pattern, or the
1466eceda581Smrg   character "!" followed by an element name, in which case the
1467eceda581Smrg   test is negated. The conditional passes if all the element
1468eceda581Smrg   conditions pass. The tag expands the first sub-expression if
1469eceda581Smrg   the conditional passes, and expands the second sub-expression
1470eceda581Smrg   otherwise. For example, the format
1471eceda581Smrg   "%{?size,dpi,!pixelsize{pass}{fail}}" will expand to "pass" if
1472eceda581Smrg   pattern has size and dpi elements but no pixelsize element, and
1473eceda581Smrg   to "fail" otherwise.
1474eceda581Smrg
1475eceda581Smrg   An enumerate tag is one starting with the string "[]" followed
1476eceda581Smrg   by a comma-separated list of element names, followed by a
1477eceda581Smrg   sub-expression enclosed in curly braces. The list of values for
1478eceda581Smrg   the named elements are walked in parallel and the
1479eceda581Smrg   sub-expression expanded each time with a pattern just having a
1480eceda581Smrg   single value for those elements, starting from the first value
1481eceda581Smrg   and continuing as long as any of those elements has a value.
1482ca08ab68Smrg   For example, the format "%{[]family,familylang{%{family}
1483eceda581Smrg   (%{familylang})\n}}" will expand the pattern "%{family}
1484eceda581Smrg   (%{familylang})\n" with a pattern having only the first value
1485eceda581Smrg   of the family and familylang elements, then expands it with the
1486eceda581Smrg   second values, then the third, etc.
1487a6844aabSmrg
1488eceda581Smrg   As a special case, if an enumerate tag has only one element,
1489eceda581Smrg   and that element has only one value in the pattern, and that
1490eceda581Smrg   value is of type FcLangSet, the individual languages in the
1491eceda581Smrg   language set are enumerated.
1492a6844aabSmrg
1493eceda581Smrg   A builtin tag is one starting with the character "=" followed
1494eceda581Smrg   by a builtin name. The following builtins are defined:
1495a6844aabSmrg
1496ca08ab68Smrg   unparse
1497eceda581Smrg          Expands to the result of calling FcNameUnparse() on the
1498eceda581Smrg          pattern.
1499a6844aabSmrg
1500ca08ab68Smrg   fcmatch
1501eceda581Smrg          Expands to the output of the default output format of
1502eceda581Smrg          the fc-match command on the pattern, without the final
1503eceda581Smrg          newline.
1504a6844aabSmrg
1505ca08ab68Smrg   fclist
1506eceda581Smrg          Expands to the output of the default output format of
1507eceda581Smrg          the fc-list command on the pattern, without the final
1508eceda581Smrg          newline.
1509a6844aabSmrg
1510ca08ab68Smrg   fccat
1511eceda581Smrg          Expands to the output of the default output format of
1512eceda581Smrg          the fc-cat command on the pattern, without the final
1513eceda581Smrg          newline.
1514a6844aabSmrg
1515ca08ab68Smrg   pkgkit
1516eceda581Smrg          Expands to the list of PackageKit font() tags for the
1517eceda581Smrg          pattern. Currently this includes tags for each family
1518eceda581Smrg          name, and each language from the pattern, enumerated and
1519eceda581Smrg          sanitized into a set of tags terminated by newline.
1520eceda581Smrg          Package management systems can use these tags to tag
1521eceda581Smrg          their packages accordingly.
1522eceda581Smrg
1523eceda581Smrg   For example, the format "%{+family,style{%{=unparse}}}\n" will
1524eceda581Smrg   expand to an unparsed name containing only the family and style
1525eceda581Smrg   element values from pattern.
1526eceda581Smrg
1527eceda581Smrg   The contents of any tag can be followed by a set of zero or
1528eceda581Smrg   more converters. A converter is specified by the character "|"
1529eceda581Smrg   followed by the converter name and arguments. The following
1530eceda581Smrg   converters are defined:
1531a6844aabSmrg
1532ca08ab68Smrg   basename
1533eceda581Smrg          Replaces text with the results of calling
1534eceda581Smrg          FcStrBasename() on it.
1535a6844aabSmrg
1536ca08ab68Smrg   dirname
1537eceda581Smrg          Replaces text with the results of calling FcStrDirname()
1538eceda581Smrg          on it.
1539a6844aabSmrg
1540ca08ab68Smrg   downcase
1541eceda581Smrg          Replaces text with the results of calling
1542eceda581Smrg          FcStrDowncase() on it.
1543a6844aabSmrg
1544ca08ab68Smrg   shescape
1545eceda581Smrg          Escapes text for one level of shell expansion. (Escapes
1546eceda581Smrg          single-quotes, also encloses text in single-quotes.)
1547a6844aabSmrg
1548ca08ab68Smrg   cescape
1549eceda581Smrg          Escapes text such that it can be used as part of a C
1550eceda581Smrg          string literal. (Escapes backslash and double-quotes.)
1551a6844aabSmrg
1552ca08ab68Smrg   xmlescape
1553eceda581Smrg          Escapes text such that it can be used in XML and HTML.
1554eceda581Smrg          (Escapes less-than, greater-than, and ampersand.)
1555a6844aabSmrg
1556ca08ab68Smrg   delete(chars)
1557eceda581Smrg          Deletes all occurrences of each of the characters in
1558eceda581Smrg          chars from the text. FIXME: This converter is not UTF-8
1559eceda581Smrg          aware yet.
1560a6844aabSmrg
1561ca08ab68Smrg   escape(chars)
1562eceda581Smrg          Escapes all occurrences of each of the characters in
1563eceda581Smrg          chars by prepending it by the first character in chars.
1564eceda581Smrg          FIXME: This converter is not UTF-8 aware yet.
1565a6844aabSmrg
1566ca08ab68Smrg   translate(from,to)
1567eceda581Smrg          Translates all occurrences of each of the characters in
1568eceda581Smrg          from by replacing them with their corresponding
1569eceda581Smrg          character in to. If to has fewer characters than from,
1570eceda581Smrg          it will be extended by repeating its last character.
1571eceda581Smrg          FIXME: This converter is not UTF-8 aware yet.
1572ca08ab68Smrg
1573eceda581Smrg   For example, the format "%{family|downcase|delete( )}\n" will
1574eceda581Smrg   expand to the values of the family element in pattern,
1575eceda581Smrg   lower-cased and with spaces removed.
15762c393a42Smrg
1577b09479dcSmrgSince
15782c393a42Smrg
1579b09479dcSmrg   version 2.9.0
1580eceda581Smrg     __________________________________________________________
1581ca08ab68Smrg
1582eceda581SmrgFcFontSet
1583ca08ab68Smrg
1584ca08ab68Smrg   Table of Contents
1585eceda581Smrg   FcFontSetCreate -- Create a font set
1586eceda581Smrg   FcFontSetDestroy -- Destroy a font set
1587eceda581Smrg   FcFontSetAdd -- Add to a font set
1588eceda581Smrg   FcFontSetList -- List fonts from a set of font sets
1589eceda581Smrg   FcFontSetMatch -- Return the best font from a set of font sets
1590eceda581Smrg   FcFontSetPrint -- Print a set of patterns to stdout
1591eceda581Smrg   FcFontSetSort -- Add to a font set
1592eceda581Smrg   FcFontSetSortDestroy -- DEPRECATED destroy a font set
1593ca08ab68Smrg
1594eceda581Smrg   An FcFontSet simply holds a list of patterns; these are used to
1595eceda581Smrg   return the results of listing available fonts.
1596a32e9e42Smrg
1597eceda581SmrgFcFontSetCreate
15982c393a42Smrg
15992c393a42SmrgName
16002c393a42Smrg
1601eceda581Smrg   FcFontSetCreate -- Create a font set
16022c393a42Smrg
16032c393a42SmrgSynopsis
16042c393a42Smrg
1605eceda581Smrg#include <fontconfig/fontconfig.h>
1606a6844aabSmrg
1607ca08ab68Smrg   FcFontSet * FcFontSetCreate(void);
16082c393a42Smrg
16092c393a42SmrgDescription
16102c393a42Smrg
1611ca08ab68Smrg   Creates an empty font set.
16122c393a42Smrg
1613eceda581SmrgFcFontSetDestroy
16142c393a42Smrg
16152c393a42SmrgName
16162c393a42Smrg
1617eceda581Smrg   FcFontSetDestroy -- Destroy a font set
16182c393a42Smrg
16192c393a42SmrgSynopsis
16202c393a42Smrg
1621eceda581Smrg#include <fontconfig/fontconfig.h>
1622a6844aabSmrg
1623ca08ab68Smrg   void FcFontSetDestroy(FcFontSet *s);
16242c393a42Smrg
16252c393a42SmrgDescription
16262c393a42Smrg
1627eceda581Smrg   Destroys a font set. Note that this destroys any referenced
1628eceda581Smrg   patterns as well.
16292c393a42Smrg
1630eceda581SmrgFcFontSetAdd
16312c393a42Smrg
16322c393a42SmrgName
16332c393a42Smrg
1634eceda581Smrg   FcFontSetAdd -- Add to a font set
16352c393a42Smrg
16362c393a42SmrgSynopsis
16372c393a42Smrg
1638eceda581Smrg#include <fontconfig/fontconfig.h>
1639a6844aabSmrg
1640ca08ab68Smrg   FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font);
16412c393a42Smrg
16422c393a42SmrgDescription
16432c393a42Smrg
1644eceda581Smrg   Adds a pattern to a font set. Note that the pattern is not
1645eceda581Smrg   copied before being inserted into the set. Returns FcFalse if
1646eceda581Smrg   the pattern cannot be inserted into the set (due to allocation
1647eceda581Smrg   failure). Otherwise returns FcTrue.
16482c393a42Smrg
1649eceda581SmrgFcFontSetList
16502c393a42Smrg
16512c393a42SmrgName
16522c393a42Smrg
1653eceda581Smrg   FcFontSetList -- List fonts from a set of font sets
16542c393a42Smrg
16552c393a42SmrgSynopsis
16562c393a42Smrg
1657eceda581Smrg#include <fontconfig/fontconfig.h>
1658a6844aabSmrg
1659eceda581Smrg   FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets,
1660eceda581Smrg   intnsets, FcPattern *pattern, FcObjectSet *object_set);
16612c393a42Smrg
16622c393a42SmrgDescription
16632c393a42Smrg
1664eceda581Smrg   Selects fonts matching pattern from sets, creates patterns from
1665eceda581Smrg   those fonts containing only the objects in object_set and
1666eceda581Smrg   returns the set of unique such patterns. If config is NULL, the
1667eceda581Smrg   default configuration is checked to be up to date, and used.
16682c393a42Smrg
1669eceda581SmrgFcFontSetMatch
16702c393a42Smrg
16712c393a42SmrgName
16722c393a42Smrg
1673eceda581Smrg   FcFontSetMatch -- Return the best font from a set of font sets
16742c393a42Smrg
16752c393a42SmrgSynopsis
16762c393a42Smrg
1677eceda581Smrg#include <fontconfig/fontconfig.h>
1678a32e9e42Smrg
1679eceda581Smrg   FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets,
1680eceda581Smrg   intnsets, FcPattern *pattern, FcResult *result);
16812c393a42Smrg
16822c393a42SmrgDescription
16832c393a42Smrg
1684eceda581Smrg   Finds the font in sets most closely matching pattern and
1685eceda581Smrg   returns the result of FcFontRenderPrepare for that font and the
1686eceda581Smrg   provided pattern. This function should be called only after
1687eceda581Smrg   FcConfigSubstitute and FcDefaultSubstitute have been called for
1688eceda581Smrg   pattern; otherwise the results will not be correct. If config
1689eceda581Smrg   is NULL, the current configuration is used. Returns NULL if an
1690eceda581Smrg   error occurs during this process.
16912c393a42Smrg
1692eceda581SmrgFcFontSetPrint
16932c393a42Smrg
16942c393a42SmrgName
16952c393a42Smrg
1696eceda581Smrg   FcFontSetPrint -- Print a set of patterns to stdout
16972c393a42Smrg
16982c393a42SmrgSynopsis
16992c393a42Smrg
1700eceda581Smrg#include <fontconfig/fontconfig.h>
1701a6844aabSmrg
1702ca08ab68Smrg   void FcFontSetPrint(FcFontSet *set);
17032c393a42Smrg
17042c393a42SmrgDescription
17052c393a42Smrg
1706eceda581Smrg   This function is useful for diagnosing font related issues,
1707eceda581Smrg   printing the complete contents of every pattern in set. The
1708eceda581Smrg   format of the output is designed to be of help to users and
1709eceda581Smrg   developers, and may change at any time.
17102c393a42Smrg
1711eceda581SmrgFcFontSetSort
17122c393a42Smrg
17132c393a42SmrgName
17142c393a42Smrg
1715eceda581Smrg   FcFontSetSort -- Add to a font set
17162c393a42Smrg
17172c393a42SmrgSynopsis
17182c393a42Smrg
1719eceda581Smrg#include <fontconfig/fontconfig.h>
17202c393a42Smrg
1721eceda581Smrg   FcFontSet * FcFontSetSort(FcConfig *config, FcFontSet **sets,
1722eceda581Smrg   intnsets, FcPattern *pattern, FcBool trim, FcCharSet **csp,
1723eceda581Smrg   FcResult *result);
17242c393a42Smrg
17252c393a42SmrgDescription
17262c393a42Smrg
1727eceda581Smrg   Returns the list of fonts from sets sorted by closeness to
1728eceda581Smrg   pattern. If trim is FcTrue, elements in the list which don't
1729eceda581Smrg   include Unicode coverage not provided by earlier elements in
1730eceda581Smrg   the list are elided. The union of Unicode coverage of all of
1731eceda581Smrg   the fonts is returned in csp, if csp is not NULL. This function
1732eceda581Smrg   should be called only after FcConfigSubstitute and
1733eceda581Smrg   FcDefaultSubstitute have been called for p; otherwise the
1734eceda581Smrg   results will not be correct.
17352c393a42Smrg
1736eceda581Smrg   The returned FcFontSet references FcPattern structures which
1737eceda581Smrg   may be shared by the return value from multiple FcFontSort
1738eceda581Smrg   calls, applications cannot modify these patterns. Instead, they
1739eceda581Smrg   should be passed, along with pattern to FcFontRenderPrepare
1740eceda581Smrg   which combines them into a complete pattern.
17412c393a42Smrg
1742ca08ab68Smrg   The FcFontSet returned by FcFontSetSort is destroyed by calling
1743ca08ab68Smrg   FcFontSetDestroy.
17442c393a42Smrg
1745eceda581SmrgFcFontSetSortDestroy
17462c393a42Smrg
17472c393a42SmrgName
17482c393a42Smrg
1749eceda581Smrg   FcFontSetSortDestroy -- DEPRECATED destroy a font set
17502c393a42Smrg
17512c393a42SmrgSynopsis
17522c393a42Smrg
1753eceda581Smrg#include <fontconfig/fontconfig.h>
1754a6844aabSmrg
1755a4e54154Smrg   void FcFontSetSortDestroy(FcFontSet *set);
17562c393a42Smrg
17572c393a42SmrgDescription
17582c393a42Smrg
1759eceda581Smrg   This function is DEPRECATED. FcFontSetSortDestroy destroys set
1760eceda581Smrg   by calling FcFontSetDestroy. Applications should use
1761eceda581Smrg   FcFontSetDestroy directly instead.
1762eceda581Smrg     __________________________________________________________
1763a32e9e42Smrg
1764eceda581SmrgFcObjectSet
1765ca08ab68Smrg
1766ca08ab68Smrg   Table of Contents
1767eceda581Smrg   FcObjectSetCreate -- Create an object set
1768eceda581Smrg   FcObjectSetAdd -- Add to an object set
1769eceda581Smrg   FcObjectSetDestroy -- Destroy an object set
1770eceda581Smrg   FcObjectSetBuild -- Build object set from args
1771ca08ab68Smrg
1772eceda581Smrg   An FcObjectSet holds a list of pattern property names; it is
1773eceda581Smrg   used to indicate which properties are to be returned in the
1774eceda581Smrg   patterns from FcFontList.
1775a32e9e42Smrg
1776eceda581SmrgFcObjectSetCreate
17772c393a42Smrg
17782c393a42SmrgName
17792c393a42Smrg
1780eceda581Smrg   FcObjectSetCreate -- Create an object set
17812c393a42Smrg
17822c393a42SmrgSynopsis
17832c393a42Smrg
1784eceda581Smrg#include <fontconfig/fontconfig.h>
1785a6844aabSmrg
1786ca08ab68Smrg   FcObjectSet * FcObjectSetCreate(void);
17872c393a42Smrg
17882c393a42SmrgDescription
17892c393a42Smrg
1790ca08ab68Smrg   Creates an empty set.
17912c393a42Smrg
1792eceda581SmrgFcObjectSetAdd
17932c393a42Smrg
17942c393a42SmrgName
17952c393a42Smrg
1796eceda581Smrg   FcObjectSetAdd -- Add to an object set
17972c393a42Smrg
17982c393a42SmrgSynopsis
17992c393a42Smrg
1800eceda581Smrg#include <fontconfig/fontconfig.h>
1801a6844aabSmrg
1802ca08ab68Smrg   FcBool FcObjectSetAdd(FcObjectSet *os, const char *object);
18032c393a42Smrg
18042c393a42SmrgDescription
18052c393a42Smrg
1806eceda581Smrg   Adds a property name to the set. Returns FcFalse if the
1807eceda581Smrg   property name cannot be inserted into the set (due to
1808eceda581Smrg   allocation failure). Otherwise returns FcTrue.
18092c393a42Smrg
1810eceda581SmrgFcObjectSetDestroy
18112c393a42Smrg
18122c393a42SmrgName
18132c393a42Smrg
1814eceda581Smrg   FcObjectSetDestroy -- Destroy an object set
18152c393a42Smrg
18162c393a42SmrgSynopsis
18172c393a42Smrg
1818eceda581Smrg#include <fontconfig/fontconfig.h>
1819a6844aabSmrg
1820ca08ab68Smrg   void FcObjectSetDestroy(FcObjectSet *os);
18212c393a42Smrg
18222c393a42SmrgDescription
18232c393a42Smrg
1824ca08ab68Smrg   Destroys an object set.
18252c393a42Smrg
1826eceda581SmrgFcObjectSetBuild
18272c393a42Smrg
18282c393a42SmrgName
18292c393a42Smrg
1830eceda581Smrg   FcObjectSetBuild, FcObjectSetVaBuild,
1831eceda581Smrg   FcObjectSetVapBuild -- Build object set from args
18322c393a42Smrg
18332c393a42SmrgSynopsis
18342c393a42Smrg
1835eceda581Smrg#include <fontconfig/fontconfig.h>
18362c393a42Smrg
1837ca08ab68Smrg   FcObjectSet * FcObjectSetBuild(const char *first, ...);
18382c393a42Smrg
1839eceda581Smrg   FcObjectSet * FcObjectSetVaBuild(const char *first, va_list
1840a32e9e42Smrg   va);
18412c393a42Smrg
1842eceda581Smrg   void FcObjectSetVapBuild(FcObjectSet *result, const char
1843eceda581Smrg   *first, va_list va);
18442c393a42Smrg
1845eceda581SmrgDescription
1846ca08ab68Smrg
1847eceda581Smrg   These build an object set from a null-terminated list of
1848eceda581Smrg   property names. FcObjectSetVapBuild is a macro version of
1849eceda581Smrg   FcObjectSetVaBuild which returns the result in the result
1850eceda581Smrg   variable directly.
1851eceda581Smrg     __________________________________________________________
1852a32e9e42Smrg
1853eceda581SmrgFreeType specific functions
1854ca08ab68Smrg
1855ca08ab68Smrg   Table of Contents
1856eceda581Smrg   FcFreeTypeCharIndex -- map Unicode to glyph id
1857eceda581Smrg   FcFreeTypeCharSet -- compute Unicode coverage
1858eceda581Smrg   FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and
1859eceda581Smrg          spacing type
1860ca08ab68Smrg
1861eceda581Smrg   FcFreeTypeQuery -- compute pattern from font file (and index)
1862eceda581Smrg   FcFreeTypeQueryAll -- compute all patterns from font file (and
1863eceda581Smrg          index)
18642c393a42Smrg
1865eceda581Smrg   FcFreeTypeQueryFace -- compute pattern from FT_Face
18662c393a42Smrg
1867eceda581Smrg   While the fontconfig library doesn't insist that FreeType be
1868eceda581Smrg   used as the rasterization mechanism for fonts, it does provide
1869eceda581Smrg   some convenience functions.
1870a32e9e42Smrg
1871eceda581SmrgFcFreeTypeCharIndex
18722c393a42Smrg
18732c393a42SmrgName
18742c393a42Smrg
1875eceda581Smrg   FcFreeTypeCharIndex -- map Unicode to glyph id
18762c393a42Smrg
18772c393a42SmrgSynopsis
18782c393a42Smrg
1879eceda581Smrg#include <fontconfig.h>
1880eceda581Smrg#include <fcfreetype.h>
1881a6844aabSmrg
1882ca08ab68Smrg   FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4);
18832c393a42Smrg
18842c393a42SmrgDescription
18852c393a42Smrg
1886eceda581Smrg   Maps a Unicode char to a glyph index. This function uses
1887eceda581Smrg   information from several possible underlying encoding tables to
1888eceda581Smrg   work around broken fonts. As a result, this function isn't
1889eceda581Smrg   designed to be used in performance sensitive areas; results
1890eceda581Smrg   from this function are intended to be cached by higher level
1891eceda581Smrg   functions.
18922c393a42Smrg
1893eceda581SmrgFcFreeTypeCharSet
18942c393a42Smrg
18952c393a42SmrgName
18962c393a42Smrg
1897eceda581Smrg   FcFreeTypeCharSet -- compute Unicode coverage
18982c393a42Smrg
18992c393a42SmrgSynopsis
19002c393a42Smrg
1901eceda581Smrg#include <fontconfig.h>
1902eceda581Smrg#include <fcfreetype.h>
1903a6844aabSmrg
1904ca08ab68Smrg   FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks);
19052c393a42Smrg
19062c393a42SmrgDescription
19072c393a42Smrg
1908eceda581Smrg   Scans a FreeType face and returns the set of encoded Unicode
1909eceda581Smrg   chars. FcBlanks is deprecated, blanks is ignored and accepted
1910eceda581Smrg   only for compatibility with older code.
1911a32e9e42Smrg
1912eceda581SmrgFcFreeTypeCharSetAndSpacing
1913a32e9e42Smrg
1914a32e9e42SmrgName
1915a32e9e42Smrg
1916eceda581Smrg   FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and
1917eceda581Smrg   spacing type
1918a32e9e42Smrg
1919a32e9e42SmrgSynopsis
1920a32e9e42Smrg
1921eceda581Smrg#include <fontconfig.h>
1922eceda581Smrg#include <fcfreetype.h>
1923a32e9e42Smrg
1924eceda581Smrg   FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks
1925eceda581Smrg   *blanks, int *spacing);
1926a32e9e42Smrg
1927a32e9e42SmrgDescription
1928a32e9e42Smrg
1929eceda581Smrg   Scans a FreeType face and returns the set of encoded Unicode
1930eceda581Smrg   chars. FcBlanks is deprecated, blanks is ignored and accepted
1931eceda581Smrg   only for compatibility with older code. spacing receives the
1932eceda581Smrg   computed spacing type of the font, one of FC_MONO for a font
1933eceda581Smrg   where all glyphs have the same width, FC_DUAL, where the font
1934eceda581Smrg   has glyphs in precisely two widths, one twice as wide as the
1935eceda581Smrg   other, or FC_PROPORTIONAL where the font has glyphs of many
1936eceda581Smrg   widths.
19372c393a42Smrg
1938eceda581SmrgFcFreeTypeQuery
19392c393a42Smrg
19402c393a42SmrgName
19412c393a42Smrg
1942eceda581Smrg   FcFreeTypeQuery -- compute pattern from font file (and index)
19432c393a42Smrg
19442c393a42SmrgSynopsis
19452c393a42Smrg
1946eceda581Smrg#include <fontconfig.h>
1947eceda581Smrg#include <fcfreetype.h>
1948a6844aabSmrg
1949eceda581Smrg   FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id,
1950eceda581Smrg   FcBlanks *blanks, int *count);
19512c393a42Smrg
19522c393a42SmrgDescription
19532c393a42Smrg
1954eceda581Smrg   Constructs a pattern representing the 'id'th face in 'file'.
1955eceda581Smrg   The number of faces in 'file' is returned in 'count'. FcBlanks
1956eceda581Smrg   is deprecated, blanks is ignored and accepted only for
1957eceda581Smrg   compatibility with older code.
19582c393a42Smrg
1959eceda581SmrgFcFreeTypeQueryAll
19602c393a42Smrg
19612c393a42SmrgName
19622c393a42Smrg
1963eceda581Smrg   FcFreeTypeQueryAll -- compute all patterns from font file (and
1964eceda581Smrg   index)
19652c393a42Smrg
19662c393a42SmrgSynopsis
19672c393a42Smrg
1968eceda581Smrg#include <fontconfig.h>
1969eceda581Smrg#include <fcfreetype.h>
1970a32e9e42Smrg
1971eceda581Smrg   unsigned int FcFreeTypeQueryAll(const FcChar8 *file, int id,
1972eceda581Smrg   FcBlanks *blanks, int *count, FcFontSet *set);
19732c393a42Smrg
19742c393a42SmrgDescription
19752c393a42Smrg
1976eceda581Smrg   Constructs patterns found in 'file'. If id is -1, then all
1977eceda581Smrg   patterns found in 'file' are added to 'set'. Otherwise, this
1978eceda581Smrg   function works exactly like FcFreeTypeQuery(). The number of
1979eceda581Smrg   faces in 'file' is returned in 'count'. The number of patterns
1980eceda581Smrg   added to 'set' is returned. FcBlanks is deprecated, blanks is
1981eceda581Smrg   ignored and accepted only for compatibility with older code.
1982a32e9e42Smrg
1983a32e9e42SmrgSince
1984a32e9e42Smrg
1985a32e9e42Smrg   version 2.12.91
19862c393a42Smrg
1987eceda581SmrgFcFreeTypeQueryFace
19882c393a42Smrg
19892c393a42SmrgName
19902c393a42Smrg
1991eceda581Smrg   FcFreeTypeQueryFace -- compute pattern from FT_Face
19922c393a42Smrg
19932c393a42SmrgSynopsis
19942c393a42Smrg
1995eceda581Smrg#include <fontconfig.h>
1996eceda581Smrg#include <fcfreetype.h>
1997a32e9e42Smrg
1998eceda581Smrg   FcPattern * FcFreeTypeQueryFace(const FT_Face face, const
1999eceda581Smrg   FcChar8 *file, int id, FcBlanks *blanks);
20002c393a42Smrg
20012c393a42SmrgDescription
20022c393a42Smrg
2003eceda581Smrg   Constructs a pattern representing 'face'. 'file' and 'id' are
2004eceda581Smrg   used solely as data for pattern elements (FC_FILE, FC_INDEX and
2005eceda581Smrg   sometimes FC_FAMILY). FcBlanks is deprecated, blanks is ignored
2006eceda581Smrg   and accepted only for compatibility with older code.
2007eceda581Smrg     __________________________________________________________
2008ca08ab68Smrg
2009eceda581SmrgFcValue
2010ca08ab68Smrg
2011ca08ab68Smrg   Table of Contents
2012eceda581Smrg   FcValueDestroy -- Free a value
2013eceda581Smrg   FcValueSave -- Copy a value
2014eceda581Smrg   FcValuePrint -- Print a value to stdout
2015eceda581Smrg   FcValueEqual -- Test two values for equality
2016ca08ab68Smrg
2017eceda581Smrg   FcValue is a structure containing a type tag and a union of all
2018eceda581Smrg   possible datatypes. The tag is an enum of type FcType and is
2019eceda581Smrg   intended to provide a measure of run-time typechecking,
2020eceda581Smrg   although that depends on careful programming.
2021a32e9e42Smrg
2022eceda581SmrgFcValueDestroy
20232c393a42Smrg
20242c393a42SmrgName
20252c393a42Smrg
2026eceda581Smrg   FcValueDestroy -- Free a value
20272c393a42Smrg
20282c393a42SmrgSynopsis
20292c393a42Smrg
2030eceda581Smrg#include <fontconfig/fontconfig.h>
2031a6844aabSmrg
2032ca08ab68Smrg   void FcValueDestroy(FcValue v);
20332c393a42Smrg
20342c393a42SmrgDescription
20352c393a42Smrg
2036ca08ab68Smrg   Frees any memory referenced by v. Values of type FcTypeString,
2037eceda581Smrg   FcTypeMatrix and FcTypeCharSet reference memory, the other
2038eceda581Smrg   types do not.
20392c393a42Smrg
2040eceda581SmrgFcValueSave
20412c393a42Smrg
20422c393a42SmrgName
20432c393a42Smrg
2044eceda581Smrg   FcValueSave -- Copy a value
20452c393a42Smrg
20462c393a42SmrgSynopsis
20472c393a42Smrg
2048eceda581Smrg#include <fontconfig/fontconfig.h>
2049a6844aabSmrg
2050ca08ab68Smrg   FcValue FcValueSave(FcValue v);
20512c393a42Smrg
20522c393a42SmrgDescription
20532c393a42Smrg
2054eceda581Smrg   Returns a copy of v duplicating any object referenced by it so
2055eceda581Smrg   that v may be safely destroyed without harming the new value.
20562c393a42Smrg
2057eceda581SmrgFcValuePrint
20582c393a42Smrg
20592c393a42SmrgName
20602c393a42Smrg
2061eceda581Smrg   FcValuePrint -- Print a value to stdout
20622c393a42Smrg
20632c393a42SmrgSynopsis
20642c393a42Smrg
2065eceda581Smrg#include <fontconfig/fontconfig.h>
2066a6844aabSmrg
2067ca08ab68Smrg   void FcValuePrint(FcValue v);
20682c393a42Smrg
20692c393a42SmrgDescription
20702c393a42Smrg
2071eceda581Smrg   Prints a human-readable representation of v to stdout. The
2072eceda581Smrg   format should not be considered part of the library
2073eceda581Smrg   specification as it may change in the future.
20742c393a42Smrg
2075eceda581SmrgFcValueEqual
20762c393a42Smrg
20772c393a42SmrgName
20782c393a42Smrg
2079eceda581Smrg   FcValueEqual -- Test two values for equality
20802c393a42Smrg
20812c393a42SmrgSynopsis
20822c393a42Smrg
2083eceda581Smrg#include <fontconfig/fontconfig.h>
2084a6844aabSmrg
2085ca08ab68Smrg   FcBool FcValueEqual(FcValue v_a, FcValue v_b);
20862c393a42Smrg
20872c393a42SmrgDescription
20882c393a42Smrg
2089eceda581Smrg   Compares two values. Integers and Doubles are compared as
2090eceda581Smrg   numbers; otherwise the two values have to be the same type to
2091eceda581Smrg   be considered equal. Strings are compared ignoring case.
2092eceda581Smrg     __________________________________________________________
2093a32e9e42Smrg
2094eceda581SmrgFcCharSet
2095ca08ab68Smrg
2096ca08ab68Smrg   Table of Contents
2097eceda581Smrg   FcCharSetCreate -- Create an empty character set
2098eceda581Smrg   FcCharSetDestroy -- Destroy a character set
2099eceda581Smrg   FcCharSetAddChar -- Add a character to a charset
2100eceda581Smrg   FcCharSetDelChar -- Add a character to a charset
2101eceda581Smrg   FcCharSetCopy -- Copy a charset
2102eceda581Smrg   FcCharSetEqual -- Compare two charsets
2103eceda581Smrg   FcCharSetIntersect -- Intersect charsets
2104eceda581Smrg   FcCharSetUnion -- Add charsets
2105eceda581Smrg   FcCharSetSubtract -- Subtract charsets
2106eceda581Smrg   FcCharSetMerge -- Merge charsets
2107eceda581Smrg   FcCharSetHasChar -- Check a charset for a char
2108eceda581Smrg   FcCharSetCount -- Count entries in a charset
2109eceda581Smrg   FcCharSetIntersectCount -- Intersect and count charsets
2110eceda581Smrg   FcCharSetSubtractCount -- Subtract and count charsets
2111eceda581Smrg   FcCharSetIsSubset -- Test for charset inclusion
2112eceda581Smrg   FcCharSetFirstPage -- Start enumerating charset contents
2113eceda581Smrg   FcCharSetNextPage -- Continue enumerating charset contents
2114eceda581Smrg   FcCharSetCoverage -- DEPRECATED return coverage for a Unicode
2115eceda581Smrg          page
2116ca08ab68Smrg
2117eceda581Smrg   FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
2118a32e9e42Smrg
2119eceda581Smrg   An FcCharSet is a boolean array indicating a set of Unicode
2120eceda581Smrg   chars. Those associated with a font are marked constant and
2121eceda581Smrg   cannot be edited. FcCharSets may be reference counted
2122eceda581Smrg   internally to reduce memory consumption; this may be visible to
2123eceda581Smrg   applications as the result of FcCharSetCopy may return it's
2124eceda581Smrg   argument, and that CharSet may remain unmodifiable.
2125a32e9e42Smrg
2126eceda581SmrgFcCharSetCreate
2127ca08ab68Smrg
2128ca08ab68SmrgName
2129ca08ab68Smrg
2130eceda581Smrg   FcCharSetCreate -- Create an empty character set
2131ca08ab68Smrg
2132ca08ab68SmrgSynopsis
2133ca08ab68Smrg
2134eceda581Smrg#include <fontconfig/fontconfig.h>
2135ca08ab68Smrg
2136ca08ab68Smrg   FcCharSet * FcCharSetCreate(void);
2137ca08ab68Smrg
2138ca08ab68SmrgDescription
2139ca08ab68Smrg
2140eceda581Smrg   FcCharSetCreate allocates and initializes a new empty character
2141eceda581Smrg   set object.
2142ca08ab68Smrg
2143eceda581SmrgFcCharSetDestroy
21442c393a42Smrg
21452c393a42SmrgName
21462c393a42Smrg
2147eceda581Smrg   FcCharSetDestroy -- Destroy a character set
21482c393a42Smrg
21492c393a42SmrgSynopsis
21502c393a42Smrg
2151eceda581Smrg#include <fontconfig/fontconfig.h>
2152a6844aabSmrg
2153ca08ab68Smrg   void FcCharSetDestroy(FcCharSet *fcs);
21542c393a42Smrg
21552c393a42SmrgDescription
21562c393a42Smrg
2157eceda581Smrg   FcCharSetDestroy decrements the reference count fcs. If the
2158eceda581Smrg   reference count becomes zero, all memory referenced is freed.
21592c393a42Smrg
2160eceda581SmrgFcCharSetAddChar
21612c393a42Smrg
21622c393a42SmrgName
21632c393a42Smrg
2164eceda581Smrg   FcCharSetAddChar -- Add a character to a charset
21652c393a42Smrg
21662c393a42SmrgSynopsis
21672c393a42Smrg
2168eceda581Smrg#include <fontconfig/fontconfig.h>
2169a6844aabSmrg
2170ca08ab68Smrg   FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4);
21712c393a42Smrg
21722c393a42SmrgDescription
21732c393a42Smrg
2174eceda581Smrg   FcCharSetAddChar adds a single Unicode char to the set,
2175eceda581Smrg   returning FcFalse on failure, either as a result of a constant
2176eceda581Smrg   set or from running out of memory.
21772c393a42Smrg
2178eceda581SmrgFcCharSetDelChar
21792c393a42Smrg
21802c393a42SmrgName
21812c393a42Smrg
2182eceda581Smrg   FcCharSetDelChar -- Add a character to a charset
21832c393a42Smrg
21842c393a42SmrgSynopsis
21852c393a42Smrg
2186eceda581Smrg#include <fontconfig/fontconfig.h>
2187a6844aabSmrg
2188ca08ab68Smrg   FcBool FcCharSetDelChar(FcCharSet *fcs, FcChar32 ucs4);
21892c393a42Smrg
21902c393a42SmrgDescription
21912c393a42Smrg
2192eceda581Smrg   FcCharSetDelChar deletes a single Unicode char from the set,
2193eceda581Smrg   returning FcFalse on failure, either as a result of a constant
2194eceda581Smrg   set or from running out of memory.
21952c393a42Smrg
2196b09479dcSmrgSince
21972c393a42Smrg
2198b09479dcSmrg   version 2.9.0
21992c393a42Smrg
2200eceda581SmrgFcCharSetCopy
22012c393a42Smrg
22022c393a42SmrgName
22032c393a42Smrg
2204eceda581Smrg   FcCharSetCopy -- Copy a charset
22052c393a42Smrg
22062c393a42SmrgSynopsis
22072c393a42Smrg
2208eceda581Smrg#include <fontconfig/fontconfig.h>
2209a6844aabSmrg
2210ca08ab68Smrg   FcCharSet * FcCharSetCopy(FcCharSet *src);
22112c393a42Smrg
22122c393a42SmrgDescription
22132c393a42Smrg
2214eceda581Smrg   Makes a copy of src; note that this may not actually do
2215eceda581Smrg   anything more than increment the reference count on src.
22162c393a42Smrg
2217eceda581SmrgFcCharSetEqual
22182c393a42Smrg
22192c393a42SmrgName
22202c393a42Smrg
2221eceda581Smrg   FcCharSetEqual -- Compare two charsets
22222c393a42Smrg
22232c393a42SmrgSynopsis
22242c393a42Smrg
2225eceda581Smrg#include <fontconfig/fontconfig.h>
2226a6844aabSmrg
2227ca08ab68Smrg   FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b);
22282c393a42Smrg
22292c393a42SmrgDescription
22302c393a42Smrg
2231ca08ab68Smrg   Returns whether a and b contain the same set of Unicode chars.
22322c393a42Smrg
2233eceda581SmrgFcCharSetIntersect
22342c393a42Smrg
22352c393a42SmrgName
22362c393a42Smrg
2237eceda581Smrg   FcCharSetIntersect -- Intersect charsets
22382c393a42Smrg
22392c393a42SmrgSynopsis
22402c393a42Smrg
2241eceda581Smrg#include <fontconfig/fontconfig.h>
22422c393a42Smrg
2243eceda581Smrg   FcCharSet * FcCharSetIntersect(const FcCharSet *a, const
2244eceda581Smrg   FcCharSet *b);
22452c393a42Smrg
22462c393a42SmrgDescription
22472c393a42Smrg
2248ca08ab68Smrg   Returns a set including only those chars found in both a and b.
22492c393a42Smrg
2250eceda581SmrgFcCharSetUnion
22512c393a42Smrg
22522c393a42SmrgName
22532c393a42Smrg
2254eceda581Smrg   FcCharSetUnion -- Add charsets
22552c393a42Smrg
22562c393a42SmrgSynopsis
22572c393a42Smrg
2258eceda581Smrg#include <fontconfig/fontconfig.h>
2259a6844aabSmrg
2260eceda581Smrg   FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet
2261eceda581Smrg   *b);
22622c393a42Smrg
22632c393a42SmrgDescription
22642c393a42Smrg
2265eceda581Smrg   Returns a set including only those chars found in either a or
2266eceda581Smrg   b.
22672c393a42Smrg
2268eceda581SmrgFcCharSetSubtract
22692c393a42Smrg
22702c393a42SmrgName
22712c393a42Smrg
2272eceda581Smrg   FcCharSetSubtract -- Subtract charsets
22732c393a42Smrg
22742c393a42SmrgSynopsis
22752c393a42Smrg
2276eceda581Smrg#include <fontconfig/fontconfig.h>
2277a6844aabSmrg
2278eceda581Smrg   FcCharSet * FcCharSetSubtract(const FcCharSet *a, const
2279eceda581Smrg   FcCharSet *b);
22802c393a42Smrg
22812c393a42SmrgDescription
22822c393a42Smrg
2283ca08ab68Smrg   Returns a set including only those chars found in a but not b.
22842c393a42Smrg
2285eceda581SmrgFcCharSetMerge
2286a6844aabSmrg
2287a6844aabSmrgName
2288a6844aabSmrg
2289eceda581Smrg   FcCharSetMerge -- Merge charsets
2290a6844aabSmrg
2291a6844aabSmrgSynopsis
2292a6844aabSmrg
2293eceda581Smrg#include <fontconfig/fontconfig.h>
2294a6844aabSmrg
2295eceda581Smrg   FcBool FcCharSetMerge(FcCharSet *a, const FcCharSet *b, FcBool
2296eceda581Smrg   *changed);
2297a6844aabSmrg
2298a6844aabSmrgDescription
2299a6844aabSmrg
2300eceda581Smrg   Adds all chars in b to a. In other words, this is an in-place
2301eceda581Smrg   version of FcCharSetUnion. If changed is not NULL, then it
2302eceda581Smrg   returns whether any new chars from b were added to a. Returns
2303eceda581Smrg   FcFalse on failure, either when a is a constant set or from
2304eceda581Smrg   running out of memory.
2305a6844aabSmrg
2306eceda581SmrgFcCharSetHasChar
23072c393a42Smrg
23082c393a42SmrgName
23092c393a42Smrg
2310eceda581Smrg   FcCharSetHasChar -- Check a charset for a char
23112c393a42Smrg
23122c393a42SmrgSynopsis
23132c393a42Smrg
2314eceda581Smrg#include <fontconfig/fontconfig.h>
2315a6844aabSmrg
2316ca08ab68Smrg   FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4);
23172c393a42Smrg
23182c393a42SmrgDescription
23192c393a42Smrg
2320ca08ab68Smrg   Returns whether fcs contains the char ucs4.
23212c393a42Smrg
2322eceda581SmrgFcCharSetCount
23232c393a42Smrg
23242c393a42SmrgName
23252c393a42Smrg
2326eceda581Smrg   FcCharSetCount -- Count entries in a charset
23272c393a42Smrg
23282c393a42SmrgSynopsis
23292c393a42Smrg
2330eceda581Smrg#include <fontconfig/fontconfig.h>
2331a6844aabSmrg
2332ca08ab68Smrg   FcChar32 FcCharSetCount(const FcCharSet *a);
23332c393a42Smrg
23342c393a42SmrgDescription
23352c393a42Smrg
2336ca08ab68Smrg   Returns the total number of Unicode chars in a.
23372c393a42Smrg
2338eceda581SmrgFcCharSetIntersectCount
23392c393a42Smrg
23402c393a42SmrgName
23412c393a42Smrg
2342eceda581Smrg   FcCharSetIntersectCount -- Intersect and count charsets
23432c393a42Smrg
23442c393a42SmrgSynopsis
23452c393a42Smrg
2346eceda581Smrg#include <fontconfig/fontconfig.h>
2347a32e9e42Smrg
2348eceda581Smrg   FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const
2349eceda581Smrg   FcCharSet *b);
23502c393a42Smrg
23512c393a42SmrgDescription
23522c393a42Smrg
2353ca08ab68Smrg   Returns the number of chars that are in both a and b.
23542c393a42Smrg
2355eceda581SmrgFcCharSetSubtractCount
23562c393a42Smrg
23572c393a42SmrgName
23582c393a42Smrg
2359eceda581Smrg   FcCharSetSubtractCount -- Subtract and count charsets
23602c393a42Smrg
23612c393a42SmrgSynopsis
23622c393a42Smrg
2363eceda581Smrg#include <fontconfig/fontconfig.h>
2364a32e9e42Smrg
2365eceda581Smrg   FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const
2366eceda581Smrg   FcCharSet *b);
23672c393a42Smrg
23682c393a42SmrgDescription
23692c393a42Smrg
2370ca08ab68Smrg   Returns the number of chars that are in a but not in b.
23712c393a42Smrg
2372eceda581SmrgFcCharSetIsSubset
23732c393a42Smrg
23742c393a42SmrgName
23752c393a42Smrg
2376eceda581Smrg   FcCharSetIsSubset -- Test for charset inclusion
23772c393a42Smrg
23782c393a42SmrgSynopsis
23792c393a42Smrg
2380eceda581Smrg#include <fontconfig/fontconfig.h>
2381a32e9e42Smrg
2382eceda581Smrg   FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet
2383eceda581Smrg   *b);
23842c393a42Smrg
23852c393a42SmrgDescription
23862c393a42Smrg
2387ca08ab68Smrg   Returns whether a is a subset of b.
23882c393a42Smrg
2389eceda581SmrgFcCharSetFirstPage
23902c393a42Smrg
23912c393a42SmrgName
23922c393a42Smrg
2393eceda581Smrg   FcCharSetFirstPage -- Start enumerating charset contents
23942c393a42Smrg
23952c393a42SmrgSynopsis
23962c393a42Smrg
2397eceda581Smrg#include <fontconfig/fontconfig.h>
2398a6844aabSmrg
2399ca08ab68Smrg   FcChar32 FcCharSetFirstPage(const FcCharSet *a,
2400ca08ab68Smrg   FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);
24012c393a42Smrg
24022c393a42SmrgDescription
24032c393a42Smrg
2404eceda581Smrg   Builds an array of bits in map marking the first page of
2405eceda581Smrg   Unicode coverage of a. *next is set to contains the base code
2406eceda581Smrg   point for the next page in a. Returns the base code point for
2407eceda581Smrg   the page, or FC_CHARSET_DONE if a contains no pages. As an
2408eceda581Smrg   example, if FcCharSetFirstPage returns 0x300 and fills map with
2409eceda581Smrg0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff
2410eceda581Smrg7fff 0xffff0003
24116fc018e4Smrg
2412eceda581Smrg   Then the page contains code points 0x300 through 0x33f (the
2413eceda581Smrg   first 64 code points on the page) because map[0] and map[1]
2414eceda581Smrg   both have all their bits set. It also contains code points
2415eceda581Smrg   0x343 (0x300 + 32*2 + (4-1)) and 0x35e (0x300 + 32*2 + (31-1))
2416eceda581Smrg   because map[2] has the 4th and 31st bits set. The code points
2417eceda581Smrg   represented by map[3] and later are left as an exercise for the
2418eceda581Smrg   reader ;).
24192c393a42Smrg
2420eceda581SmrgFcCharSetNextPage
24212c393a42Smrg
24222c393a42SmrgName
24232c393a42Smrg
2424eceda581Smrg   FcCharSetNextPage -- Continue enumerating charset contents
24252c393a42Smrg
24262c393a42SmrgSynopsis
24272c393a42Smrg
2428eceda581Smrg#include <fontconfig/fontconfig.h>
2429a6844aabSmrg
2430ca08ab68Smrg   FcChar32 FcCharSetNextPage(const FcCharSet *a,
2431ca08ab68Smrg   FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);
24322c393a42Smrg
24332c393a42SmrgDescription
24342c393a42Smrg
2435eceda581Smrg   Builds an array of bits in map marking the Unicode coverage of
2436eceda581Smrg   a for page containing *next (see the FcCharSetFirstPage
2437eceda581Smrg   description for details). *next is set to contains the base
2438eceda581Smrg   code point for the next page in a. Returns the base of code
2439eceda581Smrg   point for the page, or FC_CHARSET_DONE if a does not contain
2440eceda581Smrg   *next.
24412c393a42Smrg
2442eceda581SmrgFcCharSetCoverage
24432c393a42Smrg
24442c393a42SmrgName
24452c393a42Smrg
2446eceda581Smrg   FcCharSetCoverage -- DEPRECATED return coverage for a Unicode
2447eceda581Smrg   page
24482c393a42Smrg
24492c393a42SmrgSynopsis
24502c393a42Smrg
2451eceda581Smrg#include <fontconfig/fontconfig.h>
2452a6844aabSmrg
2453ca08ab68Smrg   FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page,
2454ca08ab68Smrg   FcChar32[8]result);
24552c393a42Smrg
24562c393a42SmrgDescription
24572c393a42Smrg
2458eceda581Smrg   DEPRECATED This function returns a bitmask in result which
2459eceda581Smrg   indicates which code points in page are included in a.
2460eceda581Smrg   FcCharSetCoverage returns the next page in the charset which
2461eceda581Smrg   has any coverage.
24622c393a42Smrg
2463eceda581SmrgFcCharSetNew
24642c393a42Smrg
24652c393a42SmrgName
24662c393a42Smrg
2467eceda581Smrg   FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
24682c393a42Smrg
24692c393a42SmrgSynopsis
24702c393a42Smrg
2471eceda581Smrg#include <fontconfig/fontconfig.h>
2472a6844aabSmrg
2473ca08ab68Smrg   FcCharSet * FcCharSetNew(void);
24742c393a42Smrg
24752c393a42SmrgDescription
24762c393a42Smrg
2477ca08ab68Smrg   FcCharSetNew is a DEPRECATED alias for FcCharSetCreate.
2478eceda581Smrg     __________________________________________________________
24792c393a42Smrg
2480eceda581SmrgFcLangSet
2481ca08ab68Smrg
2482ca08ab68Smrg   Table of Contents
2483eceda581Smrg   FcLangSetCreate -- create a langset object
2484eceda581Smrg   FcLangSetDestroy -- destroy a langset object
2485eceda581Smrg   FcLangSetCopy -- copy a langset object
2486eceda581Smrg   FcLangSetAdd -- add a language to a langset
2487eceda581Smrg   FcLangSetDel -- delete a language from a langset
2488eceda581Smrg   FcLangSetUnion -- Add langsets
2489eceda581Smrg   FcLangSetSubtract -- Subtract langsets
2490eceda581Smrg   FcLangSetCompare -- compare language sets
2491eceda581Smrg   FcLangSetContains -- check langset subset relation
2492eceda581Smrg   FcLangSetEqual -- test for matching langsets
2493eceda581Smrg   FcLangSetHash -- return a hash value for a langset
2494eceda581Smrg   FcLangSetHasLang -- test langset for language support
2495eceda581Smrg   FcGetDefaultLangs -- Get the default languages list
2496eceda581Smrg   FcLangSetGetLangs -- get the list of languages in the langset
2497eceda581Smrg   FcGetLangs -- Get list of languages
2498eceda581Smrg   FcLangNormalize -- Normalize the language string
2499eceda581Smrg   FcLangGetCharSet -- Get character map for a language
2500ca08ab68Smrg
2501eceda581Smrg   An FcLangSet is a set of language names (each of which include
2502eceda581Smrg   language and an optional territory). They are used when
2503eceda581Smrg   selecting fonts to indicate which languages the fonts need to
2504eceda581Smrg   support. Each font is marked, using language orthography
2505eceda581Smrg   information built into fontconfig, with the set of supported
2506eceda581Smrg   languages.
2507a32e9e42Smrg
2508eceda581SmrgFcLangSetCreate
2509ca08ab68Smrg
2510ca08ab68SmrgName
2511ca08ab68Smrg
2512eceda581Smrg   FcLangSetCreate -- create a langset object
2513ca08ab68Smrg
2514ca08ab68SmrgSynopsis
2515ca08ab68Smrg
2516eceda581Smrg#include <fontconfig/fontconfig.h>
2517ca08ab68Smrg
2518ca08ab68Smrg   FcLangSet * FcLangSetCreate(void);
2519ca08ab68Smrg
2520ca08ab68SmrgDescription
2521ca08ab68Smrg
2522ca08ab68Smrg   FcLangSetCreate creates a new FcLangSet object.
2523ca08ab68Smrg
2524eceda581SmrgFcLangSetDestroy
2525ca08ab68Smrg
2526ca08ab68SmrgName
2527ca08ab68Smrg
2528eceda581Smrg   FcLangSetDestroy -- destroy a langset object
2529ca08ab68Smrg
2530ca08ab68SmrgSynopsis
2531ca08ab68Smrg
2532eceda581Smrg#include <fontconfig/fontconfig.h>
2533ca08ab68Smrg
2534ca08ab68Smrg   void FcLangSetDestroy(FcLangSet *ls);
2535ca08ab68Smrg
2536ca08ab68SmrgDescription
2537ca08ab68Smrg
2538eceda581Smrg   FcLangSetDestroy destroys a FcLangSet object, freeing all
2539eceda581Smrg   memory associated with it.
2540ca08ab68Smrg
2541eceda581SmrgFcLangSetCopy
2542a6844aabSmrg
2543ca08ab68SmrgName
2544ca08ab68Smrg
2545eceda581Smrg   FcLangSetCopy -- copy a langset object
2546ca08ab68Smrg
2547ca08ab68SmrgSynopsis
2548ca08ab68Smrg
2549eceda581Smrg#include <fontconfig/fontconfig.h>
2550ca08ab68Smrg
2551ca08ab68Smrg   FcLangSet * FcLangSetCopy(const FcLangSet *ls);
2552ca08ab68Smrg
2553ca08ab68SmrgDescription
25542c393a42Smrg
2555eceda581Smrg   FcLangSetCopy creates a new FcLangSet object and populates it
2556eceda581Smrg   with the contents of ls.
25572c393a42Smrg
2558eceda581SmrgFcLangSetAdd
25592c393a42Smrg
25602c393a42SmrgName
25612c393a42Smrg
2562eceda581Smrg   FcLangSetAdd -- add a language to a langset
25632c393a42Smrg
25642c393a42SmrgSynopsis
25652c393a42Smrg
2566eceda581Smrg#include <fontconfig/fontconfig.h>
2567a6844aabSmrg
2568ca08ab68Smrg   FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang);
25692c393a42Smrg
25702c393a42SmrgDescription
25712c393a42Smrg
2572eceda581Smrg   lang is added to ls. lang should be of the form Ll-Tt where Ll
2573eceda581Smrg   is a two or three letter language from ISO 639 and Tt is a
2574eceda581Smrg   territory from ISO 3166.
25752c393a42Smrg
2576eceda581SmrgFcLangSetDel
25772c393a42Smrg
25782c393a42SmrgName
25792c393a42Smrg
2580eceda581Smrg   FcLangSetDel -- delete a language from a langset
25812c393a42Smrg
25822c393a42SmrgSynopsis
25832c393a42Smrg
2584eceda581Smrg#include <fontconfig/fontconfig.h>
2585a6844aabSmrg
2586ca08ab68Smrg   FcBool FcLangSetDel(FcLangSet *ls, const FcChar8 *lang);
25872c393a42Smrg
25882c393a42SmrgDescription
25892c393a42Smrg
2590eceda581Smrg   lang is removed from ls. lang should be of the form Ll-Tt where
2591eceda581Smrg   Ll is a two or three letter language from ISO 639 and Tt is a
2592eceda581Smrg   territory from ISO 3166.
25932c393a42Smrg
2594b09479dcSmrgSince
25952c393a42Smrg
2596b09479dcSmrg   version 2.9.0
25972c393a42Smrg
2598eceda581SmrgFcLangSetUnion
25992c393a42Smrg
26002c393a42SmrgName
26012c393a42Smrg
2602eceda581Smrg   FcLangSetUnion -- Add langsets
26032c393a42Smrg
26042c393a42SmrgSynopsis
26052c393a42Smrg
2606eceda581Smrg#include <fontconfig/fontconfig.h>
26072c393a42Smrg
2608eceda581Smrg   FcLangSet * FcLangSetUnion(const FcLangSet *ls_a, const
2609eceda581Smrg   FcLangSet *ls_b);
26102c393a42Smrg
26112c393a42SmrgDescription
26122c393a42Smrg
2613eceda581Smrg   Returns a set including only those languages found in either
2614eceda581Smrg   ls_a or ls_b.
26152c393a42Smrg
2616b09479dcSmrgSince
26172c393a42Smrg
2618b09479dcSmrg   version 2.9.0
26192c393a42Smrg
2620eceda581SmrgFcLangSetSubtract
26212c393a42Smrg
26222c393a42SmrgName
26232c393a42Smrg
2624eceda581Smrg   FcLangSetSubtract -- Subtract langsets
26252c393a42Smrg
26262c393a42SmrgSynopsis
26272c393a42Smrg
2628eceda581Smrg#include <fontconfig/fontconfig.h>
2629a6844aabSmrg
2630eceda581Smrg   FcLangSet * FcLangSetSubtract(const FcLangSet *ls_a, const
2631eceda581Smrg   FcLangSet *ls_b);
26322c393a42Smrg
26332c393a42SmrgDescription
26342c393a42Smrg
2635eceda581Smrg   Returns a set including only those languages found in ls_a but
2636eceda581Smrg   not in ls_b.
26372c393a42Smrg
2638b09479dcSmrgSince
26392c393a42Smrg
2640b09479dcSmrg   version 2.9.0
26412c393a42Smrg
2642eceda581SmrgFcLangSetCompare
26432c393a42Smrg
26442c393a42SmrgName
26452c393a42Smrg
2646eceda581Smrg   FcLangSetCompare -- compare language sets
26472c393a42Smrg
26482c393a42SmrgSynopsis
26492c393a42Smrg
2650eceda581Smrg#include <fontconfig/fontconfig.h>
2651a32e9e42Smrg
2652eceda581Smrg   FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const
2653eceda581Smrg   FcLangSet *ls_b);
26542c393a42Smrg
26552c393a42SmrgDescription
26562c393a42Smrg
2657eceda581Smrg   FcLangSetCompare compares language coverage for ls_a and ls_b.
2658eceda581Smrg   If they share any language and territory pair, this function
2659eceda581Smrg   returns FcLangEqual. If they share a language but differ in
2660eceda581Smrg   which territory that language is for, this function returns
2661eceda581Smrg   FcLangDifferentTerritory. If they share no languages in common,
2662eceda581Smrg   this function returns FcLangDifferentLang.
26632c393a42Smrg
2664eceda581SmrgFcLangSetContains
26652c393a42Smrg
26662c393a42SmrgName
26672c393a42Smrg
2668eceda581Smrg   FcLangSetContains -- check langset subset relation
26692c393a42Smrg
26702c393a42SmrgSynopsis
26712c393a42Smrg
2672eceda581Smrg#include <fontconfig/fontconfig.h>
2673a32e9e42Smrg
2674eceda581Smrg   FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet
2675eceda581Smrg   *ls_b);
26762c393a42Smrg
26772c393a42SmrgDescription
26782c393a42Smrg
2679eceda581Smrg   FcLangSetContains returns FcTrue if ls_a contains every
2680eceda581Smrg   language in ls_b. ls_a will 'contain' a language from ls_b if
2681eceda581Smrg   ls_a has exactly the language, or either the language or ls_a
2682eceda581Smrg   has no territory.
26832c393a42Smrg
2684eceda581SmrgFcLangSetEqual
26852c393a42Smrg
26862c393a42SmrgName
26872c393a42Smrg
2688eceda581Smrg   FcLangSetEqual -- test for matching langsets
26892c393a42Smrg
26902c393a42SmrgSynopsis
26912c393a42Smrg
2692eceda581Smrg#include <fontconfig/fontconfig.h>
26932c393a42Smrg
2694eceda581Smrg   FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet
2695eceda581Smrg   *ls_b);
26962c393a42Smrg
26972c393a42SmrgDescription
26982c393a42Smrg
2699eceda581Smrg   Returns FcTrue if and only if ls_a supports precisely the same
2700eceda581Smrg   language and territory combinations as ls_b.
27012c393a42Smrg
2702eceda581SmrgFcLangSetHash
27032c393a42Smrg
27042c393a42SmrgName
27052c393a42Smrg
2706eceda581Smrg   FcLangSetHash -- return a hash value for a langset
27072c393a42Smrg
27082c393a42SmrgSynopsis
27092c393a42Smrg
2710eceda581Smrg#include <fontconfig/fontconfig.h>
2711a6844aabSmrg
2712ca08ab68Smrg   FcChar32 FcLangSetHash(const FcLangSet *ls);
27132c393a42Smrg
27142c393a42SmrgDescription
27152c393a42Smrg
2716eceda581Smrg   This function returns a value which depends solely on the
2717eceda581Smrg   languages supported by ls. Any language which equals ls will
2718eceda581Smrg   have the same result from FcLangSetHash. However, two langsets
2719eceda581Smrg   with the same hash value may not be equal.
27202c393a42Smrg
2721eceda581SmrgFcLangSetHasLang
27222c393a42Smrg
27232c393a42SmrgName
27242c393a42Smrg
2725eceda581Smrg   FcLangSetHasLang -- test langset for language support
2726a6844aabSmrg
2727a6844aabSmrgSynopsis
2728a6844aabSmrg
2729eceda581Smrg#include <fontconfig/fontconfig.h>
2730a6844aabSmrg
2731eceda581Smrg   FcLangResult FcLangSetHasLang(const FcLangSet *ls, const
2732eceda581Smrg   FcChar8 *lang);
2733a6844aabSmrg
2734a6844aabSmrgDescription
2735a6844aabSmrg
2736eceda581Smrg   FcLangSetHasLang checks whether ls supports lang. If ls has a
2737eceda581Smrg   matching language and territory pair, this function returns
2738eceda581Smrg   FcLangEqual. If ls has a matching language but differs in which
2739eceda581Smrg   territory that language is for, this function returns
2740eceda581Smrg   FcLangDifferentTerritory. If ls has no matching language, this
2741eceda581Smrg   function returns FcLangDifferentLang.
2742a6844aabSmrg
2743eceda581SmrgFcGetDefaultLangs
2744a6844aabSmrg
2745a6844aabSmrgName
2746a6844aabSmrg
2747eceda581Smrg   FcGetDefaultLangs -- Get the default languages list
27482c393a42Smrg
27492c393a42SmrgSynopsis
27502c393a42Smrg
2751eceda581Smrg#include <fontconfig/fontconfig.h>
2752a6844aabSmrg
2753b09479dcSmrg   FcStrSet * FcGetDefaultLangs(void);
27542c393a42Smrg
27552c393a42SmrgDescription
27562c393a42Smrg
2757eceda581Smrg   Returns a string set of the default languages according to the
2758eceda581Smrg   environment variables on the system. This function looks for
2759eceda581Smrg   them in order of FC_LANG, LC_ALL, LC_CTYPE and LANG then. If
2760eceda581Smrg   there are no valid values in those environment variables, "en"
2761eceda581Smrg   will be set as fallback.
27622c393a42Smrg
2763b09479dcSmrgSince
2764b09479dcSmrg
2765b09479dcSmrg   version 2.9.91
2766b09479dcSmrg
2767eceda581SmrgFcLangSetGetLangs
2768b09479dcSmrg
2769b09479dcSmrgName
2770b09479dcSmrg
2771eceda581Smrg   FcLangSetGetLangs -- get the list of languages in the langset
2772b09479dcSmrg
2773b09479dcSmrgSynopsis
2774b09479dcSmrg
2775eceda581Smrg#include <fontconfig/fontconfig.h>
2776b09479dcSmrg
2777b09479dcSmrg   FcStrSet * FcLangSetGetLangs(const FcLangSet *ls);
2778b09479dcSmrg
2779b09479dcSmrgDescription
2780b09479dcSmrg
2781b09479dcSmrg   Returns a string set of all languages in langset.
27822c393a42Smrg
2783eceda581SmrgFcGetLangs
27842c393a42Smrg
27852c393a42SmrgName
27862c393a42Smrg
2787eceda581Smrg   FcGetLangs -- Get list of languages
27882c393a42Smrg
27892c393a42SmrgSynopsis
27902c393a42Smrg
2791eceda581Smrg#include <fontconfig/fontconfig.h>
2792a6844aabSmrg
2793ca08ab68Smrg   FcStrSet * FcGetLangs(void);
27942c393a42Smrg
27952c393a42SmrgDescription
27962c393a42Smrg
2797ca08ab68Smrg   Returns a string set of all known languages.
27982c393a42Smrg
2799eceda581SmrgFcLangNormalize
2800c9710b42Smrg
2801c9710b42SmrgName
2802c9710b42Smrg
2803eceda581Smrg   FcLangNormalize -- Normalize the language string
2804c9710b42Smrg
2805c9710b42SmrgSynopsis
2806c9710b42Smrg
2807eceda581Smrg#include <fontconfig/fontconfig.h>
2808c9710b42Smrg
2809c9710b42Smrg   FcChar8 * FcLangNormalize(const FcChar8 *lang);
2810c9710b42Smrg
2811c9710b42SmrgDescription
2812c9710b42Smrg
2813c9710b42Smrg   Returns a string to make lang suitable on fontconfig.
2814c9710b42Smrg
2815b09479dcSmrgSince
2816c9710b42Smrg
2817b09479dcSmrg   version 2.10.91
28182c393a42Smrg
2819eceda581SmrgFcLangGetCharSet
28202c393a42Smrg
28212c393a42SmrgName
28222c393a42Smrg
2823eceda581Smrg   FcLangGetCharSet -- Get character map for a language
28242c393a42Smrg
28252c393a42SmrgSynopsis
28262c393a42Smrg
2827eceda581Smrg#include <fontconfig/fontconfig.h>
2828a6844aabSmrg
2829ca08ab68Smrg   const FcCharSet * FcLangGetCharSet(const FcChar8 *lang);
28302c393a42Smrg
28312c393a42SmrgDescription
28322c393a42Smrg
2833ca08ab68Smrg   Returns the FcCharMap for a language.
2834eceda581Smrg     __________________________________________________________
28352c393a42Smrg
2836eceda581SmrgFcMatrix
2837ca08ab68Smrg
2838ca08ab68Smrg   Table of Contents
2839eceda581Smrg   FcMatrixInit -- initialize an FcMatrix structure
2840eceda581Smrg   FcMatrixCopy -- Copy a matrix
2841eceda581Smrg   FcMatrixEqual -- Compare two matrices
2842eceda581Smrg   FcMatrixMultiply -- Multiply matrices
2843eceda581Smrg   FcMatrixRotate -- Rotate a matrix
2844eceda581Smrg   FcMatrixScale -- Scale a matrix
2845eceda581Smrg   FcMatrixShear -- Shear a matrix
2846ca08ab68Smrg
2847eceda581Smrg   FcMatrix structures hold an affine transformation in matrix
2848eceda581Smrg   form.
2849a32e9e42Smrg
2850eceda581SmrgFcMatrixInit
28512c393a42Smrg
2852953daebaSmrgName
28532c393a42Smrg
2854eceda581Smrg   FcMatrixInit -- initialize an FcMatrix structure
28552c393a42Smrg
2856953daebaSmrgSynopsis
28572c393a42Smrg
2858eceda581Smrg#include <fontconfig/fontconfig.h>
2859ca08ab68Smrg
2860953daebaSmrg   void FcMatrixInit(FcMatrix *matrix);
2861953daebaSmrg
2862953daebaSmrgDescription
2863ca08ab68Smrg
2864953daebaSmrg   FcMatrixInit initializes matrix to the identity matrix.
2865ca08ab68Smrg
2866eceda581SmrgFcMatrixCopy
28672c393a42Smrg
28682c393a42SmrgName
28692c393a42Smrg
2870eceda581Smrg   FcMatrixCopy -- Copy a matrix
28712c393a42Smrg
28722c393a42SmrgSynopsis
28732c393a42Smrg
2874eceda581Smrg#include <fontconfig/fontconfig.h>
2875a6844aabSmrg
2876953daebaSmrg   void FcMatrixCopy(const FcMatrix *matrix);
28772c393a42Smrg
28782c393a42SmrgDescription
28792c393a42Smrg
2880953daebaSmrg   FcMatrixCopy allocates a new FcMatrix and copies mat into it.
28812c393a42Smrg
2882eceda581SmrgFcMatrixEqual
28832c393a42Smrg
28842c393a42SmrgName
28852c393a42Smrg
2886eceda581Smrg   FcMatrixEqual -- Compare two matrices
28872c393a42Smrg
28882c393a42SmrgSynopsis
28892c393a42Smrg
2890eceda581Smrg#include <fontconfig/fontconfig.h>
2891a6844aabSmrg
2892eceda581Smrg   void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix
2893eceda581Smrg   *matrix2);
28942c393a42Smrg
28952c393a42SmrgDescription
28962c393a42Smrg
2897eceda581Smrg   FcMatrixEqual compares matrix1 and matrix2 returning FcTrue
2898eceda581Smrg   when they are equal and FcFalse when they are not.
28992c393a42Smrg
2900eceda581SmrgFcMatrixMultiply
29012c393a42Smrg
29022c393a42SmrgName
29032c393a42Smrg
2904eceda581Smrg   FcMatrixMultiply -- Multiply matrices
29052c393a42Smrg
29062c393a42SmrgSynopsis
29072c393a42Smrg
2908eceda581Smrg#include <fontconfig/fontconfig.h>
2909a32e9e42Smrg
2910eceda581Smrg   void FcMatrixMultiply(FcMatrix *result, const FcMatrix
2911eceda581Smrg   *matrix1, const FcMatrix *matrix2);
29122c393a42Smrg
29132c393a42SmrgDescription
29142c393a42Smrg
2915eceda581Smrg   FcMatrixMultiply multiplies matrix1 and matrix2 storing the
2916eceda581Smrg   result in result.
29172c393a42Smrg
2918eceda581SmrgFcMatrixRotate
29192c393a42Smrg
29202c393a42SmrgName
29212c393a42Smrg
2922eceda581Smrg   FcMatrixRotate -- Rotate a matrix
29232c393a42Smrg
29242c393a42SmrgSynopsis
29252c393a42Smrg
2926eceda581Smrg#include <fontconfig/fontconfig.h>
29272c393a42Smrg
2928953daebaSmrg   void FcMatrixRotate(FcMatrix *matrix, double cos, double sin);
29292c393a42Smrg
29302c393a42SmrgDescription
29312c393a42Smrg
2932eceda581Smrg   FcMatrixRotate rotates matrix by the angle who's sine is sin
2933eceda581Smrg   and cosine is cos. This is done by multiplying by the matrix:
2934eceda581Smrg  cos -sin
2935eceda581Smrg  sin  cos
2936a32e9e42Smrg
2937eceda581SmrgFcMatrixScale
29382c393a42Smrg
29392c393a42SmrgName
29402c393a42Smrg
2941eceda581Smrg   FcMatrixScale -- Scale a matrix
29422c393a42Smrg
29432c393a42SmrgSynopsis
29442c393a42Smrg
2945eceda581Smrg#include <fontconfig/fontconfig.h>
29462c393a42Smrg
2947953daebaSmrg   void FcMatrixScale(FcMatrix *matrix, double sx, double dy);
29482c393a42Smrg
29492c393a42SmrgDescription
29502c393a42Smrg
2951eceda581Smrg   FcMatrixScale multiplies matrix x values by sx and y values by
2952eceda581Smrg   dy. This is done by multiplying by the matrix:
2953eceda581Smrg   sx  0
2954eceda581Smrg   0   dy
2955a32e9e42Smrg
2956eceda581SmrgFcMatrixShear
29572c393a42Smrg
29582c393a42SmrgName
29592c393a42Smrg
2960eceda581Smrg   FcMatrixShear -- Shear a matrix
29612c393a42Smrg
29622c393a42SmrgSynopsis
29632c393a42Smrg
2964eceda581Smrg#include <fontconfig/fontconfig.h>
29652c393a42Smrg
2966953daebaSmrg   void FcMatrixShear(FcMatrix *matrix, double sh, double sv);
29672c393a42Smrg
29682c393a42SmrgDescription
29692c393a42Smrg
2970eceda581Smrg   FcMatrixShare shears matrix horizontally by sh and vertically
2971eceda581Smrg   by sv. This is done by multiplying by the matrix:
2972eceda581Smrg  1  sh
2973eceda581Smrg  sv  1
2974eceda581Smrg     __________________________________________________________
2975953daebaSmrg
2976eceda581SmrgFcRange
2977953daebaSmrg
2978953daebaSmrg   Table of Contents
2979eceda581Smrg   FcRangeCopy -- Copy a range object
2980eceda581Smrg   FcRangeCreateDouble -- create a range object for double
2981eceda581Smrg   FcRangeCreateInteger -- create a range object for integer
2982eceda581Smrg   FcRangeDestroy -- destroy a range object
2983eceda581Smrg   FcRangeGetDouble -- Get the range in double
2984a6844aabSmrg
2985953daebaSmrg   An FcRange holds two variables to indicate a range in between.
29862c393a42Smrg
2987eceda581SmrgFcRangeCopy
29882c393a42Smrg
29892c393a42SmrgName
29902c393a42Smrg
2991eceda581Smrg   FcRangeCopy -- Copy a range object
29922c393a42Smrg
29932c393a42SmrgSynopsis
29942c393a42Smrg
2995eceda581Smrg#include <fontconfig/fontconfig.h>
29962c393a42Smrg
2997953daebaSmrg   FcRange * FcRangeCopy(const FcRange *range);
29982c393a42Smrg
29992c393a42SmrgDescription
30002c393a42Smrg
3001eceda581Smrg   FcRangeCopy creates a new FcRange object and populates it with
3002eceda581Smrg   the contents of range.
3003ca08ab68Smrg
3004eceda581SmrgSince
3005a32e9e42Smrg
3006eceda581Smrg   version 2.11.91
3007a32e9e42Smrg
3008eceda581SmrgFcRangeCreateDouble
3009a32e9e42Smrg
3010eceda581SmrgName
3011a32e9e42Smrg
3012eceda581Smrg   FcRangeCreateDouble -- create a range object for double
3013a32e9e42Smrg
3014eceda581SmrgSynopsis
3015a32e9e42Smrg
3016eceda581Smrg#include <fontconfig/fontconfig.h>
3017a32e9e42Smrg
3018eceda581Smrg   FcRange * FcRangeCreateDouble(doublebegin, doubleend);
3019a32e9e42Smrg
3020eceda581SmrgDescription
3021a32e9e42Smrg
3022eceda581Smrg   FcRangeCreateDouble creates a new FcRange object with double
3023eceda581Smrg   sized value.
3024a32e9e42Smrg
3025eceda581SmrgSince
3026a32e9e42Smrg
3027eceda581Smrg   version 2.11.91
3028a32e9e42Smrg
3029eceda581SmrgFcRangeCreateInteger
3030a32e9e42Smrg
3031eceda581SmrgName
3032a32e9e42Smrg
3033eceda581Smrg   FcRangeCreateInteger -- create a range object for integer
3034a32e9e42Smrg
3035eceda581SmrgSynopsis
3036a32e9e42Smrg
3037eceda581Smrg#include <fontconfig/fontconfig.h>
3038a32e9e42Smrg
3039eceda581Smrg   FcRange * FcRangeCreateInteger(intbegin, intend);
3040a32e9e42Smrg
3041eceda581SmrgDescription
3042a32e9e42Smrg
3043eceda581Smrg   FcRangeCreateInteger creates a new FcRange object with integer
3044eceda581Smrg   sized value.
3045a32e9e42Smrg
3046eceda581SmrgSince
3047a32e9e42Smrg
3048eceda581Smrg   version 2.11.91
3049a32e9e42Smrg
3050eceda581SmrgFcRangeDestroy
3051a32e9e42Smrg
3052eceda581SmrgName
3053a32e9e42Smrg
3054eceda581Smrg   FcRangeDestroy -- destroy a range object
3055a32e9e42Smrg
3056eceda581SmrgSynopsis
3057a32e9e42Smrg
3058eceda581Smrg#include <fontconfig/fontconfig.h>
3059a32e9e42Smrg
3060eceda581Smrg   void FcRangeDestroy(FcRange *range);
3061a32e9e42Smrg
3062eceda581SmrgDescription
3063a32e9e42Smrg
3064eceda581Smrg   FcRangeDestroy destroys a FcRange object, freeing all memory
3065eceda581Smrg   associated with it.
3066a4e54154Smrg
3067eceda581SmrgSince
3068a32e9e42Smrg
3069eceda581Smrg   version 2.11.91
3070a32e9e42Smrg
3071eceda581SmrgFcRangeGetDouble
3072a32e9e42Smrg
3073eceda581SmrgName
3074a32e9e42Smrg
3075eceda581Smrg   FcRangeGetDouble -- Get the range in double
3076a32e9e42Smrg
3077eceda581SmrgSynopsis
3078a32e9e42Smrg
3079eceda581Smrg#include <fontconfig/fontconfig.h>
3080a32e9e42Smrg
3081eceda581Smrg   FcBool FcRangeGetDouble(const FcRange *range, double *begin,
3082eceda581Smrg   double *end);
3083a32e9e42Smrg
3084eceda581SmrgDescription
3085a32e9e42Smrg
3086eceda581Smrg   Returns in begin and end as the range.
3087a32e9e42Smrg
3088eceda581SmrgSince
3089a32e9e42Smrg
3090eceda581Smrg   version 2.11.91
3091eceda581Smrg     __________________________________________________________
3092a32e9e42Smrg
3093eceda581SmrgFcConfig
3094a32e9e42Smrg
3095eceda581Smrg   Table of Contents
3096eceda581Smrg   FcConfigCreate -- Create a configuration
3097eceda581Smrg   FcConfigReference -- Increment config reference count
3098eceda581Smrg   FcConfigDestroy -- Destroy a configuration
3099eceda581Smrg   FcConfigSetCurrent -- Set configuration as default
3100eceda581Smrg   FcConfigGetCurrent -- Return current configuration
3101eceda581Smrg   FcConfigUptoDate -- Check timestamps on config files
3102eceda581Smrg   FcConfigHome -- return the current home directory.
3103eceda581Smrg   FcConfigEnableHome -- controls use of the home directory.
3104eceda581Smrg   FcConfigBuildFonts -- Build font database
3105eceda581Smrg   FcConfigGetConfigDirs -- Get config directories
3106eceda581Smrg   FcConfigGetFontDirs -- Get font directories
3107eceda581Smrg   FcConfigGetConfigFiles -- Get config files
3108eceda581Smrg   FcConfigGetCache -- DEPRECATED used to return per-user cache
3109eceda581Smrg          filename
3110eceda581Smrg
3111eceda581Smrg   FcConfigGetCacheDirs -- return the list of directories searched
3112eceda581Smrg          for cache files
3113eceda581Smrg
3114eceda581Smrg   FcConfigGetFonts -- Get config font set
3115eceda581Smrg   FcConfigGetBlanks -- Get config blanks
3116eceda581Smrg   FcConfigGetRescanInterval -- Get config rescan interval
3117eceda581Smrg   FcConfigSetRescanInterval -- Set config rescan interval
3118eceda581Smrg   FcConfigAppFontAddFile -- Add font file to font database
3119eceda581Smrg   FcConfigAppFontAddDir -- Add fonts from directory to font
3120eceda581Smrg          database
3121eceda581Smrg
3122eceda581Smrg   FcConfigAppFontClear -- Remove all app fonts from font database
3123eceda581Smrg   FcConfigSubstituteWithPat -- Execute substitutions
3124eceda581Smrg   FcConfigSubstitute -- Execute substitutions
3125eceda581Smrg   FcFontMatch -- Return best font
3126eceda581Smrg   FcFontSort -- Return list of matching fonts
3127eceda581Smrg   FcFontRenderPrepare -- Prepare pattern for loading font file
3128eceda581Smrg   FcFontList -- List fonts
3129eceda581Smrg   FcConfigFilename -- Find a config file
3130eceda581Smrg   FcConfigGetFilename -- Find a config file
3131eceda581Smrg   FcConfigParseAndLoad -- load a configuration file
3132eceda581Smrg   FcConfigParseAndLoadFromMemory -- load a configuration from
3133eceda581Smrg          memory
3134eceda581Smrg
3135eceda581Smrg   FcConfigGetSysRoot -- Obtain the system root directory
3136eceda581Smrg   FcConfigSetSysRoot -- Set the system root directory
3137eceda581Smrg   FcConfigFileInfoIterInit -- Initialize the iterator
3138eceda581Smrg   FcConfigFileInfoIterNext -- Set the iterator to point to the
3139eceda581Smrg          next list
3140eceda581Smrg
3141eceda581Smrg   FcConfigFileInfoIterGet -- Obtain the configuration file
3142eceda581Smrg          information
3143eceda581Smrg
3144eceda581Smrg   An FcConfig object holds the internal representation of a
3145eceda581Smrg   configuration. There is a default configuration which
3146eceda581Smrg   applications may use by passing 0 to any function using the
3147eceda581Smrg   data within an FcConfig.
3148eceda581Smrg
3149eceda581SmrgFcConfigCreate
3150eceda581Smrg
3151eceda581SmrgName
3152eceda581Smrg
3153eceda581Smrg   FcConfigCreate -- Create a configuration
3154eceda581Smrg
3155eceda581SmrgSynopsis
3156eceda581Smrg
3157eceda581Smrg#include <fontconfig/fontconfig.h>
3158a6844aabSmrg
3159ca08ab68Smrg   FcConfig * FcConfigCreate(void);
31602c393a42Smrg
31612c393a42SmrgDescription
31622c393a42Smrg
3163ca08ab68Smrg   Creates an empty configuration.
31642c393a42Smrg
3165eceda581SmrgFcConfigReference
3166a6844aabSmrg
3167a6844aabSmrgName
3168a6844aabSmrg
3169eceda581Smrg   FcConfigReference -- Increment config reference count
3170a6844aabSmrg
3171a6844aabSmrgSynopsis
3172a6844aabSmrg
3173eceda581Smrg#include <fontconfig/fontconfig.h>
3174a6844aabSmrg
3175ca08ab68Smrg   FcConfig * FcConfigReference(FcConfig *config);
3176a6844aabSmrg
3177a6844aabSmrgDescription
3178a6844aabSmrg
3179eceda581Smrg   Add another reference to config. Configs are freed only when
3180eceda581Smrg   the reference count reaches zero. If config is NULL, the
3181eceda581Smrg   current configuration is used. In that case this function will
3182eceda581Smrg   be similar to FcConfigGetCurrent() except that it increments
3183eceda581Smrg   the reference count before returning and the user is
3184eceda581Smrg   responsible for destroying the configuration when not needed
3185eceda581Smrg   anymore.
3186a6844aabSmrg
3187eceda581SmrgFcConfigDestroy
31882c393a42Smrg
31892c393a42SmrgName
31902c393a42Smrg
3191eceda581Smrg   FcConfigDestroy -- Destroy a configuration
31922c393a42Smrg
31932c393a42SmrgSynopsis
31942c393a42Smrg
3195eceda581Smrg#include <fontconfig/fontconfig.h>
3196a6844aabSmrg
3197ca08ab68Smrg   void FcConfigDestroy(FcConfig *config);
31982c393a42Smrg
31992c393a42SmrgDescription
32002c393a42Smrg
3201eceda581Smrg   Decrements the config reference count. If all references are
3202eceda581Smrg   gone, destroys the configuration and any data associated with
3203eceda581Smrg   it. Note that calling this function with the return from
3204eceda581Smrg   FcConfigGetCurrent will cause a new configuration to be created
3205eceda581Smrg   for use as current configuration.
32062c393a42Smrg
3207eceda581SmrgFcConfigSetCurrent
32082c393a42Smrg
32092c393a42SmrgName
32102c393a42Smrg
3211eceda581Smrg   FcConfigSetCurrent -- Set configuration as default
32122c393a42Smrg
32132c393a42SmrgSynopsis
32142c393a42Smrg
3215eceda581Smrg#include <fontconfig/fontconfig.h>
3216a6844aabSmrg
3217ca08ab68Smrg   FcBool FcConfigSetCurrent(FcConfig *config);
32182c393a42Smrg
32192c393a42SmrgDescription
32202c393a42Smrg
3221eceda581Smrg   Sets the current default configuration to config. Implicitly
3222eceda581Smrg   calls FcConfigBuildFonts if necessary, and FcConfigReference()
3223eceda581Smrg   to inrease the reference count in config since 2.12.0,
3224eceda581Smrg   returning FcFalse if that call fails.
32252c393a42Smrg
3226eceda581SmrgFcConfigGetCurrent
32272c393a42Smrg
32282c393a42SmrgName
32292c393a42Smrg
3230eceda581Smrg   FcConfigGetCurrent -- Return current configuration
32312c393a42Smrg
32322c393a42SmrgSynopsis
32332c393a42Smrg
3234eceda581Smrg#include <fontconfig/fontconfig.h>
3235a6844aabSmrg
3236ca08ab68Smrg   FcConfig * FcConfigGetCurrent(void);
32372c393a42Smrg
32382c393a42SmrgDescription
32392c393a42Smrg
3240ca08ab68Smrg   Returns the current default configuration.
32412c393a42Smrg
3242eceda581SmrgFcConfigUptoDate
32432c393a42Smrg
32442c393a42SmrgName
32452c393a42Smrg
3246eceda581Smrg   FcConfigUptoDate -- Check timestamps on config files
32472c393a42Smrg
32482c393a42SmrgSynopsis
32492c393a42Smrg
3250eceda581Smrg#include <fontconfig/fontconfig.h>
3251a6844aabSmrg
3252ca08ab68Smrg   FcBool FcConfigUptoDate(FcConfig *config);
32532c393a42Smrg
32542c393a42SmrgDescription
32552c393a42Smrg
3256eceda581Smrg   Checks all of the files related to config and returns whether
3257eceda581Smrg   any of them has been modified since the configuration was
3258eceda581Smrg   created. If config is NULL, the current configuration is used.
32592c393a42Smrg
3260eceda581SmrgFcConfigHome
32612c393a42Smrg
32622c393a42SmrgName
32632c393a42Smrg
3264eceda581Smrg   FcConfigHome -- return the current home directory.
32652c393a42Smrg
32662c393a42SmrgSynopsis
32672c393a42Smrg
3268eceda581Smrg#include <fontconfig/fontconfig.h>
3269a6844aabSmrg
3270ca08ab68Smrg   FcChar8 * FcConfigHome(void);
32712c393a42Smrg
32722c393a42SmrgDescription
32732c393a42Smrg
3274eceda581Smrg   Return the current user's home directory, if it is available,
3275eceda581Smrg   and if using it is enabled, and NULL otherwise. See also
3276eceda581Smrg   FcConfigEnableHome).
32772c393a42Smrg
3278eceda581SmrgFcConfigEnableHome
32792c393a42Smrg
32802c393a42SmrgName
32812c393a42Smrg
3282eceda581Smrg   FcConfigEnableHome -- controls use of the home directory.
32832c393a42Smrg
32842c393a42SmrgSynopsis
32852c393a42Smrg
3286eceda581Smrg#include <fontconfig/fontconfig.h>
3287a6844aabSmrg
3288ca08ab68Smrg   FcBool FcConfigEnableHome(FcBool enable);
32892c393a42Smrg
32902c393a42SmrgDescription
32912c393a42Smrg
3292eceda581Smrg   If enable is FcTrue, then Fontconfig will use various files
3293eceda581Smrg   which are specified relative to the user's home directory
3294eceda581Smrg   (using the ~ notation in the configuration). When enable is
3295eceda581Smrg   FcFalse, then all use of the home directory in these contexts
3296eceda581Smrg   will be disabled. The previous setting of the value is
3297eceda581Smrg   returned.
32982c393a42Smrg
3299eceda581SmrgFcConfigBuildFonts
33002c393a42Smrg
33012c393a42SmrgName
33022c393a42Smrg
3303eceda581Smrg   FcConfigBuildFonts -- Build font database
33042c393a42Smrg
33052c393a42SmrgSynopsis
33062c393a42Smrg
3307eceda581Smrg#include <fontconfig/fontconfig.h>
3308a6844aabSmrg
3309ca08ab68Smrg   FcBool FcConfigBuildFonts(FcConfig *config);
33102c393a42Smrg
33112c393a42SmrgDescription
33122c393a42Smrg
3313eceda581Smrg   Builds the set of available fonts for the given configuration.
3314eceda581Smrg   Note that any changes to the configuration after this call have
3315eceda581Smrg   indeterminate effects. Returns FcFalse if this operation runs
3316eceda581Smrg   out of memory. If config is NULL, the current configuration is
3317eceda581Smrg   used.
33182c393a42Smrg
3319eceda581SmrgFcConfigGetConfigDirs
33202c393a42Smrg
33212c393a42SmrgName
33222c393a42Smrg
3323eceda581Smrg   FcConfigGetConfigDirs -- Get config directories
33242c393a42Smrg
33252c393a42SmrgSynopsis
33262c393a42Smrg
3327eceda581Smrg#include <fontconfig/fontconfig.h>
3328a6844aabSmrg
3329ca08ab68Smrg   FcStrList * FcConfigGetConfigDirs(FcConfig *config);
33302c393a42Smrg
33312c393a42SmrgDescription
33322c393a42Smrg
3333eceda581Smrg   Returns the list of font directories specified in the
3334eceda581Smrg   configuration files for config. Does not include any
3335eceda581Smrg   subdirectories. If config is NULL, the current configuration is
3336eceda581Smrg   used.
33372c393a42Smrg
3338eceda581SmrgFcConfigGetFontDirs
33392c393a42Smrg
33402c393a42SmrgName
33412c393a42Smrg
3342eceda581Smrg   FcConfigGetFontDirs -- Get font directories
33432c393a42Smrg
33442c393a42SmrgSynopsis
33452c393a42Smrg
3346eceda581Smrg#include <fontconfig/fontconfig.h>
3347a6844aabSmrg
3348ca08ab68Smrg   FcStrList * FcConfigGetFontDirs(FcConfig *config);
33492c393a42Smrg
33502c393a42SmrgDescription
33512c393a42Smrg
3352eceda581Smrg   Returns the list of font directories in config. This includes
3353eceda581Smrg   the configured font directories along with any directories
3354eceda581Smrg   below those in the filesystem. If config is NULL, the current
3355eceda581Smrg   configuration is used.
33562c393a42Smrg
3357eceda581SmrgFcConfigGetConfigFiles
33582c393a42Smrg
33592c393a42SmrgName
33602c393a42Smrg
3361eceda581Smrg   FcConfigGetConfigFiles -- Get config files
33622c393a42Smrg
33632c393a42SmrgSynopsis
33642c393a42Smrg
3365eceda581Smrg#include <fontconfig/fontconfig.h>
3366a6844aabSmrg
3367ca08ab68Smrg   FcStrList * FcConfigGetConfigFiles(FcConfig *config);
33682c393a42Smrg
33692c393a42SmrgDescription
33702c393a42Smrg
3371eceda581Smrg   Returns the list of known configuration files used to generate
3372eceda581Smrg   config. If config is NULL, the current configuration is used.
33732c393a42Smrg
3374eceda581SmrgFcConfigGetCache
33752c393a42Smrg
33762c393a42SmrgName
33772c393a42Smrg
3378eceda581Smrg   FcConfigGetCache -- DEPRECATED used to return per-user cache
3379eceda581Smrg   filename
33802c393a42Smrg
33812c393a42SmrgSynopsis
33822c393a42Smrg
3383eceda581Smrg#include <fontconfig/fontconfig.h>
3384a6844aabSmrg
3385ca08ab68Smrg   FcChar8 * FcConfigGetCache(FcConfig *config);
33862c393a42Smrg
33872c393a42SmrgDescription
33882c393a42Smrg
3389eceda581Smrg   With fontconfig no longer using per-user cache files, this
3390eceda581Smrg   function now simply returns NULL to indicate that no per-user
3391eceda581Smrg   file exists.
33922c393a42Smrg
3393eceda581SmrgFcConfigGetCacheDirs
33942c393a42Smrg
33952c393a42SmrgName
33962c393a42Smrg
3397eceda581Smrg   FcConfigGetCacheDirs -- return the list of directories searched
3398eceda581Smrg   for cache files
33992c393a42Smrg
34002c393a42SmrgSynopsis
34012c393a42Smrg
3402eceda581Smrg#include <fontconfig/fontconfig.h>
3403a6844aabSmrg
3404ca08ab68Smrg   FcStrList * FcConfigGetCacheDirs(const FcConfig *config);
34052c393a42Smrg
34062c393a42SmrgDescription
34072c393a42Smrg
3408eceda581Smrg   FcConfigGetCacheDirs returns a string list containing all of
3409eceda581Smrg   the directories that fontconfig will search when attempting to
3410eceda581Smrg   load a cache file for a font directory. If config is NULL, the
3411eceda581Smrg   current configuration is used.
34122c393a42Smrg
3413eceda581SmrgFcConfigGetFonts
34142c393a42Smrg
34152c393a42SmrgName
34162c393a42Smrg
3417eceda581Smrg   FcConfigGetFonts -- Get config font set
34182c393a42Smrg
34192c393a42SmrgSynopsis
34202c393a42Smrg
3421eceda581Smrg#include <fontconfig/fontconfig.h>
3422a6844aabSmrg
3423ca08ab68Smrg   FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set);
34242c393a42Smrg
34252c393a42SmrgDescription
34262c393a42Smrg
3427eceda581Smrg   Returns one of the two sets of fonts from the configuration as
3428eceda581Smrg   specified by set. This font set is owned by the library and
3429eceda581Smrg   must not be modified or freed. If config is NULL, the current
3430eceda581Smrg   configuration is used.
34312c393a42Smrg
3432eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3433eceda581Smrg   before using this and then FcConfigDestroy when the return
3434eceda581Smrg   value is no longer referenced.
3435a4e54154Smrg
3436eceda581SmrgFcConfigGetBlanks
34372c393a42Smrg
34382c393a42SmrgName
34392c393a42Smrg
3440eceda581Smrg   FcConfigGetBlanks -- Get config blanks
34412c393a42Smrg
34422c393a42SmrgSynopsis
34432c393a42Smrg
3444eceda581Smrg#include <fontconfig/fontconfig.h>
3445a6844aabSmrg
3446ca08ab68Smrg   FcBlanks * FcConfigGetBlanks(FcConfig *config);
34472c393a42Smrg
34482c393a42SmrgDescription
34492c393a42Smrg
3450a32e9e42Smrg   FcBlanks is deprecated. This function always returns NULL.
34512c393a42Smrg
3452eceda581SmrgFcConfigGetRescanInterval
34532c393a42Smrg
34542c393a42SmrgName
34552c393a42Smrg
3456eceda581Smrg   FcConfigGetRescanInterval -- Get config rescan interval
34572c393a42Smrg
34582c393a42SmrgSynopsis
34592c393a42Smrg
3460eceda581Smrg#include <fontconfig/fontconfig.h>
3461a6844aabSmrg
3462ca08ab68Smrg   int FcConfigGetRescanInterval(FcConfig *config);
34632c393a42Smrg
34642c393a42SmrgDescription
34652c393a42Smrg
3466eceda581Smrg   Returns the interval between automatic checks of the
3467eceda581Smrg   configuration (in seconds) specified in config. The
3468eceda581Smrg   configuration is checked during a call to FcFontList when this
3469eceda581Smrg   interval has passed since the last check. An interval setting
3470eceda581Smrg   of zero disables automatic checks. If config is NULL, the
3471ca08ab68Smrg   current configuration is used.
34722c393a42Smrg
3473eceda581SmrgFcConfigSetRescanInterval
34742c393a42Smrg
34752c393a42SmrgName
34762c393a42Smrg
3477eceda581Smrg   FcConfigSetRescanInterval -- Set config rescan interval
34782c393a42Smrg
34792c393a42SmrgSynopsis
34802c393a42Smrg
3481eceda581Smrg#include <fontconfig/fontconfig.h>
3482a6844aabSmrg
3483eceda581Smrg   FcBool FcConfigSetRescanInterval(FcConfig *config, int
3484eceda581Smrg   rescanInterval);
34852c393a42Smrg
34862c393a42SmrgDescription
34872c393a42Smrg
3488eceda581Smrg   Sets the rescan interval. Returns FcFalse if the interval
3489eceda581Smrg   cannot be set (due to allocation failure). Otherwise returns
3490eceda581Smrg   FcTrue. An interval setting of zero disables automatic checks.
3491eceda581Smrg   If config is NULL, the current configuration is used.
34922c393a42Smrg
3493eceda581SmrgFcConfigAppFontAddFile
34942c393a42Smrg
34952c393a42SmrgName
34962c393a42Smrg
3497eceda581Smrg   FcConfigAppFontAddFile -- Add font file to font database
34982c393a42Smrg
34992c393a42SmrgSynopsis
35002c393a42Smrg
3501eceda581Smrg#include <fontconfig/fontconfig.h>
3502a6844aabSmrg
3503eceda581Smrg   FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8
3504eceda581Smrg   *file);
35052c393a42Smrg
35062c393a42SmrgDescription
35072c393a42Smrg
3508eceda581Smrg   Adds an application-specific font to the configuration. Returns
3509eceda581Smrg   FcFalse if the fonts cannot be added (due to allocation failure
3510eceda581Smrg   or no fonts found). Otherwise returns FcTrue. If config is
3511eceda581Smrg   NULL, the current configuration is used.
35122c393a42Smrg
3513eceda581SmrgFcConfigAppFontAddDir
35142c393a42Smrg
35152c393a42SmrgName
35162c393a42Smrg
3517eceda581Smrg   FcConfigAppFontAddDir -- Add fonts from directory to font
3518eceda581Smrg   database
35192c393a42Smrg
35202c393a42SmrgSynopsis
35212c393a42Smrg
3522eceda581Smrg#include <fontconfig/fontconfig.h>
35232c393a42Smrg
3524eceda581Smrg   FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8
3525eceda581Smrg   *dir);
35262c393a42Smrg
35272c393a42SmrgDescription
35282c393a42Smrg
3529eceda581Smrg   Scans the specified directory for fonts, adding each one found
3530eceda581Smrg   to the application-specific set of fonts. Returns FcFalse if
3531eceda581Smrg   the fonts cannot be added (due to allocation failure).
3532eceda581Smrg   Otherwise returns FcTrue. If config is NULL, the current
3533eceda581Smrg   configuration is used.
35342c393a42Smrg
3535eceda581SmrgFcConfigAppFontClear
35362c393a42Smrg
35372c393a42SmrgName
35382c393a42Smrg
3539eceda581Smrg   FcConfigAppFontClear -- Remove all app fonts from font database
35402c393a42Smrg
35412c393a42SmrgSynopsis
35422c393a42Smrg
3543eceda581Smrg#include <fontconfig/fontconfig.h>
3544a6844aabSmrg
3545ca08ab68Smrg   void FcConfigAppFontClear(FcConfig *config);
35462c393a42Smrg
35472c393a42SmrgDescription
35482c393a42Smrg
3549eceda581Smrg   Clears the set of application-specific fonts. If config is
3550eceda581Smrg   NULL, the current configuration is used.
35512c393a42Smrg
3552eceda581SmrgFcConfigSubstituteWithPat
35532c393a42Smrg
35542c393a42SmrgName
35552c393a42Smrg
3556eceda581Smrg   FcConfigSubstituteWithPat -- Execute substitutions
35572c393a42Smrg
35582c393a42SmrgSynopsis
35592c393a42Smrg
3560eceda581Smrg#include <fontconfig/fontconfig.h>
35612c393a42Smrg
3562eceda581Smrg   FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern
3563eceda581Smrg   *p, FcPattern *p_pat, FcMatchKind kind);
35642c393a42Smrg
35652c393a42SmrgDescription
35662c393a42Smrg
3567eceda581Smrg   Performs the sequence of pattern modification operations, if
3568eceda581Smrg   kind is FcMatchPattern, then those tagged as pattern operations
3569eceda581Smrg   are applied, else if kind is FcMatchFont, those tagged as font
3570eceda581Smrg   operations are applied and p_pat is used for <test> elements
3571eceda581Smrg   with target=pattern. Returns FcFalse if the substitution cannot
3572eceda581Smrg   be performed (due to allocation failure). Otherwise returns
3573eceda581Smrg   FcTrue. If config is NULL, the current configuration is used.
35742c393a42Smrg
3575eceda581SmrgFcConfigSubstitute
35762c393a42Smrg
35772c393a42SmrgName
35782c393a42Smrg
3579eceda581Smrg   FcConfigSubstitute -- Execute substitutions
35802c393a42Smrg
35812c393a42SmrgSynopsis
35822c393a42Smrg
3583eceda581Smrg#include <fontconfig/fontconfig.h>
3584a6844aabSmrg
3585eceda581Smrg   FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p,
3586eceda581Smrg   FcMatchKind kind);
35872c393a42Smrg
35882c393a42SmrgDescription
35892c393a42Smrg
3590eceda581Smrg   Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns
3591eceda581Smrg   FcFalse if the substitution cannot be performed (due to
3592eceda581Smrg   allocation failure). Otherwise returns FcTrue. If config is
3593eceda581Smrg   NULL, the current configuration is used.
3594a32e9e42Smrg
3595eceda581SmrgFcFontMatch
3596a32e9e42Smrg
3597a32e9e42SmrgName
3598a32e9e42Smrg
3599eceda581Smrg   FcFontMatch -- Return best font
3600a32e9e42Smrg
3601a32e9e42SmrgSynopsis
3602a32e9e42Smrg
3603eceda581Smrg#include <fontconfig/fontconfig.h>
3604a32e9e42Smrg
3605eceda581Smrg   FcPattern * FcFontMatch(FcConfig *config, FcPattern *p,
3606eceda581Smrg   FcResult *result);
3607a32e9e42Smrg
3608a32e9e42SmrgDescription
3609a32e9e42Smrg
3610eceda581Smrg   Finds the font in sets most closely matching pattern and
3611eceda581Smrg   returns the result of FcFontRenderPrepare for that font and the
3612eceda581Smrg   provided pattern. This function should be called only after
3613eceda581Smrg   FcConfigSubstitute and FcDefaultSubstitute have been called for
3614eceda581Smrg   p; otherwise the results will not be correct. If config is
3615eceda581Smrg   NULL, the current configuration is used.
3616a32e9e42Smrg
3617eceda581SmrgFcFontSort
3618a32e9e42Smrg
3619a32e9e42SmrgName
3620a32e9e42Smrg
3621eceda581Smrg   FcFontSort -- Return list of matching fonts
3622a32e9e42Smrg
3623a32e9e42SmrgSynopsis
3624a32e9e42Smrg
3625eceda581Smrg#include <fontconfig/fontconfig.h>
3626a32e9e42Smrg
3627eceda581Smrg   FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool
3628eceda581Smrg   trim, FcCharSet **csp, FcResult *result);
3629a32e9e42Smrg
3630a32e9e42SmrgDescription
36312c393a42Smrg
3632eceda581Smrg   Returns the list of fonts sorted by closeness to p. If trim is
3633eceda581Smrg   FcTrue, elements in the list which don't include Unicode
3634eceda581Smrg   coverage not provided by earlier elements in the list are
3635eceda581Smrg   elided. The union of Unicode coverage of all of the fonts is
3636eceda581Smrg   returned in csp, if csp is not NULL. This function should be
3637eceda581Smrg   called only after FcConfigSubstitute and FcDefaultSubstitute
3638eceda581Smrg   have been called for p; otherwise the results will not be
3639eceda581Smrg   correct.
3640a32e9e42Smrg
3641eceda581Smrg   The returned FcFontSet references FcPattern structures which
3642eceda581Smrg   may be shared by the return value from multiple FcFontSort
3643eceda581Smrg   calls, applications must not modify these patterns. Instead,
3644eceda581Smrg   they should be passed, along with p to FcFontRenderPrepare
3645eceda581Smrg   which combines them into a complete pattern.
3646a32e9e42Smrg
3647a32e9e42Smrg   The FcFontSet returned by FcFontSort is destroyed by calling
3648eceda581Smrg   FcFontSetDestroy. If config is NULL, the current configuration
3649eceda581Smrg   is used.
3650a32e9e42Smrg
3651eceda581SmrgFcFontRenderPrepare
3652a32e9e42Smrg
3653a32e9e42SmrgName
3654a32e9e42Smrg
3655eceda581Smrg   FcFontRenderPrepare -- Prepare pattern for loading font file
3656a32e9e42Smrg
3657a32e9e42SmrgSynopsis
3658a32e9e42Smrg
3659eceda581Smrg#include <fontconfig/fontconfig.h>
3660a32e9e42Smrg
3661eceda581Smrg   FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern
3662eceda581Smrg   *pat, FcPattern *font);
3663a32e9e42Smrg
3664a32e9e42SmrgDescription
3665a32e9e42Smrg
3666eceda581Smrg   Creates a new pattern consisting of elements of font not
3667eceda581Smrg   appearing in pat, elements of pat not appearing in font and the
3668eceda581Smrg   best matching value from pat for elements appearing in both.
3669eceda581Smrg   The result is passed to FcConfigSubstituteWithPat with kind
3670eceda581Smrg   FcMatchFont and then returned.
3671a32e9e42Smrg
3672eceda581SmrgFcFontList
36732c393a42Smrg
36742c393a42SmrgName
36752c393a42Smrg
3676eceda581Smrg   FcFontList -- List fonts
36772c393a42Smrg
36782c393a42SmrgSynopsis
36792c393a42Smrg
3680eceda581Smrg#include <fontconfig/fontconfig.h>
3681a32e9e42Smrg
3682eceda581Smrg   FcFontSet * FcFontList(FcConfig *config, FcPattern *p,
3683eceda581Smrg   FcObjectSet *os);
3684a32e9e42Smrg
3685a32e9e42SmrgDescription
3686a32e9e42Smrg
3687eceda581Smrg   Selects fonts matching p, creates patterns from those fonts
3688eceda581Smrg   containing only the objects in os and returns the set of unique
3689eceda581Smrg   such patterns. If config is NULL, the default configuration is
3690eceda581Smrg   checked to be up to date, and used.
3691a32e9e42Smrg
3692eceda581SmrgFcConfigFilename
3693a32e9e42Smrg
3694a32e9e42SmrgName
3695a32e9e42Smrg
3696eceda581Smrg   FcConfigFilename -- Find a config file
3697a32e9e42Smrg
3698a32e9e42SmrgSynopsis
3699a32e9e42Smrg
3700eceda581Smrg#include <fontconfig/fontconfig.h>
3701a32e9e42Smrg
3702a32e9e42Smrg   FcChar8 * FcConfigFilename(const FcChar8 *name);
37032c393a42Smrg
3704a4e54154SmrgDescription
3705a4e54154Smrg
3706eceda581Smrg   This function is deprecated and is replaced by
3707eceda581Smrg   FcConfigGetFilename.
3708a4e54154Smrg
3709eceda581SmrgFcConfigGetFilename
3710a4e54154Smrg
3711a4e54154SmrgName
3712a4e54154Smrg
3713eceda581Smrg   FcConfigGetFilename -- Find a config file
3714a4e54154Smrg
3715a4e54154SmrgSynopsis
3716a4e54154Smrg
3717eceda581Smrg#include <fontconfig/fontconfig.h>
3718a4e54154Smrg
3719eceda581Smrg   FcChar8 * FcConfigGetFilename(FcConfig *config, const FcChar8
3720eceda581Smrg   *name);
3721a4e54154Smrg
37222c393a42SmrgDescription
37232c393a42Smrg
3724eceda581Smrg   Given the specified external entity name, return the associated
3725eceda581Smrg   filename. This provides applications a way to convert various
3726eceda581Smrg   configuration file references into filename form.
3727a32e9e42Smrg
3728eceda581Smrg   A null or empty name indicates that the default configuration
3729eceda581Smrg   file should be used; which file this references can be
3730eceda581Smrg   overridden with the FONTCONFIG_FILE environment variable. Next,
3731eceda581Smrg   if the name starts with ~, it refers to a file in the current
3732eceda581Smrg   users home directory. Otherwise if the name doesn't start with
3733eceda581Smrg   '/', it refers to a file in the default configuration
3734eceda581Smrg   directory; the built-in default directory can be overridden
3735a32e9e42Smrg   with the FONTCONFIG_PATH environment variable.
37362c393a42Smrg
3737eceda581Smrg   The result of this function is affected by the
3738eceda581Smrg   FONTCONFIG_SYSROOT environment variable or equivalent
3739eceda581Smrg   functionality.
3740a4e54154Smrg
3741eceda581SmrgFcConfigParseAndLoad
37422c393a42Smrg
37432c393a42SmrgName
37442c393a42Smrg
3745eceda581Smrg   FcConfigParseAndLoad -- load a configuration file
37462c393a42Smrg
37472c393a42SmrgSynopsis
37482c393a42Smrg
3749eceda581Smrg#include <fontconfig/fontconfig.h>
37502c393a42Smrg
3751eceda581Smrg   FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8
3752eceda581Smrg   *file, FcBool complain);
37532c393a42Smrg
3754a32e9e42SmrgDescription
37552c393a42Smrg
3756a32e9e42Smrg   Walks the configuration in 'file' and constructs the internal
3757eceda581Smrg   representation in 'config'. Any include files referenced from
3758eceda581Smrg   within 'file' will be loaded and parsed. If 'complain' is
3759eceda581Smrg   FcFalse, no warning will be displayed if 'file' does not exist.
3760eceda581Smrg   Error and warning messages will be output to stderr. Returns
3761eceda581Smrg   FcFalse if some error occurred while loading the file, either a
3762eceda581Smrg   parse error, semantic error or allocation failure. Otherwise
3763eceda581Smrg   returns FcTrue.
37642c393a42Smrg
3765eceda581SmrgFcConfigParseAndLoadFromMemory
37662c393a42Smrg
37672c393a42SmrgName
37682c393a42Smrg
3769eceda581Smrg   FcConfigParseAndLoadFromMemory -- load a configuration from
3770eceda581Smrg   memory
37712c393a42Smrg
37722c393a42SmrgSynopsis
37732c393a42Smrg
3774eceda581Smrg#include <fontconfig/fontconfig.h>
3775a32e9e42Smrg
3776eceda581Smrg   FcBool FcConfigParseAndLoadFromMemory(FcConfig *config, const
3777eceda581Smrg   FcChar8 *buffer, FcBool complain);
37782c393a42Smrg
37792c393a42SmrgDescription
37802c393a42Smrg
3781a32e9e42Smrg   Walks the configuration in 'memory' and constructs the internal
3782eceda581Smrg   representation in 'config'. Any includes files referenced from
3783eceda581Smrg   within 'memory' will be loaded and dparsed. If 'complain' is
3784eceda581Smrg   FcFalse, no warning will be displayed if 'file' does not exist.
3785eceda581Smrg   Error and warning messages will be output to stderr. Returns
3786eceda581Smrg   FcFalse if fsome error occurred while loading the file, either
3787eceda581Smrg   a parse error, semantic error or allocation failure. Otherwise
3788eceda581Smrg   returns FcTrue.
37892c393a42Smrg
3790a32e9e42SmrgSince
3791a32e9e42Smrg
3792a32e9e42Smrg   version 2.12.5
3793a32e9e42Smrg
3794eceda581SmrgFcConfigGetSysRoot
37952c393a42Smrg
37962c393a42SmrgName
37972c393a42Smrg
3798eceda581Smrg   FcConfigGetSysRoot -- Obtain the system root directory
37992c393a42Smrg
38002c393a42SmrgSynopsis
38012c393a42Smrg
3802eceda581Smrg#include <fontconfig/fontconfig.h>
38032c393a42Smrg
3804a32e9e42Smrg   const FcChar8 * FcConfigGetSysRoot(const FcConfig *config);
38052c393a42Smrg
38062c393a42SmrgDescription
38072c393a42Smrg
3808eceda581Smrg   Obtains the system root directory in 'config' if available. All
3809eceda581Smrg   files (including file properties in patterns) obtained from
3810eceda581Smrg   this 'config' are relative to this system root directory.
3811a4e54154Smrg
3812eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3813eceda581Smrg   before using this and then FcConfigDestroy when the return
3814eceda581Smrg   value is no longer referenced.
3815a32e9e42Smrg
3816a32e9e42SmrgSince
3817a32e9e42Smrg
3818a32e9e42Smrg   version 2.10.92
38192c393a42Smrg
3820eceda581SmrgFcConfigSetSysRoot
38212c393a42Smrg
38222c393a42SmrgName
38232c393a42Smrg
3824eceda581Smrg   FcConfigSetSysRoot -- Set the system root directory
38252c393a42Smrg
38262c393a42SmrgSynopsis
38272c393a42Smrg
3828eceda581Smrg#include <fontconfig/fontconfig.h>
3829a32e9e42Smrg
3830eceda581Smrg   void FcConfigSetSysRoot(FcConfig *config, const FcChar8
3831eceda581Smrg   *sysroot);
38322c393a42Smrg
38332c393a42SmrgDescription
38342c393a42Smrg
3835eceda581Smrg   Set 'sysroot' as the system root directory. All file paths used
3836eceda581Smrg   or created with this 'config' (including file properties in
3837eceda581Smrg   patterns) will be considered or made relative to this
3838eceda581Smrg   'sysroot'. This allows a host to generate caches for targets at
3839eceda581Smrg   build time. This also allows a cache to be re-targeted to a
3840eceda581Smrg   different base directory if 'FcConfigGetSysRoot' is used to
3841eceda581Smrg   resolve file paths. When setting this on the current config
3842eceda581Smrg   this causes changing current config (calls
3843eceda581Smrg   FcConfigSetCurrent()).
38442c393a42Smrg
3845a32e9e42SmrgSince
3846a32e9e42Smrg
3847a32e9e42Smrg   version 2.10.92
38482c393a42Smrg
3849eceda581SmrgFcConfigFileInfoIterInit
38502c393a42Smrg
38512c393a42SmrgName
38522c393a42Smrg
3853eceda581Smrg   FcConfigFileInfoIterInit -- Initialize the iterator
38542c393a42Smrg
38552c393a42SmrgSynopsis
38562c393a42Smrg
3857eceda581Smrg#include <fontconfig/fontconfig.h>
3858a32e9e42Smrg
3859eceda581Smrg   void FcConfigFileInfoIterInit(FcConfig *config,
3860eceda581Smrg   FcConfigFileInfoIter *iter);
38612c393a42Smrg
38622c393a42SmrgDescription
38632c393a42Smrg
3864eceda581Smrg   Initialize 'iter' with the first iterator in the config file
3865eceda581Smrg   information list.
38662c393a42Smrg
3867eceda581Smrg   The config file information list is stored in numerical order
3868eceda581Smrg   for filenames i.e. how fontconfig actually read them.
3869a4e54154Smrg
3870eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3871eceda581Smrg   before using this and then FcConfigDestroy when the relevant
3872eceda581Smrg   values are no longer referenced.
3873a4e54154Smrg
3874a32e9e42SmrgSince
3875a32e9e42Smrg
3876a32e9e42Smrg   version 2.12.91
3877a32e9e42Smrg
3878eceda581SmrgFcConfigFileInfoIterNext
3879c9710b42Smrg
3880c9710b42SmrgName
3881c9710b42Smrg
3882eceda581Smrg   FcConfigFileInfoIterNext -- Set the iterator to point to the
3883eceda581Smrg   next list
3884c9710b42Smrg
3885c9710b42SmrgSynopsis
3886c9710b42Smrg
3887eceda581Smrg#include <fontconfig/fontconfig.h>
3888c9710b42Smrg
3889eceda581Smrg   FcBool FcConfigFileInfoIterNext(FcConfig *config,
3890eceda581Smrg   FcConfigFileInfoIter *iter);
3891c9710b42Smrg
3892c9710b42SmrgDescription
3893c9710b42Smrg
3894eceda581Smrg   Set 'iter' to point to the next node in the config file
3895eceda581Smrg   information list. If there is no next node, FcFalse is
3896eceda581Smrg   returned.
3897c9710b42Smrg
3898eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3899eceda581Smrg   before using FcConfigFileInfoIterInit and then FcConfigDestroy
3900eceda581Smrg   when the relevant values are no longer referenced.
3901a4e54154Smrg
3902b09479dcSmrgSince
3903c9710b42Smrg
3904a32e9e42Smrg   version 2.12.91
3905c9710b42Smrg
3906eceda581SmrgFcConfigFileInfoIterGet
3907c9710b42Smrg
3908c9710b42SmrgName
3909c9710b42Smrg
3910eceda581Smrg   FcConfigFileInfoIterGet -- Obtain the configuration file
3911eceda581Smrg   information
3912c9710b42Smrg
3913c9710b42SmrgSynopsis
3914c9710b42Smrg
3915eceda581Smrg#include <fontconfig/fontconfig.h>
3916a32e9e42Smrg
3917eceda581Smrg   FcBool FcConfigFileInfoIterGet(FcConfig *config,
3918eceda581Smrg   FcConfigFileInfoIter *iter, FcChar8 **name, FcChar8
3919eceda581Smrg   **description, FcBool *enabled);
3920c9710b42Smrg
3921c9710b42SmrgDescription
3922c9710b42Smrg
3923eceda581Smrg   Obtain the filename, the description and the flag whether it is
3924eceda581Smrg   enabled or not for 'iter' where points to current configuration
3925eceda581Smrg   file information. If the iterator is invalid, FcFalse is
3926eceda581Smrg   returned.
3927c9710b42Smrg
3928eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3929eceda581Smrg   before using FcConfigFileInfoIterInit and then FcConfigDestroy
3930eceda581Smrg   when the relevant values are no longer referenced.
3931a4e54154Smrg
3932b09479dcSmrgSince
3933c9710b42Smrg
3934a32e9e42Smrg   version 2.12.91
3935eceda581Smrg     __________________________________________________________
3936a32e9e42Smrg
3937eceda581SmrgFcObjectType
39382c393a42Smrg
3939ca08ab68Smrg   Table of Contents
3940eceda581Smrg   FcNameRegisterObjectTypes -- Register object types
3941eceda581Smrg   FcNameUnregisterObjectTypes -- Unregister object types
3942eceda581Smrg   FcNameGetObjectType -- Lookup an object type
39432c393a42Smrg
3944eceda581Smrg   Provides for application-specified font name object types so
3945eceda581Smrg   that new pattern elements can be generated from font names.
3946ca08ab68Smrg
3947eceda581SmrgFcNameRegisterObjectTypes
39482c393a42Smrg
39492c393a42SmrgName
39502c393a42Smrg
3951eceda581Smrg   FcNameRegisterObjectTypes -- Register object types
39522c393a42Smrg
39532c393a42SmrgSynopsis
39542c393a42Smrg
3955eceda581Smrg#include <fontconfig/fontconfig.h>
39562c393a42Smrg
3957eceda581Smrg   FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int
3958eceda581Smrg   ntype);
39592c393a42Smrg
39602c393a42SmrgDescription
39612c393a42Smrg
3962c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
39632c393a42Smrg
3964eceda581SmrgFcNameUnregisterObjectTypes
39652c393a42Smrg
39662c393a42SmrgName
39672c393a42Smrg
3968eceda581Smrg   FcNameUnregisterObjectTypes -- Unregister object types
39692c393a42Smrg
39702c393a42SmrgSynopsis
39712c393a42Smrg
3972eceda581Smrg#include <fontconfig/fontconfig.h>
3973a6844aabSmrg
3974eceda581Smrg   FcBool FcNameUnregisterObjectTypes(const FcObjectType *types,
3975eceda581Smrg   int ntype);
39762c393a42Smrg
39772c393a42SmrgDescription
39782c393a42Smrg
3979c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
39802c393a42Smrg
3981eceda581SmrgFcNameGetObjectType
39822c393a42Smrg
39832c393a42SmrgName
39842c393a42Smrg
3985eceda581Smrg   FcNameGetObjectType -- Lookup an object type
39862c393a42Smrg
39872c393a42SmrgSynopsis
39882c393a42Smrg
3989eceda581Smrg#include <fontconfig/fontconfig.h>
3990a6844aabSmrg
3991ca08ab68Smrg   const FcObjectType * FcNameGetObjectType(const char *object);
39922c393a42Smrg
39932c393a42SmrgDescription
39942c393a42Smrg
3995ca08ab68Smrg   Return the object type for the pattern element named object.
3996eceda581Smrg     __________________________________________________________
39972c393a42Smrg
3998eceda581SmrgFcConstant
39992c393a42Smrg
4000ca08ab68Smrg   Table of Contents
4001eceda581Smrg   FcNameRegisterConstants -- Register symbolic constants
4002eceda581Smrg   FcNameUnregisterConstants -- Unregister symbolic constants
4003eceda581Smrg   FcNameGetConstant -- Lookup symbolic constant
40041cc69409Smrg   FcNameGetConstantFor -- Lookup symbolic constant For object
4005eceda581Smrg   FcNameConstant -- Get the value for a symbolic constant
40062c393a42Smrg
4007eceda581Smrg   Provides for application-specified symbolic constants for font
4008eceda581Smrg   names.
40092c393a42Smrg
4010eceda581SmrgFcNameRegisterConstants
40112c393a42Smrg
40122c393a42SmrgName
40132c393a42Smrg
4014eceda581Smrg   FcNameRegisterConstants -- Register symbolic constants
40152c393a42Smrg
40162c393a42SmrgSynopsis
40172c393a42Smrg
4018eceda581Smrg#include <fontconfig/fontconfig.h>
40192c393a42Smrg
4020eceda581Smrg   FcBool FcNameRegisterConstants(const FcConstant *consts, int
4021eceda581Smrg   nconsts);
40222c393a42Smrg
40232c393a42SmrgDescription
40242c393a42Smrg
4025c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
40262c393a42Smrg
4027eceda581SmrgFcNameUnregisterConstants
40282c393a42Smrg
40292c393a42SmrgName
40302c393a42Smrg
4031eceda581Smrg   FcNameUnregisterConstants -- Unregister symbolic constants
40322c393a42Smrg
40332c393a42SmrgSynopsis
40342c393a42Smrg
4035eceda581Smrg#include <fontconfig/fontconfig.h>
4036a6844aabSmrg
4037eceda581Smrg   FcBool FcNameUnregisterConstants(const FcConstant *consts, int
4038eceda581Smrg   nconsts);
40392c393a42Smrg
40402c393a42SmrgDescription
40412c393a42Smrg
4042c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
40432c393a42Smrg
4044eceda581SmrgFcNameGetConstant
40452c393a42Smrg
40462c393a42SmrgName
40472c393a42Smrg
4048eceda581Smrg   FcNameGetConstant -- Lookup symbolic constant
40492c393a42Smrg
40502c393a42SmrgSynopsis
40512c393a42Smrg
4052eceda581Smrg#include <fontconfig/fontconfig.h>
4053a6844aabSmrg
4054ca08ab68Smrg   const FcConstant * FcNameGetConstant(FcChar8 *string);
40552c393a42Smrg
40562c393a42SmrgDescription
40572c393a42Smrg
4058eceda581Smrg   Return the FcConstant structure related to symbolic constant
4059eceda581Smrg   string.
40602c393a42Smrg
40611cc69409SmrgFcNameGetConstantFor
40621cc69409Smrg
40631cc69409SmrgName
40641cc69409Smrg
40651cc69409Smrg   FcNameGetConstantFor -- Lookup symbolic constant For object
40661cc69409Smrg
40671cc69409SmrgSynopsis
40681cc69409Smrg
40691cc69409Smrg#include <fontconfig/fontconfig.h>
40701cc69409Smrg
40711cc69409Smrg   const FcConstant * FcNameGetConstantFor(FcChar8 *string, char
40721cc69409Smrg   *object);
40731cc69409Smrg
40741cc69409SmrgDescription
40751cc69409Smrg
40761cc69409Smrg   Return the FcConstant structure related to symbolic constant
40771cc69409Smrg   string for object.
40781cc69409Smrg
4079eceda581SmrgFcNameConstant
40802c393a42Smrg
40812c393a42SmrgName
40822c393a42Smrg
4083eceda581Smrg   FcNameConstant -- Get the value for a symbolic constant
40842c393a42Smrg
40852c393a42SmrgSynopsis
40862c393a42Smrg
4087eceda581Smrg#include <fontconfig/fontconfig.h>
4088a6844aabSmrg
4089ca08ab68Smrg   FcBool FcNameConstant(FcChar8 *string, int *result);
40902c393a42Smrg
40912c393a42SmrgDescription
40922c393a42Smrg
4093eceda581Smrg   Returns whether a symbolic constant with name string is
4094eceda581Smrg   registered, placing the value of the constant in result if
4095eceda581Smrg   present.
4096eceda581Smrg     __________________________________________________________
40972c393a42Smrg
4098eceda581SmrgFcWeight
40992c393a42Smrg
4100ca08ab68Smrg   Table of Contents
4101eceda581Smrg   FcWeightFromOpenTypeDouble -- Convert from OpenType weight
4102eceda581Smrg          values to fontconfig ones
4103953daebaSmrg
4104eceda581Smrg   FcWeightToOpenTypeDouble -- Convert from fontconfig weight
4105eceda581Smrg          values to OpenType ones
4106a32e9e42Smrg
4107eceda581Smrg   FcWeightFromOpenType -- Convert from OpenType weight values to
4108eceda581Smrg          fontconfig ones
4109a32e9e42Smrg
4110eceda581Smrg   FcWeightToOpenType -- Convert from fontconfig weight values to
4111eceda581Smrg          OpenType ones
4112953daebaSmrg
4113953daebaSmrg   Maps weights to and from OpenType weights.
4114953daebaSmrg
4115eceda581SmrgFcWeightFromOpenTypeDouble
4116953daebaSmrg
4117953daebaSmrgName
4118953daebaSmrg
4119eceda581Smrg   FcWeightFromOpenTypeDouble -- Convert from OpenType weight
4120eceda581Smrg   values to fontconfig ones
4121953daebaSmrg
4122953daebaSmrgSynopsis
4123953daebaSmrg
4124eceda581Smrg#include <fontconfig/fontconfig.h>
4125a32e9e42Smrg
4126a32e9e42Smrg   double FcWeightFromOpenTypeDouble(doubleot_weight);
4127a32e9e42Smrg
4128a32e9e42SmrgDescription
4129a32e9e42Smrg
4130eceda581Smrg   FcWeightFromOpenTypeDouble returns an double value to use with
4131eceda581Smrg   FC_WEIGHT, from an double in the 1..1000 range, resembling the
4132eceda581Smrg   numbers from OpenType specification's OS/2 usWeight numbers,
4133eceda581Smrg   which are also similar to CSS font-weight numbers. If input is
4134eceda581Smrg   negative, zero, or greater than 1000, returns -1. This function
4135eceda581Smrg   linearly interpolates between various FC_WEIGHT_* constants. As
4136eceda581Smrg   such, the returned value does not necessarily match any of the
4137eceda581Smrg   predefined constants.
4138a32e9e42Smrg
4139a32e9e42SmrgSince
4140a32e9e42Smrg
4141a32e9e42Smrg   version 2.12.92
4142a32e9e42Smrg
4143eceda581SmrgFcWeightToOpenTypeDouble
4144a32e9e42Smrg
4145a32e9e42SmrgName
4146a32e9e42Smrg
4147eceda581Smrg   FcWeightToOpenTypeDouble -- Convert from fontconfig weight
4148eceda581Smrg   values to OpenType ones
4149a32e9e42Smrg
4150a32e9e42SmrgSynopsis
4151a32e9e42Smrg
4152eceda581Smrg#include <fontconfig/fontconfig.h>
4153a32e9e42Smrg
4154a32e9e42Smrg   double FcWeightToOpenTypeDouble(doubleot_weight);
4155a32e9e42Smrg
4156a32e9e42SmrgDescription
4157a32e9e42Smrg
4158eceda581Smrg   FcWeightToOpenTypeDouble is the inverse of
4159eceda581Smrg   FcWeightFromOpenType. If the input is less than FC_WEIGHT_THIN
4160eceda581Smrg   or greater than FC_WEIGHT_EXTRABLACK, returns -1. Otherwise
4161eceda581Smrg   returns a number in the range 1 to 1000.
4162a32e9e42Smrg
4163a32e9e42SmrgSince
4164a32e9e42Smrg
4165a32e9e42Smrg   version 2.12.92
4166a32e9e42Smrg
4167eceda581SmrgFcWeightFromOpenType
4168a32e9e42Smrg
4169a32e9e42SmrgName
4170a32e9e42Smrg
4171eceda581Smrg   FcWeightFromOpenType -- Convert from OpenType weight values to
4172eceda581Smrg   fontconfig ones
4173a32e9e42Smrg
4174a32e9e42SmrgSynopsis
4175a32e9e42Smrg
4176eceda581Smrg#include <fontconfig/fontconfig.h>
41772c393a42Smrg
4178953daebaSmrg   int FcWeightFromOpenType(intot_weight);
41792c393a42Smrg
4180953daebaSmrgDescription
41812c393a42Smrg
4182eceda581Smrg   FcWeightFromOpenType is like FcWeightFromOpenTypeDouble but
4183eceda581Smrg   with integer arguments. Use the other function instead.
4184ca08ab68Smrg
4185953daebaSmrgSince
4186ca08ab68Smrg
4187953daebaSmrg   version 2.11.91
4188ca08ab68Smrg
4189eceda581SmrgFcWeightToOpenType
41902c393a42Smrg
41912c393a42SmrgName
41922c393a42Smrg
4193eceda581Smrg   FcWeightToOpenType -- Convert from fontconfig weight values to
4194eceda581Smrg   OpenType ones
41952c393a42Smrg
41962c393a42SmrgSynopsis
41972c393a42Smrg
4198eceda581Smrg#include <fontconfig/fontconfig.h>
41992c393a42Smrg
4200953daebaSmrg   int FcWeightToOpenType(intot_weight);
42012c393a42Smrg
42022c393a42SmrgDescription
42032c393a42Smrg
4204eceda581Smrg   FcWeightToOpenType is like FcWeightToOpenTypeDouble but with
4205eceda581Smrg   integer arguments. Use the other function instead.
4206953daebaSmrg
4207953daebaSmrgSince
4208953daebaSmrg
4209953daebaSmrg   version 2.11.91
4210eceda581Smrg     __________________________________________________________
4211953daebaSmrg
4212eceda581SmrgFcBlanks
4213953daebaSmrg
4214953daebaSmrg   Table of Contents
4215eceda581Smrg   FcBlanksCreate -- Create an FcBlanks
4216eceda581Smrg   FcBlanksDestroy -- Destroy and FcBlanks
4217eceda581Smrg   FcBlanksAdd -- Add a character to an FcBlanks
4218eceda581Smrg   FcBlanksIsMember -- Query membership in an FcBlanks
4219953daebaSmrg
4220eceda581Smrg   An FcBlanks object holds a list of Unicode chars which are
4221eceda581Smrg   expected to be blank when drawn. When scanning new fonts, any
4222eceda581Smrg   glyphs which are empty and not in this list will be assumed to
4223eceda581Smrg   be broken and not placed in the FcCharSet associated with the
4224eceda581Smrg   font. This provides a significantly more accurate CharSet for
4225eceda581Smrg   applications.
42262c393a42Smrg
4227eceda581Smrg   FcBlanks is deprecated and should not be used in newly written
4228eceda581Smrg   code. It is still accepted by some functions for compatibility
4229eceda581Smrg   with older code but will be removed in the future.
4230a32e9e42Smrg
4231eceda581SmrgFcBlanksCreate
42322c393a42Smrg
42332c393a42SmrgName
42342c393a42Smrg
4235eceda581Smrg   FcBlanksCreate -- Create an FcBlanks
42362c393a42Smrg
42372c393a42SmrgSynopsis
42382c393a42Smrg
4239eceda581Smrg#include <fontconfig/fontconfig.h>
42402c393a42Smrg
4241953daebaSmrg   FcBlanks * FcBlanksCreate(void);
42422c393a42Smrg
42432c393a42SmrgDescription
42442c393a42Smrg
4245a32e9e42Smrg   FcBlanks is deprecated. This function always returns NULL.
42462c393a42Smrg
4247eceda581SmrgFcBlanksDestroy
42482c393a42Smrg
42492c393a42SmrgName
42502c393a42Smrg
4251eceda581Smrg   FcBlanksDestroy -- Destroy and FcBlanks
42522c393a42Smrg
42532c393a42SmrgSynopsis
42542c393a42Smrg
4255eceda581Smrg#include <fontconfig/fontconfig.h>
4256a6844aabSmrg
4257953daebaSmrg   void FcBlanksDestroy(FcBlanks *b);
42582c393a42Smrg
42592c393a42SmrgDescription
42602c393a42Smrg
4261a32e9e42Smrg   FcBlanks is deprecated. This function does nothing.
42622c393a42Smrg
4263eceda581SmrgFcBlanksAdd
42642c393a42Smrg
42652c393a42SmrgName
42662c393a42Smrg
4267eceda581Smrg   FcBlanksAdd -- Add a character to an FcBlanks
42682c393a42Smrg
42692c393a42SmrgSynopsis
42702c393a42Smrg
4271eceda581Smrg#include <fontconfig/fontconfig.h>
4272a6844aabSmrg
4273953daebaSmrg   FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4);
42742c393a42Smrg
42752c393a42SmrgDescription
42762c393a42Smrg
4277a32e9e42Smrg   FcBlanks is deprecated. This function always returns FALSE.
42782c393a42Smrg
4279eceda581SmrgFcBlanksIsMember
4280ca08ab68Smrg
4281953daebaSmrgName
4282ca08ab68Smrg
4283eceda581Smrg   FcBlanksIsMember -- Query membership in an FcBlanks
4284ca08ab68Smrg
4285953daebaSmrgSynopsis
4286ca08ab68Smrg
4287eceda581Smrg#include <fontconfig/fontconfig.h>
4288a6844aabSmrg
4289953daebaSmrg   FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4);
42902c393a42Smrg
4291953daebaSmrgDescription
42922c393a42Smrg
4293a32e9e42Smrg   FcBlanks is deprecated. This function always returns FALSE.
4294eceda581Smrg     __________________________________________________________
4295a32e9e42Smrg
4296eceda581SmrgFcAtomic
42972c393a42Smrg
4298953daebaSmrg   Table of Contents
4299eceda581Smrg   FcAtomicCreate -- create an FcAtomic object
4300eceda581Smrg   FcAtomicLock -- lock a file
4301eceda581Smrg   FcAtomicNewFile -- return new temporary file name
4302eceda581Smrg   FcAtomicOrigFile -- return original file name
4303eceda581Smrg   FcAtomicReplaceOrig -- replace original with new
4304eceda581Smrg   FcAtomicDeleteNew -- delete new file
4305eceda581Smrg   FcAtomicUnlock -- unlock a file
4306eceda581Smrg   FcAtomicDestroy -- destroy an FcAtomic object
4307ca08ab68Smrg
4308eceda581Smrg   These functions provide a safe way to update configuration
4309eceda581Smrg   files, allowing ongoing reading of the old configuration file
4310eceda581Smrg   while locked for writing and ensuring that a consistent and
4311eceda581Smrg   complete version of the configuration file is always available.
4312a32e9e42Smrg
4313eceda581SmrgFcAtomicCreate
43142c393a42Smrg
43152c393a42SmrgName
43162c393a42Smrg
4317eceda581Smrg   FcAtomicCreate -- create an FcAtomic object
43182c393a42Smrg
43192c393a42SmrgSynopsis
43202c393a42Smrg
4321eceda581Smrg#include <fontconfig/fontconfig.h>
4322a6844aabSmrg
4323ca08ab68Smrg   FcAtomic * FcAtomicCreate(const FcChar8 *file);
43242c393a42Smrg
43252c393a42SmrgDescription
43262c393a42Smrg
4327eceda581Smrg   Creates a data structure containing data needed to control
4328eceda581Smrg   access to file. Writing is done to a separate file. Once that
4329eceda581Smrg   file is complete, the original configuration file is atomically
4330eceda581Smrg   replaced so that reading process always see a consistent and
4331eceda581Smrg   complete file without the need to lock for reading.
43322c393a42Smrg
4333eceda581SmrgFcAtomicLock
43342c393a42Smrg
43352c393a42SmrgName
43362c393a42Smrg
4337eceda581Smrg   FcAtomicLock -- lock a file
43382c393a42Smrg
43392c393a42SmrgSynopsis
43402c393a42Smrg
4341eceda581Smrg#include <fontconfig/fontconfig.h>
4342a6844aabSmrg
4343ca08ab68Smrg   FcBool FcAtomicLock(FcAtomic *atomic);
43442c393a42Smrg
43452c393a42SmrgDescription
43462c393a42Smrg
4347eceda581Smrg   Attempts to lock the file referenced by atomic. Returns FcFalse
4348eceda581Smrg   if the file is already locked, else returns FcTrue and leaves
4349eceda581Smrg   the file locked.
43502c393a42Smrg
4351eceda581SmrgFcAtomicNewFile
43522c393a42Smrg
43532c393a42SmrgName
43542c393a42Smrg
4355eceda581Smrg   FcAtomicNewFile -- return new temporary file name
43562c393a42Smrg
43572c393a42SmrgSynopsis
43582c393a42Smrg
4359eceda581Smrg#include <fontconfig/fontconfig.h>
4360a6844aabSmrg
4361ca08ab68Smrg   FcChar8 * FcAtomicNewFile(FcAtomic *atomic);
43622c393a42Smrg
43632c393a42SmrgDescription
43642c393a42Smrg
4365eceda581Smrg   Returns the filename for writing a new version of the file
4366eceda581Smrg   referenced by atomic.
43672c393a42Smrg
4368eceda581SmrgFcAtomicOrigFile
43692c393a42Smrg
43702c393a42SmrgName
43712c393a42Smrg
4372eceda581Smrg   FcAtomicOrigFile -- return original file name
43732c393a42Smrg
43742c393a42SmrgSynopsis
43752c393a42Smrg
4376eceda581Smrg#include <fontconfig/fontconfig.h>
4377a6844aabSmrg
4378ca08ab68Smrg   FcChar8 * FcAtomicOrigFile(FcAtomic *atomic);
43792c393a42Smrg
43802c393a42SmrgDescription
43812c393a42Smrg
4382ca08ab68Smrg   Returns the file referenced by atomic.
43832c393a42Smrg
4384eceda581SmrgFcAtomicReplaceOrig
43852c393a42Smrg
43862c393a42SmrgName
43872c393a42Smrg
4388eceda581Smrg   FcAtomicReplaceOrig -- replace original with new
43892c393a42Smrg
43902c393a42SmrgSynopsis
43912c393a42Smrg
4392eceda581Smrg#include <fontconfig/fontconfig.h>
4393a6844aabSmrg
4394ca08ab68Smrg   FcBool FcAtomicReplaceOrig(FcAtomic *atomic);
43952c393a42Smrg
43962c393a42SmrgDescription
43972c393a42Smrg
4398eceda581Smrg   Replaces the original file referenced by atomic with the new
4399eceda581Smrg   file. Returns FcFalse if the file cannot be replaced due to
4400eceda581Smrg   permission issues in the filesystem. Otherwise returns FcTrue.
44012c393a42Smrg
4402eceda581SmrgFcAtomicDeleteNew
44032c393a42Smrg
44042c393a42SmrgName
44052c393a42Smrg
4406eceda581Smrg   FcAtomicDeleteNew -- delete new file
44072c393a42Smrg
44082c393a42SmrgSynopsis
44092c393a42Smrg
4410eceda581Smrg#include <fontconfig/fontconfig.h>
4411a6844aabSmrg
4412ca08ab68Smrg   void FcAtomicDeleteNew(FcAtomic *atomic);
44132c393a42Smrg
44142c393a42SmrgDescription
44152c393a42Smrg
4416eceda581Smrg   Deletes the new file. Used in error recovery to back out
4417eceda581Smrg   changes.
44182c393a42Smrg
4419eceda581SmrgFcAtomicUnlock
44202c393a42Smrg
44212c393a42SmrgName
44222c393a42Smrg
4423eceda581Smrg   FcAtomicUnlock -- unlock a file
44242c393a42Smrg
44252c393a42SmrgSynopsis
44262c393a42Smrg
4427eceda581Smrg#include <fontconfig/fontconfig.h>
4428a6844aabSmrg
4429ca08ab68Smrg   void FcAtomicUnlock(FcAtomic *atomic);
44302c393a42Smrg
44312c393a42SmrgDescription
44322c393a42Smrg
4433ca08ab68Smrg   Unlocks the file.
44342c393a42Smrg
4435eceda581SmrgFcAtomicDestroy
44362c393a42Smrg
44372c393a42SmrgName
44382c393a42Smrg
4439eceda581Smrg   FcAtomicDestroy -- destroy an FcAtomic object
44402c393a42Smrg
44412c393a42SmrgSynopsis
44422c393a42Smrg
4443eceda581Smrg#include <fontconfig/fontconfig.h>
4444a6844aabSmrg
4445ca08ab68Smrg   void FcAtomicDestroy(FcAtomic *atomic);
44462c393a42Smrg
44472c393a42SmrgDescription
44482c393a42Smrg
4449ca08ab68Smrg   Destroys atomic.
4450eceda581Smrg     __________________________________________________________
44512c393a42Smrg
4452eceda581SmrgFile and Directory routines
4453ca08ab68Smrg
4454ca08ab68Smrg   Table of Contents
4455eceda581Smrg   FcFileScan -- scan a font file
4456eceda581Smrg   FcFileIsDir -- check whether a file is a directory
4457eceda581Smrg   FcDirScan -- scan a font directory without caching it
4458eceda581Smrg   FcDirSave -- DEPRECATED: formerly used to save a directory
4459eceda581Smrg          cache
4460ca08ab68Smrg
4461eceda581Smrg   FcDirCacheUnlink -- Remove all caches related to dir
4462eceda581Smrg   FcDirCacheValid -- check directory cache
4463eceda581Smrg   FcDirCacheLoad -- load a directory cache
4464eceda581Smrg   FcDirCacheRescan -- Re-scan a directory cache
4465eceda581Smrg   FcDirCacheRead -- read or construct a directory cache
4466eceda581Smrg   FcDirCacheLoadFile -- load a cache file
4467eceda581Smrg   FcDirCacheUnload -- unload a cache file
44682c393a42Smrg
4469eceda581Smrg   These routines work with font files and directories, including
4470eceda581Smrg   font directory cache files.
4471a32e9e42Smrg
4472eceda581SmrgFcFileScan
44732c393a42Smrg
44742c393a42SmrgName
44752c393a42Smrg
4476eceda581Smrg   FcFileScan -- scan a font file
44772c393a42Smrg
44782c393a42SmrgSynopsis
44792c393a42Smrg
4480eceda581Smrg#include <fontconfig/fontconfig.h>
4481a32e9e42Smrg
4482eceda581Smrg   FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
4483eceda581Smrg   *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force);
44842c393a42Smrg
44852c393a42SmrgDescription
44862c393a42Smrg
4487eceda581Smrg   Scans a single file and adds all fonts found to set. If force
4488eceda581Smrg   is FcTrue, then the file is scanned even if associated
4489eceda581Smrg   information is found in cache. If file is a directory, it is
4490eceda581Smrg   added to dirs. Whether fonts are found depends on fontconfig
4491eceda581Smrg   policy as well as the current configuration. Internally,
4492eceda581Smrg   fontconfig will ignore BDF and PCF fonts which are not in
4493eceda581Smrg   Unicode (or the effectively equivalent ISO Latin-1) encoding as
4494eceda581Smrg   those are not usable by Unicode-based applications. The
4495eceda581Smrg   configuration can ignore fonts based on filename or contents of
4496eceda581Smrg   the font file itself. Returns FcFalse if any of the fonts
4497eceda581Smrg   cannot be added (due to allocation failure). Otherwise returns
4498eceda581Smrg   FcTrue.
44992c393a42Smrg
4500eceda581SmrgFcFileIsDir
45012c393a42Smrg
45022c393a42SmrgName
45032c393a42Smrg
4504eceda581Smrg   FcFileIsDir -- check whether a file is a directory
45052c393a42Smrg
45062c393a42SmrgSynopsis
45072c393a42Smrg
4508eceda581Smrg#include <fontconfig/fontconfig.h>
4509a6844aabSmrg
4510ca08ab68Smrg   FcBool FcFileIsDir(const FcChar8 *file);
45112c393a42Smrg
45122c393a42SmrgDescription
45132c393a42Smrg
4514eceda581Smrg   Returns FcTrue if file is a directory, otherwise returns
4515eceda581Smrg   FcFalse.
45162c393a42Smrg
4517eceda581SmrgFcDirScan
45182c393a42Smrg
45192c393a42SmrgName
45202c393a42Smrg
4521eceda581Smrg   FcDirScan -- scan a font directory without caching it
45222c393a42Smrg
45232c393a42SmrgSynopsis
45242c393a42Smrg
4525eceda581Smrg#include <fontconfig/fontconfig.h>
4526a32e9e42Smrg
4527eceda581Smrg   FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
4528eceda581Smrg   *cache, FcBlanks *blanks, const FcChar8 *dir, FcBool force);
45292c393a42Smrg
45302c393a42SmrgDescription
45312c393a42Smrg
4532eceda581Smrg   If cache is not zero or if force is FcFalse, this function
4533eceda581Smrg   currently returns FcFalse. Otherwise, it scans an entire
4534eceda581Smrg   directory and adds all fonts found to set. Any subdirectories
4535eceda581Smrg   found are added to dirs. Calling this function does not create
4536eceda581Smrg   any cache files. Use FcDirCacheRead() if caching is desired.
45372c393a42Smrg
4538eceda581SmrgFcDirSave
45392c393a42Smrg
45402c393a42SmrgName
45412c393a42Smrg
4542eceda581Smrg   FcDirSave -- DEPRECATED: formerly used to save a directory
4543eceda581Smrg   cache
45442c393a42Smrg
45452c393a42SmrgSynopsis
45462c393a42Smrg
4547eceda581Smrg#include <fontconfig/fontconfig.h>
4548a32e9e42Smrg
4549eceda581Smrg   FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8
4550eceda581Smrg   *dir);
45512c393a42Smrg
45522c393a42SmrgDescription
45532c393a42Smrg
4554eceda581Smrg   This function now does nothing aside from returning FcFalse. It
4555eceda581Smrg   used to creates the per-directory cache file for dir and
4556eceda581Smrg   populates it with the fonts in set and subdirectories in dirs.
4557eceda581Smrg   All of this functionality is now automatically managed by
4558eceda581Smrg   FcDirCacheLoad and FcDirCacheRead.
45592c393a42Smrg
4560eceda581SmrgFcDirCacheUnlink
45612c393a42Smrg
45622c393a42SmrgName
45632c393a42Smrg
4564eceda581Smrg   FcDirCacheUnlink -- Remove all caches related to dir
45652c393a42Smrg
45662c393a42SmrgSynopsis
45672c393a42Smrg
4568eceda581Smrg#include <fontconfig/fontconfig.h>
4569a6844aabSmrg
4570ca08ab68Smrg   FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config);
45712c393a42Smrg
45722c393a42SmrgDescription
45732c393a42Smrg
4574eceda581Smrg   Scans the cache directories in config, removing any instances
4575eceda581Smrg   of the cache file for dir. Returns FcFalse when some internal
4576eceda581Smrg   error occurs (out of memory, etc). Errors actually unlinking
4577eceda581Smrg   any files are ignored.
45782c393a42Smrg
4579eceda581SmrgFcDirCacheValid
45802c393a42Smrg
45812c393a42SmrgName
45822c393a42Smrg
4583eceda581Smrg   FcDirCacheValid -- check directory cache
45842c393a42Smrg
45852c393a42SmrgSynopsis
45862c393a42Smrg
4587eceda581Smrg#include <fontconfig/fontconfig.h>
4588a6844aabSmrg
4589ca08ab68Smrg   FcBool FcDirCacheValid(const FcChar8 *dir);
45902c393a42Smrg
45912c393a42SmrgDescription
45922c393a42Smrg
4593eceda581Smrg   Returns FcTrue if dir has an associated valid cache file, else
4594eceda581Smrg   returns FcFalse
45952c393a42Smrg
4596eceda581SmrgFcDirCacheLoad
45972c393a42Smrg
45982c393a42SmrgName
45992c393a42Smrg
4600eceda581Smrg   FcDirCacheLoad -- load a directory cache
46012c393a42Smrg
46022c393a42SmrgSynopsis
46032c393a42Smrg
4604eceda581Smrg#include <fontconfig/fontconfig.h>
4605a32e9e42Smrg
4606eceda581Smrg   FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config,
4607eceda581Smrg   FcChar8 **cache_file);
46082c393a42Smrg
46092c393a42SmrgDescription
46102c393a42Smrg
4611eceda581Smrg   Loads the cache related to dir. If no cache file exists,
4612eceda581Smrg   returns NULL. The name of the cache file is returned in
4613eceda581Smrg   cache_file, unless that is NULL. See also FcDirCacheRead.
46142c393a42Smrg
4615eceda581SmrgFcDirCacheRescan
4616b09479dcSmrg
4617b09479dcSmrgName
4618b09479dcSmrg
4619eceda581Smrg   FcDirCacheRescan -- Re-scan a directory cache
4620b09479dcSmrg
4621b09479dcSmrgSynopsis
4622b09479dcSmrg
4623eceda581Smrg#include <fontconfig/fontconfig.h>
4624b09479dcSmrg
4625eceda581Smrg   FcCache * FcDirCacheRescan(const FcChar8 *dir, FcConfig
4626eceda581Smrg   *config);
4627b09479dcSmrg
4628b09479dcSmrgDescription
4629b09479dcSmrg
4630eceda581Smrg   Re-scan directories only at dir and update the cache. returns
4631eceda581Smrg   NULL if failed.
4632b09479dcSmrg
4633b09479dcSmrgSince
46342c393a42Smrg
4635b09479dcSmrg   version 2.11.1
46362c393a42Smrg
4637eceda581SmrgFcDirCacheRead
46382c393a42Smrg
46392c393a42SmrgName
46402c393a42Smrg
4641eceda581Smrg   FcDirCacheRead -- read or construct a directory cache
46422c393a42Smrg
46432c393a42SmrgSynopsis
46442c393a42Smrg
4645eceda581Smrg#include <fontconfig/fontconfig.h>
4646a32e9e42Smrg
4647eceda581Smrg   FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force,
4648eceda581Smrg   FcConfig *config);
46492c393a42Smrg
46502c393a42SmrgDescription
46512c393a42Smrg
4652eceda581Smrg   This returns a cache for dir. If force is FcFalse, then an
4653eceda581Smrg   existing, valid cache file will be used. Otherwise, a new cache
4654eceda581Smrg   will be created by scanning the directory and that returned.
46552c393a42Smrg
4656eceda581SmrgFcDirCacheLoadFile
46572c393a42Smrg
46582c393a42SmrgName
46592c393a42Smrg
4660eceda581Smrg   FcDirCacheLoadFile -- load a cache file
46612c393a42Smrg
46622c393a42SmrgSynopsis
46632c393a42Smrg
4664eceda581Smrg#include <fontconfig/fontconfig.h>
4665a32e9e42Smrg
4666eceda581Smrg   FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct
4667eceda581Smrg   stat *file_stat);
46682c393a42Smrg
46692c393a42SmrgDescription
46702c393a42Smrg
4671eceda581Smrg   This function loads a directory cache from cache_file. If
4672eceda581Smrg   file_stat is non-NULL, it will be filled with the results of
4673eceda581Smrg   stat(2) on the cache file.
46742c393a42Smrg
4675eceda581SmrgFcDirCacheUnload
46762c393a42Smrg
46772c393a42SmrgName
46782c393a42Smrg
4679eceda581Smrg   FcDirCacheUnload -- unload a cache file
46802c393a42Smrg
46812c393a42SmrgSynopsis
46822c393a42Smrg
4683eceda581Smrg#include <fontconfig/fontconfig.h>
4684a6844aabSmrg
4685ca08ab68Smrg   void FcDirCacheUnload(FcCache *cache);
46862c393a42Smrg
46872c393a42SmrgDescription
46882c393a42Smrg
4689eceda581Smrg   This function dereferences cache. When no other references to
4690eceda581Smrg   it remain, all memory associated with the cache will be freed.
4691eceda581Smrg     __________________________________________________________
4692a32e9e42Smrg
4693eceda581SmrgFcCache routines
4694ca08ab68Smrg
4695ca08ab68Smrg   Table of Contents
4696eceda581Smrg   FcCacheDir -- Return directory of cache
4697eceda581Smrg   FcCacheCopySet -- Returns a copy of the fontset from cache
4698eceda581Smrg   FcCacheSubdir -- Return the i'th subdirectory.
4699eceda581Smrg   FcCacheNumSubdir -- Return the number of subdirectories in
4700eceda581Smrg          cache.
4701ca08ab68Smrg
4702eceda581Smrg   FcCacheNumFont -- Returns the number of fonts in cache.
4703eceda581Smrg   FcDirCacheClean -- Clean up a cache directory
4704eceda581Smrg   FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
4705eceda581Smrg   FcDirCacheCreateUUID -- Create .uuid file at a directory
4706eceda581Smrg   FcDirCacheDeleteUUID -- Delete .uuid file
47072c393a42Smrg
4708eceda581Smrg   These routines work with font directory caches, accessing their
4709eceda581Smrg   contents in limited ways. It is not expected that normal
4710eceda581Smrg   applications will need to use these functions.
4711ca08ab68Smrg
4712eceda581SmrgFcCacheDir
47132c393a42Smrg
47142c393a42SmrgName
47152c393a42Smrg
4716eceda581Smrg   FcCacheDir -- Return directory of cache
47172c393a42Smrg
47182c393a42SmrgSynopsis
47192c393a42Smrg
4720eceda581Smrg#include <fontconfig/fontconfig.h>
4721a6844aabSmrg
4722ca08ab68Smrg   const FcChar8 * FcCacheDir(const FcCache *cache);
47232c393a42Smrg
47242c393a42SmrgDescription
47252c393a42Smrg
4726eceda581Smrg   This function returns the directory from which the cache was
4727eceda581Smrg   constructed.
47282c393a42Smrg
4729eceda581SmrgFcCacheCopySet
47302c393a42Smrg
47312c393a42SmrgName
47322c393a42Smrg
4733eceda581Smrg   FcCacheCopySet -- Returns a copy of the fontset from cache
47342c393a42Smrg
47352c393a42SmrgSynopsis
47362c393a42Smrg
4737eceda581Smrg#include <fontconfig/fontconfig.h>
4738a6844aabSmrg
4739ca08ab68Smrg   FcFontSet * FcCacheCopySet(const FcCache *cache);
47402c393a42Smrg
47412c393a42SmrgDescription
47422c393a42Smrg
4743eceda581Smrg   The returned fontset contains each of the font patterns from
4744eceda581Smrg   cache. This fontset may be modified, but the patterns from the
4745eceda581Smrg   cache are read-only.
47462c393a42Smrg
4747eceda581SmrgFcCacheSubdir
47482c393a42Smrg
47492c393a42SmrgName
47502c393a42Smrg
4751eceda581Smrg   FcCacheSubdir -- Return the i'th subdirectory.
47522c393a42Smrg
47532c393a42SmrgSynopsis
47542c393a42Smrg
4755eceda581Smrg#include <fontconfig/fontconfig.h>
4756a6844aabSmrg
4757ca08ab68Smrg   const FcChar8 * FcCacheSubdir(const FcCache *cache, inti);
47582c393a42Smrg
47592c393a42SmrgDescription
47602c393a42Smrg
4761eceda581Smrg   The set of subdirectories stored in a cache file are indexed by
4762eceda581Smrg   this function, i should range from 0 to n-1, where n is the
4763eceda581Smrg   return value from FcCacheNumSubdir.
47642c393a42Smrg
4765eceda581SmrgFcCacheNumSubdir
47662c393a42Smrg
47672c393a42SmrgName
47682c393a42Smrg
4769eceda581Smrg   FcCacheNumSubdir -- Return the number of subdirectories in
4770eceda581Smrg   cache.
47712c393a42Smrg
47722c393a42SmrgSynopsis
47732c393a42Smrg
4774eceda581Smrg#include <fontconfig/fontconfig.h>
4775a6844aabSmrg
4776ca08ab68Smrg   int FcCacheNumSubdir(const FcCache *cache);
47772c393a42Smrg
47782c393a42SmrgDescription
47792c393a42Smrg
4780ca08ab68Smrg   This returns the total number of subdirectories in the cache.
47812c393a42Smrg
4782eceda581SmrgFcCacheNumFont
47832c393a42Smrg
47842c393a42SmrgName
47852c393a42Smrg
4786eceda581Smrg   FcCacheNumFont -- Returns the number of fonts in cache.
47872c393a42Smrg
47882c393a42SmrgSynopsis
47892c393a42Smrg
4790eceda581Smrg#include <fontconfig/fontconfig.h>
4791a6844aabSmrg
4792ca08ab68Smrg   int FcCacheNumFont(const FcCache *cache);
47932c393a42Smrg
47942c393a42SmrgDescription
47952c393a42Smrg
4796eceda581Smrg   This returns the number of fonts which would be included in the
4797eceda581Smrg   return from FcCacheCopySet.
47982c393a42Smrg
4799eceda581SmrgFcDirCacheClean
4800ca08ab68Smrg
4801ca08ab68SmrgName
4802ca08ab68Smrg
4803eceda581Smrg   FcDirCacheClean -- Clean up a cache directory
4804ca08ab68Smrg
4805ca08ab68SmrgSynopsis
4806ca08ab68Smrg
4807eceda581Smrg#include <fontconfig/fontconfig.h>
4808a6844aabSmrg
4809eceda581Smrg   FcBool FcDirCacheClean(const FcChar8 *cache_dir,
4810eceda581Smrg   FcBoolverbose);
4811ca08ab68Smrg
4812ca08ab68SmrgDescription
48132c393a42Smrg
4814eceda581Smrg   This tries to clean up the cache directory of cache_dir. This
4815eceda581Smrg   returns FcTrue if the operation is successfully complete.
4816eceda581Smrg   otherwise FcFalse.
4817a32e9e42Smrg
4818b09479dcSmrgSince
48192c393a42Smrg
4820b09479dcSmrg   version 2.9.91
4821ca08ab68Smrg
4822eceda581SmrgFcCacheCreateTagFile
48232c393a42Smrg
48242c393a42SmrgName
48252c393a42Smrg
4826eceda581Smrg   FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
48272c393a42Smrg
48282c393a42SmrgSynopsis
48292c393a42Smrg
4830eceda581Smrg#include <fontconfig/fontconfig.h>
4831a6844aabSmrg
4832ca08ab68Smrg   void FcCacheCreateTagFile(const FcConfig *config);
48332c393a42Smrg
48342c393a42SmrgDescription
48352c393a42Smrg
4836eceda581Smrg   This tries to create CACHEDIR.TAG file at the cache directory
4837eceda581Smrg   registered to config.
48382c393a42Smrg
4839b09479dcSmrgSince
48402c393a42Smrg
4841b09479dcSmrg   version 2.9.91
4842ca08ab68Smrg
4843eceda581SmrgFcDirCacheCreateUUID
4844a32e9e42Smrg
4845a32e9e42SmrgName
4846a32e9e42Smrg
4847eceda581Smrg   FcDirCacheCreateUUID -- Create .uuid file at a directory
4848a32e9e42Smrg
4849a32e9e42SmrgSynopsis
4850a32e9e42Smrg
4851eceda581Smrg#include <fontconfig/fontconfig.h>
4852a32e9e42Smrg
4853eceda581Smrg   FcBool FcDirCacheCreateUUID(FcChar8 *dir, FcBoolforce, FcConfig
4854eceda581Smrg   *config);
4855a32e9e42Smrg
4856a32e9e42SmrgDescription
4857a32e9e42Smrg
4858a4e54154Smrg   This function is deprecated. it doesn't take any effects.
4859a32e9e42Smrg
4860a32e9e42SmrgSince
4861a32e9e42Smrg
4862a32e9e42Smrg   version 2.12.92
4863a32e9e42Smrg
4864eceda581SmrgFcDirCacheDeleteUUID
4865a32e9e42Smrg
4866a32e9e42SmrgName
4867a32e9e42Smrg
4868eceda581Smrg   FcDirCacheDeleteUUID -- Delete .uuid file
4869a32e9e42Smrg
4870a32e9e42SmrgSynopsis
4871a32e9e42Smrg
4872eceda581Smrg#include <fontconfig/fontconfig.h>
4873a32e9e42Smrg
4874eceda581Smrg   FcBool FcDirCacheDeleteUUID(const FcChar8 *dir, FcConfig
4875eceda581Smrg   *config);
4876a32e9e42Smrg
4877a32e9e42SmrgDescription
4878a32e9e42Smrg
4879eceda581Smrg   This is to delete .uuid file containing an UUID at a font
4880eceda581Smrg   directory of dir.
4881a32e9e42Smrg
4882a32e9e42SmrgSince
4883a32e9e42Smrg
4884a32e9e42Smrg   version 2.13.1
4885eceda581Smrg     __________________________________________________________
4886a32e9e42Smrg
4887eceda581SmrgFcStrSet and FcStrList
4888ca08ab68Smrg
4889ca08ab68Smrg   Table of Contents
4890eceda581Smrg   FcStrSetCreate -- create a string set
4891eceda581Smrg   FcStrSetMember -- check set for membership
4892eceda581Smrg   FcStrSetEqual -- check sets for equality
4893eceda581Smrg   FcStrSetAdd -- add to a string set
4894eceda581Smrg   FcStrSetAddFilename -- add a filename to a string set
4895eceda581Smrg   FcStrSetDel -- delete from a string set
4896eceda581Smrg   FcStrSetDestroy -- destroy a string set
4897eceda581Smrg   FcStrListCreate -- create a string iterator
4898eceda581Smrg   FcStrListFirst -- get first string in iteration
4899eceda581Smrg   FcStrListNext -- get next string in iteration
4900eceda581Smrg   FcStrListDone -- destroy a string iterator
4901ca08ab68Smrg
4902eceda581Smrg   A data structure for enumerating strings, used to list
4903eceda581Smrg   directories while scanning the configuration as directories are
4904eceda581Smrg   added while scanning.
4905a32e9e42Smrg
4906eceda581SmrgFcStrSetCreate
49072c393a42Smrg
49082c393a42SmrgName
49092c393a42Smrg
4910eceda581Smrg   FcStrSetCreate -- create a string set
49112c393a42Smrg
49122c393a42SmrgSynopsis
49132c393a42Smrg
4914eceda581Smrg#include <fontconfig/fontconfig.h>
4915a6844aabSmrg
4916ca08ab68Smrg   FcStrSet * FcStrSetCreate(void);
49172c393a42Smrg
49182c393a42SmrgDescription
49192c393a42Smrg
4920ca08ab68Smrg   Create an empty set.
49212c393a42Smrg
4922eceda581SmrgFcStrSetMember
49232c393a42Smrg
49242c393a42SmrgName
49252c393a42Smrg
4926eceda581Smrg   FcStrSetMember -- check set for membership
49272c393a42Smrg
49282c393a42SmrgSynopsis
49292c393a42Smrg
4930eceda581Smrg#include <fontconfig/fontconfig.h>
4931a6844aabSmrg
4932ca08ab68Smrg   FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s);
49332c393a42Smrg
49342c393a42SmrgDescription
49352c393a42Smrg
4936ca08ab68Smrg   Returns whether s is a member of set.
49372c393a42Smrg
4938eceda581SmrgFcStrSetEqual
49392c393a42Smrg
49402c393a42SmrgName
49412c393a42Smrg
4942eceda581Smrg   FcStrSetEqual -- check sets for equality
49432c393a42Smrg
49442c393a42SmrgSynopsis
49452c393a42Smrg
4946eceda581Smrg#include <fontconfig/fontconfig.h>
4947a6844aabSmrg
4948ca08ab68Smrg   FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b);
49492c393a42Smrg
49502c393a42SmrgDescription
49512c393a42Smrg
4952eceda581Smrg   Returns whether set_a contains precisely the same strings as
4953eceda581Smrg   set_b. Ordering of strings within the two sets is not
4954eceda581Smrg   considered.
49552c393a42Smrg
4956eceda581SmrgFcStrSetAdd
49572c393a42Smrg
49582c393a42SmrgName
49592c393a42Smrg
4960eceda581Smrg   FcStrSetAdd -- add to a string set
49612c393a42Smrg
49622c393a42SmrgSynopsis
49632c393a42Smrg
4964eceda581Smrg#include <fontconfig/fontconfig.h>
4965a6844aabSmrg
4966ca08ab68Smrg   FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s);
49672c393a42Smrg
49682c393a42SmrgDescription
49692c393a42Smrg
4970ca08ab68Smrg   Adds a copy of s to set.
49712c393a42Smrg
4972eceda581SmrgFcStrSetAddFilename
49732c393a42Smrg
49742c393a42SmrgName
49752c393a42Smrg
4976eceda581Smrg   FcStrSetAddFilename -- add a filename to a string set
49772c393a42Smrg
49782c393a42SmrgSynopsis
49792c393a42Smrg
4980eceda581Smrg#include <fontconfig/fontconfig.h>
4981a6844aabSmrg
4982ca08ab68Smrg   FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s);
49832c393a42Smrg
49842c393a42SmrgDescription
49852c393a42Smrg
4986eceda581Smrg   Adds a copy s to set, The copy is created with
4987eceda581Smrg   FcStrCopyFilename so that leading '~' values are replaced with
4988eceda581Smrg   the value of the HOME environment variable.
49892c393a42Smrg
4990eceda581SmrgFcStrSetDel
49912c393a42Smrg
49922c393a42SmrgName
49932c393a42Smrg
4994eceda581Smrg   FcStrSetDel -- delete from a string set
49952c393a42Smrg
49962c393a42SmrgSynopsis
49972c393a42Smrg
4998eceda581Smrg#include <fontconfig/fontconfig.h>
4999a6844aabSmrg
5000ca08ab68Smrg   FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s);
50012c393a42Smrg
50022c393a42SmrgDescription
50032c393a42Smrg
5004eceda581Smrg   Removes s from set, returning FcTrue if s was a member else
5005eceda581Smrg   FcFalse.
50062c393a42Smrg
5007eceda581SmrgFcStrSetDestroy
50082c393a42Smrg
50092c393a42SmrgName
50102c393a42Smrg
5011eceda581Smrg   FcStrSetDestroy -- destroy a string set
50122c393a42Smrg
50132c393a42SmrgSynopsis
50142c393a42Smrg
5015eceda581Smrg#include <fontconfig/fontconfig.h>
5016a6844aabSmrg
5017ca08ab68Smrg   void FcStrSetDestroy(FcStrSet *set);
50182c393a42Smrg
50192c393a42SmrgDescription
50202c393a42Smrg
5021ca08ab68Smrg   Destroys set.
50222c393a42Smrg
5023eceda581SmrgFcStrListCreate
50242c393a42Smrg
50252c393a42SmrgName
50262c393a42Smrg
5027eceda581Smrg   FcStrListCreate -- create a string iterator
50282c393a42Smrg
50292c393a42SmrgSynopsis
50302c393a42Smrg
5031eceda581Smrg#include <fontconfig/fontconfig.h>
5032a6844aabSmrg
5033ca08ab68Smrg   FcStrList * FcStrListCreate(FcStrSet *set);
50342c393a42Smrg
50352c393a42SmrgDescription
50362c393a42Smrg
5037ca08ab68Smrg   Creates an iterator to list the strings in set.
50382c393a42Smrg
5039eceda581SmrgFcStrListFirst
50406fc018e4Smrg
50416fc018e4SmrgName
50426fc018e4Smrg
5043eceda581Smrg   FcStrListFirst -- get first string in iteration
50446fc018e4Smrg
50456fc018e4SmrgSynopsis
50466fc018e4Smrg
5047eceda581Smrg#include <fontconfig/fontconfig.h>
50486fc018e4Smrg
50496fc018e4Smrg   void FcStrListFirst(FcStrList *list);
50506fc018e4Smrg
50516fc018e4SmrgDescription
50526fc018e4Smrg
50536fc018e4Smrg   Returns the first string in list.
50546fc018e4Smrg
5055b09479dcSmrgSince
50566fc018e4Smrg
5057b09479dcSmrg   version 2.11.0
50582c393a42Smrg
5059eceda581SmrgFcStrListNext
50602c393a42Smrg
50612c393a42SmrgName
50622c393a42Smrg
5063eceda581Smrg   FcStrListNext -- get next string in iteration
50642c393a42Smrg
50652c393a42SmrgSynopsis
50662c393a42Smrg
5067eceda581Smrg#include <fontconfig/fontconfig.h>
5068a6844aabSmrg
5069ca08ab68Smrg   FcChar8 * FcStrListNext(FcStrList *list);
50702c393a42Smrg
50712c393a42SmrgDescription
50722c393a42Smrg
50736fc018e4Smrg   Returns the next string in list.
50742c393a42Smrg
5075eceda581SmrgFcStrListDone
50762c393a42Smrg
5077ca08ab68SmrgName
5078ca08ab68Smrg
5079eceda581Smrg   FcStrListDone -- destroy a string iterator
5080ca08ab68Smrg
5081ca08ab68SmrgSynopsis
5082ca08ab68Smrg
5083eceda581Smrg#include <fontconfig/fontconfig.h>
5084ca08ab68Smrg
5085ca08ab68Smrg   void FcStrListDone(FcStrList *list);
5086ca08ab68Smrg
5087ca08ab68SmrgDescription
5088ca08ab68Smrg
5089ca08ab68Smrg   Destroys the enumerator list.
5090eceda581Smrg     __________________________________________________________
5091ca08ab68Smrg
5092eceda581SmrgString utilities
5093ca08ab68Smrg
5094ca08ab68Smrg   Table of Contents
5095eceda581Smrg   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
5096eceda581Smrg   FcUcs4ToUtf8 -- convert UCS4 to UTF-8
5097eceda581Smrg   FcUtf8Len -- count UTF-8 encoded chars
5098eceda581Smrg   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
5099eceda581Smrg   FcUtf16Len -- count UTF-16 encoded chars
5100eceda581Smrg   FcIsLower -- check for lower case ASCII character
5101eceda581Smrg   FcIsUpper -- check for upper case ASCII character
5102eceda581Smrg   FcToLower -- convert upper case ASCII to lower case
5103eceda581Smrg   FcStrCopy -- duplicate a string
5104eceda581Smrg   FcStrDowncase -- create a lower case translation of a string
5105eceda581Smrg   FcStrCopyFilename -- create a complete path from a filename
5106eceda581Smrg   FcStrCmp -- compare UTF-8 strings
5107eceda581Smrg   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
5108eceda581Smrg   FcStrStr -- locate UTF-8 substring
5109eceda581Smrg   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring case
5110eceda581Smrg   FcStrPlus -- concatenate two strings
5111eceda581Smrg   FcStrFree -- free a string
5112eceda581Smrg   FcStrBuildFilename -- Concatenate strings as a file path
5113eceda581Smrg   FcStrDirname -- directory part of filename
5114eceda581Smrg   FcStrBasename -- last component of filename
5115ca08ab68Smrg
5116eceda581Smrg   Fontconfig manipulates many UTF-8 strings represented with the
5117eceda581Smrg   FcChar8 type. These functions are exposed to help applications
5118eceda581Smrg   deal with these UTF-8 strings in a locale-insensitive manner.
5119a32e9e42Smrg
5120eceda581SmrgFcUtf8ToUcs4
51212c393a42Smrg
51222c393a42SmrgName
51232c393a42Smrg
5124eceda581Smrg   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
51252c393a42Smrg
51262c393a42SmrgSynopsis
51272c393a42Smrg
5128eceda581Smrg#include <fontconfig/fontconfig.h>
5129a6844aabSmrg
5130ca08ab68Smrg   int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len);
51312c393a42Smrg
51322c393a42SmrgDescription
51332c393a42Smrg
5134eceda581Smrg   Converts the next Unicode char from src into dst and returns
5135eceda581Smrg   the number of bytes containing the char. src must be at least
5136eceda581Smrg   len bytes long.
51372c393a42Smrg
5138eceda581SmrgFcUcs4ToUtf8
51392c393a42Smrg
51402c393a42SmrgName
51412c393a42Smrg
5142eceda581Smrg   FcUcs4ToUtf8 -- convert UCS4 to UTF-8
51432c393a42Smrg
51442c393a42SmrgSynopsis
51452c393a42Smrg
5146eceda581Smrg#include <fontconfig/fontconfig.h>
5147a6844aabSmrg
5148ca08ab68Smrg   int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]);
51492c393a42Smrg
51502c393a42SmrgDescription
51512c393a42Smrg
5152eceda581Smrg   Converts the Unicode char from src into dst and returns the
5153eceda581Smrg   number of bytes needed to encode the char.
51542c393a42Smrg
5155eceda581SmrgFcUtf8Len
51562c393a42Smrg
51572c393a42SmrgName
51582c393a42Smrg
5159eceda581Smrg   FcUtf8Len -- count UTF-8 encoded chars
51602c393a42Smrg
51612c393a42SmrgSynopsis
51622c393a42Smrg
5163eceda581Smrg#include <fontconfig/fontconfig.h>
5164a6844aabSmrg
5165eceda581Smrg   FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int
5166eceda581Smrg   *wchar);
51672c393a42Smrg
51682c393a42SmrgDescription
51692c393a42Smrg
5170eceda581Smrg   Counts the number of Unicode chars in len bytes of src. Places
5171eceda581Smrg   that count in nchar. wchar contains 1, 2 or 4 depending on the
5172eceda581Smrg   number of bytes needed to hold the largest Unicode char
5173eceda581Smrg   counted. The return value indicates whether src is a
5174eceda581Smrg   well-formed UTF8 string.
51752c393a42Smrg
5176eceda581SmrgFcUtf16ToUcs4
51772c393a42Smrg
51782c393a42SmrgName
51792c393a42Smrg
5180eceda581Smrg   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
51812c393a42Smrg
51822c393a42SmrgSynopsis
51832c393a42Smrg
5184eceda581Smrg#include <fontconfig/fontconfig.h>
5185a32e9e42Smrg
5186eceda581Smrg   int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst,
5187eceda581Smrg   int len);
51882c393a42Smrg
51892c393a42SmrgDescription
51902c393a42Smrg
5191eceda581Smrg   Converts the next Unicode char from src into dst and returns
5192eceda581Smrg   the number of bytes containing the char. src must be at least
5193eceda581Smrg   len bytes long. Bytes of src are combined into 16-bit units
5194eceda581Smrg   according to endian.
51952c393a42Smrg
5196eceda581SmrgFcUtf16Len
51972c393a42Smrg
51982c393a42SmrgName
51992c393a42Smrg
5200eceda581Smrg   FcUtf16Len -- count UTF-16 encoded chars
52012c393a42Smrg
52022c393a42SmrgSynopsis
52032c393a42Smrg
5204eceda581Smrg#include <fontconfig/fontconfig.h>
5205a32e9e42Smrg
5206eceda581Smrg   FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int
5207eceda581Smrg   *nchar, int *wchar);
52082c393a42Smrg
52092c393a42SmrgDescription
52102c393a42Smrg
5211eceda581Smrg   Counts the number of Unicode chars in len bytes of src. Bytes
5212eceda581Smrg   of src are combined into 16-bit units according to endian.
5213eceda581Smrg   Places that count in nchar. wchar contains 1, 2 or 4 depending
5214eceda581Smrg   on the number of bytes needed to hold the largest Unicode char
5215eceda581Smrg   counted. The return value indicates whether string is a
5216eceda581Smrg   well-formed UTF16 string.
52172c393a42Smrg
5218eceda581SmrgFcIsLower
52192c393a42Smrg
52202c393a42SmrgName
52212c393a42Smrg
5222eceda581Smrg   FcIsLower -- check for lower case ASCII character
52232c393a42Smrg
52242c393a42SmrgSynopsis
52252c393a42Smrg
5226eceda581Smrg#include <fontconfig/fontconfig.h>
5227a6844aabSmrg
5228ca08ab68Smrg   FcBool FcIsLower(FcChar8c);
52292c393a42Smrg
52302c393a42SmrgDescription
52312c393a42Smrg
5232ca08ab68Smrg   This macro checks whether c is an lower case ASCII letter.
52332c393a42Smrg
5234eceda581SmrgFcIsUpper
52352c393a42Smrg
52362c393a42SmrgName
52372c393a42Smrg
5238eceda581Smrg   FcIsUpper -- check for upper case ASCII character
52392c393a42Smrg
52402c393a42SmrgSynopsis
52412c393a42Smrg
5242eceda581Smrg#include <fontconfig/fontconfig.h>
5243a6844aabSmrg
5244ca08ab68Smrg   FcBool FcIsUpper(FcChar8c);
52452c393a42Smrg
52462c393a42SmrgDescription
52472c393a42Smrg
5248ca08ab68Smrg   This macro checks whether c is a upper case ASCII letter.
52492c393a42Smrg
5250eceda581SmrgFcToLower
52512c393a42Smrg
52522c393a42SmrgName
52532c393a42Smrg
5254eceda581Smrg   FcToLower -- convert upper case ASCII to lower case
52552c393a42Smrg
52562c393a42SmrgSynopsis
52572c393a42Smrg
5258eceda581Smrg#include <fontconfig/fontconfig.h>
5259a6844aabSmrg
5260ca08ab68Smrg   FcChar8 FcToLower(FcChar8c);
52612c393a42Smrg
52622c393a42SmrgDescription
52632c393a42Smrg
5264eceda581Smrg   This macro converts upper case ASCII c to the equivalent lower
5265eceda581Smrg   case letter.
52662c393a42Smrg
5267eceda581SmrgFcStrCopy
52682c393a42Smrg
52692c393a42SmrgName
52702c393a42Smrg
5271eceda581Smrg   FcStrCopy -- duplicate a string
52722c393a42Smrg
52732c393a42SmrgSynopsis
52742c393a42Smrg
5275eceda581Smrg#include <fontconfig/fontconfig.h>
5276a6844aabSmrg
5277ca08ab68Smrg   FcChar8 * FcStrCopy(const FcChar8 *s);
52782c393a42Smrg
52792c393a42SmrgDescription
52802c393a42Smrg
5281eceda581Smrg   Allocates memory, copies s and returns the resulting buffer.
5282eceda581Smrg   Yes, this is strdup, but that function isn't available on every
5283eceda581Smrg   platform.
52842c393a42Smrg
5285eceda581SmrgFcStrDowncase
52862c393a42Smrg
52872c393a42SmrgName
52882c393a42Smrg
5289eceda581Smrg   FcStrDowncase -- create a lower case translation of a string
52902c393a42Smrg
52912c393a42SmrgSynopsis
52922c393a42Smrg
5293eceda581Smrg#include <fontconfig/fontconfig.h>
5294a6844aabSmrg
5295ca08ab68Smrg   FcChar8 * FcStrDowncase(const FcChar8 *s);
52962c393a42Smrg
52972c393a42SmrgDescription
52982c393a42Smrg
5299eceda581Smrg   Allocates memory, copies s, converting upper case letters to
5300eceda581Smrg   lower case and returns the allocated buffer.
53012c393a42Smrg
5302eceda581SmrgFcStrCopyFilename
53032c393a42Smrg
53042c393a42SmrgName
53052c393a42Smrg
5306eceda581Smrg   FcStrCopyFilename -- create a complete path from a filename
53072c393a42Smrg
53082c393a42SmrgSynopsis
53092c393a42Smrg
5310eceda581Smrg#include <fontconfig/fontconfig.h>
5311a6844aabSmrg
5312ca08ab68Smrg   FcChar8 * FcStrCopyFilename(const FcChar8 *s);
53132c393a42Smrg
53142c393a42SmrgDescription
53152c393a42Smrg
5316eceda581Smrg   FcStrCopyFilename constructs an absolute pathname from s. It
5317eceda581Smrg   converts any leading '~' characters in to the value of the HOME
5318eceda581Smrg   environment variable, and any relative paths are converted to
5319eceda581Smrg   absolute paths using the current working directory. Sequences
5320eceda581Smrg   of '/' characters are converted to a single '/', and names
5321eceda581Smrg   containing the current directory '.' or parent directory '..'
5322eceda581Smrg   are correctly reconstructed. Returns NULL if '~' is the leading
5323eceda581Smrg   character and HOME is unset or disabled (see
5324eceda581Smrg   FcConfigEnableHome).
53252c393a42Smrg
5326eceda581SmrgFcStrCmp
53272c393a42Smrg
53282c393a42SmrgName
53292c393a42Smrg
5330eceda581Smrg   FcStrCmp -- compare UTF-8 strings
53312c393a42Smrg
53322c393a42SmrgSynopsis
53332c393a42Smrg
5334eceda581Smrg#include <fontconfig/fontconfig.h>
5335a6844aabSmrg
5336ca08ab68Smrg   int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2);
53372c393a42Smrg
53382c393a42SmrgDescription
53392c393a42Smrg
5340ca08ab68Smrg   Returns the usual <0, 0, >0 result of comparing s1 and s2.
53412c393a42Smrg
5342eceda581SmrgFcStrCmpIgnoreCase
53432c393a42Smrg
53442c393a42SmrgName
53452c393a42Smrg
5346eceda581Smrg   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
53472c393a42Smrg
53482c393a42SmrgSynopsis
53492c393a42Smrg
5350eceda581Smrg#include <fontconfig/fontconfig.h>
5351a6844aabSmrg
5352ca08ab68Smrg   int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2);
53532c393a42Smrg
53542c393a42SmrgDescription
53552c393a42Smrg
5356eceda581Smrg   Returns the usual <0, 0, >0 result of comparing s1 and s2. This
5357eceda581Smrg   test is case-insensitive for all proper UTF-8 encoded strings.
53582c393a42Smrg
5359eceda581SmrgFcStrStr
53602c393a42Smrg
53612c393a42SmrgName
53622c393a42Smrg
5363eceda581Smrg   FcStrStr -- locate UTF-8 substring
53642c393a42Smrg
53652c393a42SmrgSynopsis
53662c393a42Smrg
5367eceda581Smrg#include <fontconfig/fontconfig.h>
5368a6844aabSmrg
5369ca08ab68Smrg   FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2);
53702c393a42Smrg
53712c393a42SmrgDescription
53722c393a42Smrg
5373eceda581Smrg   Returns the location of s2 in s1. Returns NULL if s2 is not
5374eceda581Smrg   present in s1. This test will operate properly with UTF8
5375eceda581Smrg   encoded strings.
53762c393a42Smrg
5377eceda581SmrgFcStrStrIgnoreCase
53782c393a42Smrg
53792c393a42SmrgName
53802c393a42Smrg
5381eceda581Smrg   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring case
53822c393a42Smrg
53832c393a42SmrgSynopsis
53842c393a42Smrg
5385eceda581Smrg#include <fontconfig/fontconfig.h>
5386a32e9e42Smrg
5387eceda581Smrg   FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8
5388eceda581Smrg   *s2);
53892c393a42Smrg
53902c393a42SmrgDescription
53912c393a42Smrg
5392eceda581Smrg   Returns the location of s2 in s1, ignoring case. Returns NULL
5393eceda581Smrg   if s2 is not present in s1. This test is case-insensitive for
5394eceda581Smrg   all proper UTF-8 encoded strings.
53952c393a42Smrg
5396eceda581SmrgFcStrPlus
53972c393a42Smrg
53982c393a42SmrgName
53992c393a42Smrg
5400eceda581Smrg   FcStrPlus -- concatenate two strings
54012c393a42Smrg
54022c393a42SmrgSynopsis
54032c393a42Smrg
5404eceda581Smrg#include <fontconfig/fontconfig.h>
5405a6844aabSmrg
5406ca08ab68Smrg   FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2);
54072c393a42Smrg
54082c393a42SmrgDescription
54092c393a42Smrg
5410eceda581Smrg   This function allocates new storage and places the
5411eceda581Smrg   concatenation of s1 and s2 there, returning the new string.
54122c393a42Smrg
5413eceda581SmrgFcStrFree
54142c393a42Smrg
54152c393a42SmrgName
54162c393a42Smrg
5417eceda581Smrg   FcStrFree -- free a string
54182c393a42Smrg
54192c393a42SmrgSynopsis
54202c393a42Smrg
5421eceda581Smrg#include <fontconfig/fontconfig.h>
5422a6844aabSmrg
5423ca08ab68Smrg   void FcStrFree(FcChar8 *s);
54242c393a42Smrg
54252c393a42SmrgDescription
54262c393a42Smrg
5427eceda581Smrg   This is just a wrapper around free(3) which helps track memory
5428eceda581Smrg   usage of strings within the fontconfig library.
54292c393a42Smrg
5430eceda581SmrgFcStrBuildFilename
5431a4e54154Smrg
5432a4e54154SmrgName
5433a4e54154Smrg
5434eceda581Smrg   FcStrBuildFilename -- Concatenate strings as a file path
5435a4e54154Smrg
5436a4e54154SmrgSynopsis
5437a4e54154Smrg
5438eceda581Smrg#include <fontconfig/fontconfig.h>
5439a4e54154Smrg
5440a4e54154Smrg   FcChar8 * FcStrBuildFilename(const FcChar8 *path, ...);
5441a4e54154Smrg
5442a4e54154SmrgDescription
5443a4e54154Smrg
5444eceda581Smrg   Creates a filename from the given elements of strings as file
5445eceda581Smrg   paths and concatenate them with the appropriate file separator.
5446eceda581Smrg   Arguments must be null-terminated. This returns a
5447eceda581Smrg   newly-allocated memory which should be freed when no longer
5448eceda581Smrg   needed.
5449a4e54154Smrg
5450eceda581SmrgFcStrDirname
54512c393a42Smrg
54522c393a42SmrgName
54532c393a42Smrg
5454eceda581Smrg   FcStrDirname -- directory part of filename
54552c393a42Smrg
54562c393a42SmrgSynopsis
54572c393a42Smrg
5458eceda581Smrg#include <fontconfig/fontconfig.h>
5459a6844aabSmrg
5460ca08ab68Smrg   FcChar8 * FcStrDirname(const FcChar8 *file);
54612c393a42Smrg
54622c393a42SmrgDescription
54632c393a42Smrg
5464eceda581Smrg   Returns the directory containing file. This is returned in
5465eceda581Smrg   newly allocated storage which should be freed when no longer
5466eceda581Smrg   needed.
54672c393a42Smrg
5468eceda581SmrgFcStrBasename
54692c393a42Smrg
54702c393a42SmrgName
54712c393a42Smrg
5472eceda581Smrg   FcStrBasename -- last component of filename
54732c393a42Smrg
54742c393a42SmrgSynopsis
54752c393a42Smrg
5476eceda581Smrg#include <fontconfig/fontconfig.h>
5477a6844aabSmrg
5478ca08ab68Smrg   FcChar8 * FcStrBasename(const FcChar8 *file);
54792c393a42Smrg
54802c393a42SmrgDescription
54812c393a42Smrg
5482eceda581Smrg   Returns the filename of file stripped of any leading directory
5483eceda581Smrg   names. This is returned in newly allocated storage which should
5484eceda581Smrg   be freed when no longer needed.
5485