1ae02b298SmrgFontconfig Developers Reference, Version 2.15.0
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
2100ae02b298Smrg   FcCharSetDelChar -- Delete a character from 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
2182ae02b298Smrg   FcCharSetDelChar -- Delete a character from 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.
3314ae02b298Smrg   Note that any changes to the configuration after this call
3315ae02b298Smrg   (through FcConfigParseAndLoad or
3316ae02b298Smrg   FcConfigParseAndLoadFromMemory) have indeterminate effects. (On
3317ae02b298Smrg   the other hand, application fonts can still be modified through
3318ae02b298Smrg   FcConfigAppFontAddFile, FcConfigAppFontAddDir and
3319ae02b298Smrg   FcConfigAppFontClear). Returns FcFalse if this operation runs
3320eceda581Smrg   out of memory. If config is NULL, the current configuration is
3321eceda581Smrg   used.
33222c393a42Smrg
3323eceda581SmrgFcConfigGetConfigDirs
33242c393a42Smrg
33252c393a42SmrgName
33262c393a42Smrg
3327eceda581Smrg   FcConfigGetConfigDirs -- Get config directories
33282c393a42Smrg
33292c393a42SmrgSynopsis
33302c393a42Smrg
3331eceda581Smrg#include <fontconfig/fontconfig.h>
3332a6844aabSmrg
3333ca08ab68Smrg   FcStrList * FcConfigGetConfigDirs(FcConfig *config);
33342c393a42Smrg
33352c393a42SmrgDescription
33362c393a42Smrg
3337eceda581Smrg   Returns the list of font directories specified in the
3338eceda581Smrg   configuration files for config. Does not include any
3339eceda581Smrg   subdirectories. If config is NULL, the current configuration is
3340eceda581Smrg   used.
33412c393a42Smrg
3342eceda581SmrgFcConfigGetFontDirs
33432c393a42Smrg
33442c393a42SmrgName
33452c393a42Smrg
3346eceda581Smrg   FcConfigGetFontDirs -- Get font directories
33472c393a42Smrg
33482c393a42SmrgSynopsis
33492c393a42Smrg
3350eceda581Smrg#include <fontconfig/fontconfig.h>
3351a6844aabSmrg
3352ca08ab68Smrg   FcStrList * FcConfigGetFontDirs(FcConfig *config);
33532c393a42Smrg
33542c393a42SmrgDescription
33552c393a42Smrg
3356eceda581Smrg   Returns the list of font directories in config. This includes
3357eceda581Smrg   the configured font directories along with any directories
3358eceda581Smrg   below those in the filesystem. If config is NULL, the current
3359eceda581Smrg   configuration is used.
33602c393a42Smrg
3361eceda581SmrgFcConfigGetConfigFiles
33622c393a42Smrg
33632c393a42SmrgName
33642c393a42Smrg
3365eceda581Smrg   FcConfigGetConfigFiles -- Get config files
33662c393a42Smrg
33672c393a42SmrgSynopsis
33682c393a42Smrg
3369eceda581Smrg#include <fontconfig/fontconfig.h>
3370a6844aabSmrg
3371ca08ab68Smrg   FcStrList * FcConfigGetConfigFiles(FcConfig *config);
33722c393a42Smrg
33732c393a42SmrgDescription
33742c393a42Smrg
3375eceda581Smrg   Returns the list of known configuration files used to generate
3376eceda581Smrg   config. If config is NULL, the current configuration is used.
33772c393a42Smrg
3378eceda581SmrgFcConfigGetCache
33792c393a42Smrg
33802c393a42SmrgName
33812c393a42Smrg
3382eceda581Smrg   FcConfigGetCache -- DEPRECATED used to return per-user cache
3383eceda581Smrg   filename
33842c393a42Smrg
33852c393a42SmrgSynopsis
33862c393a42Smrg
3387eceda581Smrg#include <fontconfig/fontconfig.h>
3388a6844aabSmrg
3389ca08ab68Smrg   FcChar8 * FcConfigGetCache(FcConfig *config);
33902c393a42Smrg
33912c393a42SmrgDescription
33922c393a42Smrg
3393eceda581Smrg   With fontconfig no longer using per-user cache files, this
3394eceda581Smrg   function now simply returns NULL to indicate that no per-user
3395eceda581Smrg   file exists.
33962c393a42Smrg
3397eceda581SmrgFcConfigGetCacheDirs
33982c393a42Smrg
33992c393a42SmrgName
34002c393a42Smrg
3401eceda581Smrg   FcConfigGetCacheDirs -- return the list of directories searched
3402eceda581Smrg   for cache files
34032c393a42Smrg
34042c393a42SmrgSynopsis
34052c393a42Smrg
3406eceda581Smrg#include <fontconfig/fontconfig.h>
3407a6844aabSmrg
3408ca08ab68Smrg   FcStrList * FcConfigGetCacheDirs(const FcConfig *config);
34092c393a42Smrg
34102c393a42SmrgDescription
34112c393a42Smrg
3412eceda581Smrg   FcConfigGetCacheDirs returns a string list containing all of
3413eceda581Smrg   the directories that fontconfig will search when attempting to
3414eceda581Smrg   load a cache file for a font directory. If config is NULL, the
3415eceda581Smrg   current configuration is used.
34162c393a42Smrg
3417eceda581SmrgFcConfigGetFonts
34182c393a42Smrg
34192c393a42SmrgName
34202c393a42Smrg
3421eceda581Smrg   FcConfigGetFonts -- Get config font set
34222c393a42Smrg
34232c393a42SmrgSynopsis
34242c393a42Smrg
3425eceda581Smrg#include <fontconfig/fontconfig.h>
3426a6844aabSmrg
3427ca08ab68Smrg   FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set);
34282c393a42Smrg
34292c393a42SmrgDescription
34302c393a42Smrg
3431eceda581Smrg   Returns one of the two sets of fonts from the configuration as
3432eceda581Smrg   specified by set. This font set is owned by the library and
3433eceda581Smrg   must not be modified or freed. If config is NULL, the current
3434eceda581Smrg   configuration is used.
34352c393a42Smrg
3436eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3437eceda581Smrg   before using this and then FcConfigDestroy when the return
3438eceda581Smrg   value is no longer referenced.
3439a4e54154Smrg
3440eceda581SmrgFcConfigGetBlanks
34412c393a42Smrg
34422c393a42SmrgName
34432c393a42Smrg
3444eceda581Smrg   FcConfigGetBlanks -- Get config blanks
34452c393a42Smrg
34462c393a42SmrgSynopsis
34472c393a42Smrg
3448eceda581Smrg#include <fontconfig/fontconfig.h>
3449a6844aabSmrg
3450ca08ab68Smrg   FcBlanks * FcConfigGetBlanks(FcConfig *config);
34512c393a42Smrg
34522c393a42SmrgDescription
34532c393a42Smrg
3454a32e9e42Smrg   FcBlanks is deprecated. This function always returns NULL.
34552c393a42Smrg
3456eceda581SmrgFcConfigGetRescanInterval
34572c393a42Smrg
34582c393a42SmrgName
34592c393a42Smrg
3460eceda581Smrg   FcConfigGetRescanInterval -- Get config rescan interval
34612c393a42Smrg
34622c393a42SmrgSynopsis
34632c393a42Smrg
3464eceda581Smrg#include <fontconfig/fontconfig.h>
3465a6844aabSmrg
3466ca08ab68Smrg   int FcConfigGetRescanInterval(FcConfig *config);
34672c393a42Smrg
34682c393a42SmrgDescription
34692c393a42Smrg
3470eceda581Smrg   Returns the interval between automatic checks of the
3471eceda581Smrg   configuration (in seconds) specified in config. The
3472eceda581Smrg   configuration is checked during a call to FcFontList when this
3473eceda581Smrg   interval has passed since the last check. An interval setting
3474eceda581Smrg   of zero disables automatic checks. If config is NULL, the
3475ca08ab68Smrg   current configuration is used.
34762c393a42Smrg
3477eceda581SmrgFcConfigSetRescanInterval
34782c393a42Smrg
34792c393a42SmrgName
34802c393a42Smrg
3481eceda581Smrg   FcConfigSetRescanInterval -- Set config rescan interval
34822c393a42Smrg
34832c393a42SmrgSynopsis
34842c393a42Smrg
3485eceda581Smrg#include <fontconfig/fontconfig.h>
3486a6844aabSmrg
3487eceda581Smrg   FcBool FcConfigSetRescanInterval(FcConfig *config, int
3488eceda581Smrg   rescanInterval);
34892c393a42Smrg
34902c393a42SmrgDescription
34912c393a42Smrg
3492eceda581Smrg   Sets the rescan interval. Returns FcFalse if the interval
3493eceda581Smrg   cannot be set (due to allocation failure). Otherwise returns
3494eceda581Smrg   FcTrue. An interval setting of zero disables automatic checks.
3495eceda581Smrg   If config is NULL, the current configuration is used.
34962c393a42Smrg
3497eceda581SmrgFcConfigAppFontAddFile
34982c393a42Smrg
34992c393a42SmrgName
35002c393a42Smrg
3501eceda581Smrg   FcConfigAppFontAddFile -- Add font file to font database
35022c393a42Smrg
35032c393a42SmrgSynopsis
35042c393a42Smrg
3505eceda581Smrg#include <fontconfig/fontconfig.h>
3506a6844aabSmrg
3507eceda581Smrg   FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8
3508eceda581Smrg   *file);
35092c393a42Smrg
35102c393a42SmrgDescription
35112c393a42Smrg
3512eceda581Smrg   Adds an application-specific font to the configuration. Returns
3513eceda581Smrg   FcFalse if the fonts cannot be added (due to allocation failure
3514eceda581Smrg   or no fonts found). Otherwise returns FcTrue. If config is
3515eceda581Smrg   NULL, the current configuration is used.
35162c393a42Smrg
3517eceda581SmrgFcConfigAppFontAddDir
35182c393a42Smrg
35192c393a42SmrgName
35202c393a42Smrg
3521eceda581Smrg   FcConfigAppFontAddDir -- Add fonts from directory to font
3522eceda581Smrg   database
35232c393a42Smrg
35242c393a42SmrgSynopsis
35252c393a42Smrg
3526eceda581Smrg#include <fontconfig/fontconfig.h>
35272c393a42Smrg
3528eceda581Smrg   FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8
3529eceda581Smrg   *dir);
35302c393a42Smrg
35312c393a42SmrgDescription
35322c393a42Smrg
3533eceda581Smrg   Scans the specified directory for fonts, adding each one found
3534eceda581Smrg   to the application-specific set of fonts. Returns FcFalse if
3535eceda581Smrg   the fonts cannot be added (due to allocation failure).
3536eceda581Smrg   Otherwise returns FcTrue. If config is NULL, the current
3537eceda581Smrg   configuration is used.
35382c393a42Smrg
3539eceda581SmrgFcConfigAppFontClear
35402c393a42Smrg
35412c393a42SmrgName
35422c393a42Smrg
3543eceda581Smrg   FcConfigAppFontClear -- Remove all app fonts from font database
35442c393a42Smrg
35452c393a42SmrgSynopsis
35462c393a42Smrg
3547eceda581Smrg#include <fontconfig/fontconfig.h>
3548a6844aabSmrg
3549ca08ab68Smrg   void FcConfigAppFontClear(FcConfig *config);
35502c393a42Smrg
35512c393a42SmrgDescription
35522c393a42Smrg
3553eceda581Smrg   Clears the set of application-specific fonts. If config is
3554eceda581Smrg   NULL, the current configuration is used.
35552c393a42Smrg
3556eceda581SmrgFcConfigSubstituteWithPat
35572c393a42Smrg
35582c393a42SmrgName
35592c393a42Smrg
3560eceda581Smrg   FcConfigSubstituteWithPat -- Execute substitutions
35612c393a42Smrg
35622c393a42SmrgSynopsis
35632c393a42Smrg
3564eceda581Smrg#include <fontconfig/fontconfig.h>
35652c393a42Smrg
3566eceda581Smrg   FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern
3567eceda581Smrg   *p, FcPattern *p_pat, FcMatchKind kind);
35682c393a42Smrg
35692c393a42SmrgDescription
35702c393a42Smrg
3571eceda581Smrg   Performs the sequence of pattern modification operations, if
3572eceda581Smrg   kind is FcMatchPattern, then those tagged as pattern operations
3573eceda581Smrg   are applied, else if kind is FcMatchFont, those tagged as font
3574eceda581Smrg   operations are applied and p_pat is used for <test> elements
3575eceda581Smrg   with target=pattern. Returns FcFalse if the substitution cannot
3576eceda581Smrg   be performed (due to allocation failure). Otherwise returns
3577eceda581Smrg   FcTrue. If config is NULL, the current configuration is used.
35782c393a42Smrg
3579eceda581SmrgFcConfigSubstitute
35802c393a42Smrg
35812c393a42SmrgName
35822c393a42Smrg
3583eceda581Smrg   FcConfigSubstitute -- Execute substitutions
35842c393a42Smrg
35852c393a42SmrgSynopsis
35862c393a42Smrg
3587eceda581Smrg#include <fontconfig/fontconfig.h>
3588a6844aabSmrg
3589eceda581Smrg   FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p,
3590eceda581Smrg   FcMatchKind kind);
35912c393a42Smrg
35922c393a42SmrgDescription
35932c393a42Smrg
3594eceda581Smrg   Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns
3595eceda581Smrg   FcFalse if the substitution cannot be performed (due to
3596eceda581Smrg   allocation failure). Otherwise returns FcTrue. If config is
3597eceda581Smrg   NULL, the current configuration is used.
3598a32e9e42Smrg
3599eceda581SmrgFcFontMatch
3600a32e9e42Smrg
3601a32e9e42SmrgName
3602a32e9e42Smrg
3603eceda581Smrg   FcFontMatch -- Return best font
3604a32e9e42Smrg
3605a32e9e42SmrgSynopsis
3606a32e9e42Smrg
3607eceda581Smrg#include <fontconfig/fontconfig.h>
3608a32e9e42Smrg
3609eceda581Smrg   FcPattern * FcFontMatch(FcConfig *config, FcPattern *p,
3610eceda581Smrg   FcResult *result);
3611a32e9e42Smrg
3612a32e9e42SmrgDescription
3613a32e9e42Smrg
3614eceda581Smrg   Finds the font in sets most closely matching pattern and
3615eceda581Smrg   returns the result of FcFontRenderPrepare for that font and the
3616eceda581Smrg   provided pattern. This function should be called only after
3617eceda581Smrg   FcConfigSubstitute and FcDefaultSubstitute have been called for
3618eceda581Smrg   p; otherwise the results will not be correct. If config is
3619eceda581Smrg   NULL, the current configuration is used.
3620a32e9e42Smrg
3621eceda581SmrgFcFontSort
3622a32e9e42Smrg
3623a32e9e42SmrgName
3624a32e9e42Smrg
3625eceda581Smrg   FcFontSort -- Return list of matching fonts
3626a32e9e42Smrg
3627a32e9e42SmrgSynopsis
3628a32e9e42Smrg
3629eceda581Smrg#include <fontconfig/fontconfig.h>
3630a32e9e42Smrg
3631eceda581Smrg   FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool
3632eceda581Smrg   trim, FcCharSet **csp, FcResult *result);
3633a32e9e42Smrg
3634a32e9e42SmrgDescription
36352c393a42Smrg
3636eceda581Smrg   Returns the list of fonts sorted by closeness to p. If trim is
3637eceda581Smrg   FcTrue, elements in the list which don't include Unicode
3638eceda581Smrg   coverage not provided by earlier elements in the list are
3639eceda581Smrg   elided. The union of Unicode coverage of all of the fonts is
3640eceda581Smrg   returned in csp, if csp is not NULL. This function should be
3641eceda581Smrg   called only after FcConfigSubstitute and FcDefaultSubstitute
3642eceda581Smrg   have been called for p; otherwise the results will not be
3643eceda581Smrg   correct.
3644a32e9e42Smrg
3645eceda581Smrg   The returned FcFontSet references FcPattern structures which
3646eceda581Smrg   may be shared by the return value from multiple FcFontSort
3647eceda581Smrg   calls, applications must not modify these patterns. Instead,
3648eceda581Smrg   they should be passed, along with p to FcFontRenderPrepare
3649eceda581Smrg   which combines them into a complete pattern.
3650a32e9e42Smrg
3651a32e9e42Smrg   The FcFontSet returned by FcFontSort is destroyed by calling
3652eceda581Smrg   FcFontSetDestroy. If config is NULL, the current configuration
3653eceda581Smrg   is used.
3654a32e9e42Smrg
3655eceda581SmrgFcFontRenderPrepare
3656a32e9e42Smrg
3657a32e9e42SmrgName
3658a32e9e42Smrg
3659eceda581Smrg   FcFontRenderPrepare -- Prepare pattern for loading font file
3660a32e9e42Smrg
3661a32e9e42SmrgSynopsis
3662a32e9e42Smrg
3663eceda581Smrg#include <fontconfig/fontconfig.h>
3664a32e9e42Smrg
3665eceda581Smrg   FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern
3666eceda581Smrg   *pat, FcPattern *font);
3667a32e9e42Smrg
3668a32e9e42SmrgDescription
3669a32e9e42Smrg
3670eceda581Smrg   Creates a new pattern consisting of elements of font not
3671eceda581Smrg   appearing in pat, elements of pat not appearing in font and the
3672eceda581Smrg   best matching value from pat for elements appearing in both.
3673eceda581Smrg   The result is passed to FcConfigSubstituteWithPat with kind
3674eceda581Smrg   FcMatchFont and then returned.
3675a32e9e42Smrg
3676eceda581SmrgFcFontList
36772c393a42Smrg
36782c393a42SmrgName
36792c393a42Smrg
3680eceda581Smrg   FcFontList -- List fonts
36812c393a42Smrg
36822c393a42SmrgSynopsis
36832c393a42Smrg
3684eceda581Smrg#include <fontconfig/fontconfig.h>
3685a32e9e42Smrg
3686eceda581Smrg   FcFontSet * FcFontList(FcConfig *config, FcPattern *p,
3687eceda581Smrg   FcObjectSet *os);
3688a32e9e42Smrg
3689a32e9e42SmrgDescription
3690a32e9e42Smrg
3691eceda581Smrg   Selects fonts matching p, creates patterns from those fonts
3692eceda581Smrg   containing only the objects in os and returns the set of unique
3693eceda581Smrg   such patterns. If config is NULL, the default configuration is
3694eceda581Smrg   checked to be up to date, and used.
3695a32e9e42Smrg
3696eceda581SmrgFcConfigFilename
3697a32e9e42Smrg
3698a32e9e42SmrgName
3699a32e9e42Smrg
3700eceda581Smrg   FcConfigFilename -- Find a config file
3701a32e9e42Smrg
3702a32e9e42SmrgSynopsis
3703a32e9e42Smrg
3704eceda581Smrg#include <fontconfig/fontconfig.h>
3705a32e9e42Smrg
3706a32e9e42Smrg   FcChar8 * FcConfigFilename(const FcChar8 *name);
37072c393a42Smrg
3708a4e54154SmrgDescription
3709a4e54154Smrg
3710eceda581Smrg   This function is deprecated and is replaced by
3711eceda581Smrg   FcConfigGetFilename.
3712a4e54154Smrg
3713eceda581SmrgFcConfigGetFilename
3714a4e54154Smrg
3715a4e54154SmrgName
3716a4e54154Smrg
3717eceda581Smrg   FcConfigGetFilename -- Find a config file
3718a4e54154Smrg
3719a4e54154SmrgSynopsis
3720a4e54154Smrg
3721eceda581Smrg#include <fontconfig/fontconfig.h>
3722a4e54154Smrg
3723eceda581Smrg   FcChar8 * FcConfigGetFilename(FcConfig *config, const FcChar8
3724eceda581Smrg   *name);
3725a4e54154Smrg
37262c393a42SmrgDescription
37272c393a42Smrg
3728eceda581Smrg   Given the specified external entity name, return the associated
3729eceda581Smrg   filename. This provides applications a way to convert various
3730eceda581Smrg   configuration file references into filename form.
3731a32e9e42Smrg
3732eceda581Smrg   A null or empty name indicates that the default configuration
3733eceda581Smrg   file should be used; which file this references can be
3734eceda581Smrg   overridden with the FONTCONFIG_FILE environment variable. Next,
3735eceda581Smrg   if the name starts with ~, it refers to a file in the current
3736eceda581Smrg   users home directory. Otherwise if the name doesn't start with
3737eceda581Smrg   '/', it refers to a file in the default configuration
3738eceda581Smrg   directory; the built-in default directory can be overridden
3739a32e9e42Smrg   with the FONTCONFIG_PATH environment variable.
37402c393a42Smrg
3741eceda581Smrg   The result of this function is affected by the
3742eceda581Smrg   FONTCONFIG_SYSROOT environment variable or equivalent
3743eceda581Smrg   functionality.
3744a4e54154Smrg
3745eceda581SmrgFcConfigParseAndLoad
37462c393a42Smrg
37472c393a42SmrgName
37482c393a42Smrg
3749eceda581Smrg   FcConfigParseAndLoad -- load a configuration file
37502c393a42Smrg
37512c393a42SmrgSynopsis
37522c393a42Smrg
3753eceda581Smrg#include <fontconfig/fontconfig.h>
37542c393a42Smrg
3755eceda581Smrg   FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8
3756eceda581Smrg   *file, FcBool complain);
37572c393a42Smrg
3758a32e9e42SmrgDescription
37592c393a42Smrg
3760a32e9e42Smrg   Walks the configuration in 'file' and constructs the internal
3761eceda581Smrg   representation in 'config'. Any include files referenced from
3762eceda581Smrg   within 'file' will be loaded and parsed. If 'complain' is
3763eceda581Smrg   FcFalse, no warning will be displayed if 'file' does not exist.
3764eceda581Smrg   Error and warning messages will be output to stderr. Returns
3765eceda581Smrg   FcFalse if some error occurred while loading the file, either a
3766eceda581Smrg   parse error, semantic error or allocation failure. Otherwise
3767ae02b298Smrg   returns FcTrue. After all configuration files / strings have
3768ae02b298Smrg   been loaded, with FcConfigParseAndLoad and/or
3769ae02b298Smrg   FcConfigParseAndLoadFromMemory, call FcConfigBuildFonts to
3770ae02b298Smrg   build the font database.
37712c393a42Smrg
3772eceda581SmrgFcConfigParseAndLoadFromMemory
37732c393a42Smrg
37742c393a42SmrgName
37752c393a42Smrg
3776eceda581Smrg   FcConfigParseAndLoadFromMemory -- load a configuration from
3777eceda581Smrg   memory
37782c393a42Smrg
37792c393a42SmrgSynopsis
37802c393a42Smrg
3781eceda581Smrg#include <fontconfig/fontconfig.h>
3782a32e9e42Smrg
3783eceda581Smrg   FcBool FcConfigParseAndLoadFromMemory(FcConfig *config, const
3784eceda581Smrg   FcChar8 *buffer, FcBool complain);
37852c393a42Smrg
37862c393a42SmrgDescription
37872c393a42Smrg
3788a32e9e42Smrg   Walks the configuration in 'memory' and constructs the internal
3789eceda581Smrg   representation in 'config'. Any includes files referenced from
3790eceda581Smrg   within 'memory' will be loaded and dparsed. If 'complain' is
3791eceda581Smrg   FcFalse, no warning will be displayed if 'file' does not exist.
3792eceda581Smrg   Error and warning messages will be output to stderr. Returns
3793eceda581Smrg   FcFalse if fsome error occurred while loading the file, either
3794eceda581Smrg   a parse error, semantic error or allocation failure. Otherwise
3795ae02b298Smrg   returns FcTrue. After all configuration files / strings have
3796ae02b298Smrg   been loaded, with FcConfigParseAndLoad and/or
3797ae02b298Smrg   FcConfigParseAndLoadFromMemory, call FcConfigBuildFonts to
3798ae02b298Smrg   build the font database.
37992c393a42Smrg
3800a32e9e42SmrgSince
3801a32e9e42Smrg
3802a32e9e42Smrg   version 2.12.5
3803a32e9e42Smrg
3804eceda581SmrgFcConfigGetSysRoot
38052c393a42Smrg
38062c393a42SmrgName
38072c393a42Smrg
3808eceda581Smrg   FcConfigGetSysRoot -- Obtain the system root directory
38092c393a42Smrg
38102c393a42SmrgSynopsis
38112c393a42Smrg
3812eceda581Smrg#include <fontconfig/fontconfig.h>
38132c393a42Smrg
3814a32e9e42Smrg   const FcChar8 * FcConfigGetSysRoot(const FcConfig *config);
38152c393a42Smrg
38162c393a42SmrgDescription
38172c393a42Smrg
3818eceda581Smrg   Obtains the system root directory in 'config' if available. All
3819eceda581Smrg   files (including file properties in patterns) obtained from
3820eceda581Smrg   this 'config' are relative to this system root directory.
3821a4e54154Smrg
3822eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3823eceda581Smrg   before using this and then FcConfigDestroy when the return
3824eceda581Smrg   value is no longer referenced.
3825a32e9e42Smrg
3826a32e9e42SmrgSince
3827a32e9e42Smrg
3828a32e9e42Smrg   version 2.10.92
38292c393a42Smrg
3830eceda581SmrgFcConfigSetSysRoot
38312c393a42Smrg
38322c393a42SmrgName
38332c393a42Smrg
3834eceda581Smrg   FcConfigSetSysRoot -- Set the system root directory
38352c393a42Smrg
38362c393a42SmrgSynopsis
38372c393a42Smrg
3838eceda581Smrg#include <fontconfig/fontconfig.h>
3839a32e9e42Smrg
3840eceda581Smrg   void FcConfigSetSysRoot(FcConfig *config, const FcChar8
3841eceda581Smrg   *sysroot);
38422c393a42Smrg
38432c393a42SmrgDescription
38442c393a42Smrg
3845eceda581Smrg   Set 'sysroot' as the system root directory. All file paths used
3846eceda581Smrg   or created with this 'config' (including file properties in
3847eceda581Smrg   patterns) will be considered or made relative to this
3848eceda581Smrg   'sysroot'. This allows a host to generate caches for targets at
3849eceda581Smrg   build time. This also allows a cache to be re-targeted to a
3850eceda581Smrg   different base directory if 'FcConfigGetSysRoot' is used to
3851eceda581Smrg   resolve file paths. When setting this on the current config
3852eceda581Smrg   this causes changing current config (calls
3853eceda581Smrg   FcConfigSetCurrent()).
38542c393a42Smrg
3855a32e9e42SmrgSince
3856a32e9e42Smrg
3857a32e9e42Smrg   version 2.10.92
38582c393a42Smrg
3859eceda581SmrgFcConfigFileInfoIterInit
38602c393a42Smrg
38612c393a42SmrgName
38622c393a42Smrg
3863eceda581Smrg   FcConfigFileInfoIterInit -- Initialize the iterator
38642c393a42Smrg
38652c393a42SmrgSynopsis
38662c393a42Smrg
3867eceda581Smrg#include <fontconfig/fontconfig.h>
3868a32e9e42Smrg
3869eceda581Smrg   void FcConfigFileInfoIterInit(FcConfig *config,
3870eceda581Smrg   FcConfigFileInfoIter *iter);
38712c393a42Smrg
38722c393a42SmrgDescription
38732c393a42Smrg
3874eceda581Smrg   Initialize 'iter' with the first iterator in the config file
3875eceda581Smrg   information list.
38762c393a42Smrg
3877eceda581Smrg   The config file information list is stored in numerical order
3878eceda581Smrg   for filenames i.e. how fontconfig actually read them.
3879a4e54154Smrg
3880eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3881eceda581Smrg   before using this and then FcConfigDestroy when the relevant
3882eceda581Smrg   values are no longer referenced.
3883a4e54154Smrg
3884a32e9e42SmrgSince
3885a32e9e42Smrg
3886a32e9e42Smrg   version 2.12.91
3887a32e9e42Smrg
3888eceda581SmrgFcConfigFileInfoIterNext
3889c9710b42Smrg
3890c9710b42SmrgName
3891c9710b42Smrg
3892eceda581Smrg   FcConfigFileInfoIterNext -- Set the iterator to point to the
3893eceda581Smrg   next list
3894c9710b42Smrg
3895c9710b42SmrgSynopsis
3896c9710b42Smrg
3897eceda581Smrg#include <fontconfig/fontconfig.h>
3898c9710b42Smrg
3899eceda581Smrg   FcBool FcConfigFileInfoIterNext(FcConfig *config,
3900eceda581Smrg   FcConfigFileInfoIter *iter);
3901c9710b42Smrg
3902c9710b42SmrgDescription
3903c9710b42Smrg
3904eceda581Smrg   Set 'iter' to point to the next node in the config file
3905eceda581Smrg   information list. If there is no next node, FcFalse is
3906eceda581Smrg   returned.
3907c9710b42Smrg
3908eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3909eceda581Smrg   before using FcConfigFileInfoIterInit and then FcConfigDestroy
3910eceda581Smrg   when the relevant values are no longer referenced.
3911a4e54154Smrg
3912b09479dcSmrgSince
3913c9710b42Smrg
3914a32e9e42Smrg   version 2.12.91
3915c9710b42Smrg
3916eceda581SmrgFcConfigFileInfoIterGet
3917c9710b42Smrg
3918c9710b42SmrgName
3919c9710b42Smrg
3920eceda581Smrg   FcConfigFileInfoIterGet -- Obtain the configuration file
3921eceda581Smrg   information
3922c9710b42Smrg
3923c9710b42SmrgSynopsis
3924c9710b42Smrg
3925eceda581Smrg#include <fontconfig/fontconfig.h>
3926a32e9e42Smrg
3927eceda581Smrg   FcBool FcConfigFileInfoIterGet(FcConfig *config,
3928eceda581Smrg   FcConfigFileInfoIter *iter, FcChar8 **name, FcChar8
3929eceda581Smrg   **description, FcBool *enabled);
3930c9710b42Smrg
3931c9710b42SmrgDescription
3932c9710b42Smrg
3933eceda581Smrg   Obtain the filename, the description and the flag whether it is
3934eceda581Smrg   enabled or not for 'iter' where points to current configuration
3935eceda581Smrg   file information. If the iterator is invalid, FcFalse is
3936eceda581Smrg   returned.
3937c9710b42Smrg
3938eceda581Smrg   This function isn't MT-safe. FcConfigReference must be called
3939eceda581Smrg   before using FcConfigFileInfoIterInit and then FcConfigDestroy
3940eceda581Smrg   when the relevant values are no longer referenced.
3941a4e54154Smrg
3942b09479dcSmrgSince
3943c9710b42Smrg
3944a32e9e42Smrg   version 2.12.91
3945eceda581Smrg     __________________________________________________________
3946a32e9e42Smrg
3947eceda581SmrgFcObjectType
39482c393a42Smrg
3949ca08ab68Smrg   Table of Contents
3950eceda581Smrg   FcNameRegisterObjectTypes -- Register object types
3951eceda581Smrg   FcNameUnregisterObjectTypes -- Unregister object types
3952eceda581Smrg   FcNameGetObjectType -- Lookup an object type
39532c393a42Smrg
3954eceda581Smrg   Provides for application-specified font name object types so
3955eceda581Smrg   that new pattern elements can be generated from font names.
3956ca08ab68Smrg
3957eceda581SmrgFcNameRegisterObjectTypes
39582c393a42Smrg
39592c393a42SmrgName
39602c393a42Smrg
3961eceda581Smrg   FcNameRegisterObjectTypes -- Register object types
39622c393a42Smrg
39632c393a42SmrgSynopsis
39642c393a42Smrg
3965eceda581Smrg#include <fontconfig/fontconfig.h>
39662c393a42Smrg
3967eceda581Smrg   FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int
3968eceda581Smrg   ntype);
39692c393a42Smrg
39702c393a42SmrgDescription
39712c393a42Smrg
3972c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
39732c393a42Smrg
3974eceda581SmrgFcNameUnregisterObjectTypes
39752c393a42Smrg
39762c393a42SmrgName
39772c393a42Smrg
3978eceda581Smrg   FcNameUnregisterObjectTypes -- Unregister object types
39792c393a42Smrg
39802c393a42SmrgSynopsis
39812c393a42Smrg
3982eceda581Smrg#include <fontconfig/fontconfig.h>
3983a6844aabSmrg
3984eceda581Smrg   FcBool FcNameUnregisterObjectTypes(const FcObjectType *types,
3985eceda581Smrg   int ntype);
39862c393a42Smrg
39872c393a42SmrgDescription
39882c393a42Smrg
3989c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
39902c393a42Smrg
3991eceda581SmrgFcNameGetObjectType
39922c393a42Smrg
39932c393a42SmrgName
39942c393a42Smrg
3995eceda581Smrg   FcNameGetObjectType -- Lookup an object type
39962c393a42Smrg
39972c393a42SmrgSynopsis
39982c393a42Smrg
3999eceda581Smrg#include <fontconfig/fontconfig.h>
4000a6844aabSmrg
4001ca08ab68Smrg   const FcObjectType * FcNameGetObjectType(const char *object);
40022c393a42Smrg
40032c393a42SmrgDescription
40042c393a42Smrg
4005ca08ab68Smrg   Return the object type for the pattern element named object.
4006eceda581Smrg     __________________________________________________________
40072c393a42Smrg
4008eceda581SmrgFcConstant
40092c393a42Smrg
4010ca08ab68Smrg   Table of Contents
4011eceda581Smrg   FcNameRegisterConstants -- Register symbolic constants
4012eceda581Smrg   FcNameUnregisterConstants -- Unregister symbolic constants
4013eceda581Smrg   FcNameGetConstant -- Lookup symbolic constant
40141cc69409Smrg   FcNameGetConstantFor -- Lookup symbolic constant For object
4015eceda581Smrg   FcNameConstant -- Get the value for a symbolic constant
40162c393a42Smrg
4017eceda581Smrg   Provides for application-specified symbolic constants for font
4018eceda581Smrg   names.
40192c393a42Smrg
4020eceda581SmrgFcNameRegisterConstants
40212c393a42Smrg
40222c393a42SmrgName
40232c393a42Smrg
4024eceda581Smrg   FcNameRegisterConstants -- Register symbolic constants
40252c393a42Smrg
40262c393a42SmrgSynopsis
40272c393a42Smrg
4028eceda581Smrg#include <fontconfig/fontconfig.h>
40292c393a42Smrg
4030eceda581Smrg   FcBool FcNameRegisterConstants(const FcConstant *consts, int
4031eceda581Smrg   nconsts);
40322c393a42Smrg
40332c393a42SmrgDescription
40342c393a42Smrg
4035c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
40362c393a42Smrg
4037eceda581SmrgFcNameUnregisterConstants
40382c393a42Smrg
40392c393a42SmrgName
40402c393a42Smrg
4041eceda581Smrg   FcNameUnregisterConstants -- Unregister symbolic constants
40422c393a42Smrg
40432c393a42SmrgSynopsis
40442c393a42Smrg
4045eceda581Smrg#include <fontconfig/fontconfig.h>
4046a6844aabSmrg
4047eceda581Smrg   FcBool FcNameUnregisterConstants(const FcConstant *consts, int
4048eceda581Smrg   nconsts);
40492c393a42Smrg
40502c393a42SmrgDescription
40512c393a42Smrg
4052c9710b42Smrg   Deprecated. Does nothing. Returns FcFalse.
40532c393a42Smrg
4054eceda581SmrgFcNameGetConstant
40552c393a42Smrg
40562c393a42SmrgName
40572c393a42Smrg
4058eceda581Smrg   FcNameGetConstant -- Lookup symbolic constant
40592c393a42Smrg
40602c393a42SmrgSynopsis
40612c393a42Smrg
4062eceda581Smrg#include <fontconfig/fontconfig.h>
4063a6844aabSmrg
4064ca08ab68Smrg   const FcConstant * FcNameGetConstant(FcChar8 *string);
40652c393a42Smrg
40662c393a42SmrgDescription
40672c393a42Smrg
4068eceda581Smrg   Return the FcConstant structure related to symbolic constant
4069eceda581Smrg   string.
40702c393a42Smrg
40711cc69409SmrgFcNameGetConstantFor
40721cc69409Smrg
40731cc69409SmrgName
40741cc69409Smrg
40751cc69409Smrg   FcNameGetConstantFor -- Lookup symbolic constant For object
40761cc69409Smrg
40771cc69409SmrgSynopsis
40781cc69409Smrg
40791cc69409Smrg#include <fontconfig/fontconfig.h>
40801cc69409Smrg
40811cc69409Smrg   const FcConstant * FcNameGetConstantFor(FcChar8 *string, char
40821cc69409Smrg   *object);
40831cc69409Smrg
40841cc69409SmrgDescription
40851cc69409Smrg
40861cc69409Smrg   Return the FcConstant structure related to symbolic constant
40871cc69409Smrg   string for object.
40881cc69409Smrg
4089eceda581SmrgFcNameConstant
40902c393a42Smrg
40912c393a42SmrgName
40922c393a42Smrg
4093eceda581Smrg   FcNameConstant -- Get the value for a symbolic constant
40942c393a42Smrg
40952c393a42SmrgSynopsis
40962c393a42Smrg
4097eceda581Smrg#include <fontconfig/fontconfig.h>
4098a6844aabSmrg
4099ca08ab68Smrg   FcBool FcNameConstant(FcChar8 *string, int *result);
41002c393a42Smrg
41012c393a42SmrgDescription
41022c393a42Smrg
4103eceda581Smrg   Returns whether a symbolic constant with name string is
4104eceda581Smrg   registered, placing the value of the constant in result if
4105eceda581Smrg   present.
4106eceda581Smrg     __________________________________________________________
41072c393a42Smrg
4108eceda581SmrgFcWeight
41092c393a42Smrg
4110ca08ab68Smrg   Table of Contents
4111eceda581Smrg   FcWeightFromOpenTypeDouble -- Convert from OpenType weight
4112eceda581Smrg          values to fontconfig ones
4113953daebaSmrg
4114eceda581Smrg   FcWeightToOpenTypeDouble -- Convert from fontconfig weight
4115eceda581Smrg          values to OpenType ones
4116a32e9e42Smrg
4117eceda581Smrg   FcWeightFromOpenType -- Convert from OpenType weight values to
4118eceda581Smrg          fontconfig ones
4119a32e9e42Smrg
4120eceda581Smrg   FcWeightToOpenType -- Convert from fontconfig weight values to
4121eceda581Smrg          OpenType ones
4122953daebaSmrg
4123953daebaSmrg   Maps weights to and from OpenType weights.
4124953daebaSmrg
4125eceda581SmrgFcWeightFromOpenTypeDouble
4126953daebaSmrg
4127953daebaSmrgName
4128953daebaSmrg
4129eceda581Smrg   FcWeightFromOpenTypeDouble -- Convert from OpenType weight
4130eceda581Smrg   values to fontconfig ones
4131953daebaSmrg
4132953daebaSmrgSynopsis
4133953daebaSmrg
4134eceda581Smrg#include <fontconfig/fontconfig.h>
4135a32e9e42Smrg
4136a32e9e42Smrg   double FcWeightFromOpenTypeDouble(doubleot_weight);
4137a32e9e42Smrg
4138a32e9e42SmrgDescription
4139a32e9e42Smrg
4140eceda581Smrg   FcWeightFromOpenTypeDouble returns an double value to use with
4141eceda581Smrg   FC_WEIGHT, from an double in the 1..1000 range, resembling the
4142eceda581Smrg   numbers from OpenType specification's OS/2 usWeight numbers,
4143eceda581Smrg   which are also similar to CSS font-weight numbers. If input is
4144eceda581Smrg   negative, zero, or greater than 1000, returns -1. This function
4145eceda581Smrg   linearly interpolates between various FC_WEIGHT_* constants. As
4146eceda581Smrg   such, the returned value does not necessarily match any of the
4147eceda581Smrg   predefined constants.
4148a32e9e42Smrg
4149a32e9e42SmrgSince
4150a32e9e42Smrg
4151a32e9e42Smrg   version 2.12.92
4152a32e9e42Smrg
4153eceda581SmrgFcWeightToOpenTypeDouble
4154a32e9e42Smrg
4155a32e9e42SmrgName
4156a32e9e42Smrg
4157eceda581Smrg   FcWeightToOpenTypeDouble -- Convert from fontconfig weight
4158eceda581Smrg   values to OpenType ones
4159a32e9e42Smrg
4160a32e9e42SmrgSynopsis
4161a32e9e42Smrg
4162eceda581Smrg#include <fontconfig/fontconfig.h>
4163a32e9e42Smrg
4164a32e9e42Smrg   double FcWeightToOpenTypeDouble(doubleot_weight);
4165a32e9e42Smrg
4166a32e9e42SmrgDescription
4167a32e9e42Smrg
4168eceda581Smrg   FcWeightToOpenTypeDouble is the inverse of
4169eceda581Smrg   FcWeightFromOpenType. If the input is less than FC_WEIGHT_THIN
4170eceda581Smrg   or greater than FC_WEIGHT_EXTRABLACK, returns -1. Otherwise
4171eceda581Smrg   returns a number in the range 1 to 1000.
4172a32e9e42Smrg
4173a32e9e42SmrgSince
4174a32e9e42Smrg
4175a32e9e42Smrg   version 2.12.92
4176a32e9e42Smrg
4177eceda581SmrgFcWeightFromOpenType
4178a32e9e42Smrg
4179a32e9e42SmrgName
4180a32e9e42Smrg
4181eceda581Smrg   FcWeightFromOpenType -- Convert from OpenType weight values to
4182eceda581Smrg   fontconfig ones
4183a32e9e42Smrg
4184a32e9e42SmrgSynopsis
4185a32e9e42Smrg
4186eceda581Smrg#include <fontconfig/fontconfig.h>
41872c393a42Smrg
4188953daebaSmrg   int FcWeightFromOpenType(intot_weight);
41892c393a42Smrg
4190953daebaSmrgDescription
41912c393a42Smrg
4192eceda581Smrg   FcWeightFromOpenType is like FcWeightFromOpenTypeDouble but
4193eceda581Smrg   with integer arguments. Use the other function instead.
4194ca08ab68Smrg
4195953daebaSmrgSince
4196ca08ab68Smrg
4197953daebaSmrg   version 2.11.91
4198ca08ab68Smrg
4199eceda581SmrgFcWeightToOpenType
42002c393a42Smrg
42012c393a42SmrgName
42022c393a42Smrg
4203eceda581Smrg   FcWeightToOpenType -- Convert from fontconfig weight values to
4204eceda581Smrg   OpenType ones
42052c393a42Smrg
42062c393a42SmrgSynopsis
42072c393a42Smrg
4208eceda581Smrg#include <fontconfig/fontconfig.h>
42092c393a42Smrg
4210953daebaSmrg   int FcWeightToOpenType(intot_weight);
42112c393a42Smrg
42122c393a42SmrgDescription
42132c393a42Smrg
4214eceda581Smrg   FcWeightToOpenType is like FcWeightToOpenTypeDouble but with
4215eceda581Smrg   integer arguments. Use the other function instead.
4216953daebaSmrg
4217953daebaSmrgSince
4218953daebaSmrg
4219953daebaSmrg   version 2.11.91
4220eceda581Smrg     __________________________________________________________
4221953daebaSmrg
4222eceda581SmrgFcBlanks
4223953daebaSmrg
4224953daebaSmrg   Table of Contents
4225eceda581Smrg   FcBlanksCreate -- Create an FcBlanks
4226eceda581Smrg   FcBlanksDestroy -- Destroy and FcBlanks
4227eceda581Smrg   FcBlanksAdd -- Add a character to an FcBlanks
4228eceda581Smrg   FcBlanksIsMember -- Query membership in an FcBlanks
4229953daebaSmrg
4230eceda581Smrg   An FcBlanks object holds a list of Unicode chars which are
4231eceda581Smrg   expected to be blank when drawn. When scanning new fonts, any
4232eceda581Smrg   glyphs which are empty and not in this list will be assumed to
4233eceda581Smrg   be broken and not placed in the FcCharSet associated with the
4234eceda581Smrg   font. This provides a significantly more accurate CharSet for
4235eceda581Smrg   applications.
42362c393a42Smrg
4237eceda581Smrg   FcBlanks is deprecated and should not be used in newly written
4238eceda581Smrg   code. It is still accepted by some functions for compatibility
4239eceda581Smrg   with older code but will be removed in the future.
4240a32e9e42Smrg
4241eceda581SmrgFcBlanksCreate
42422c393a42Smrg
42432c393a42SmrgName
42442c393a42Smrg
4245eceda581Smrg   FcBlanksCreate -- Create an FcBlanks
42462c393a42Smrg
42472c393a42SmrgSynopsis
42482c393a42Smrg
4249eceda581Smrg#include <fontconfig/fontconfig.h>
42502c393a42Smrg
4251953daebaSmrg   FcBlanks * FcBlanksCreate(void);
42522c393a42Smrg
42532c393a42SmrgDescription
42542c393a42Smrg
4255a32e9e42Smrg   FcBlanks is deprecated. This function always returns NULL.
42562c393a42Smrg
4257eceda581SmrgFcBlanksDestroy
42582c393a42Smrg
42592c393a42SmrgName
42602c393a42Smrg
4261eceda581Smrg   FcBlanksDestroy -- Destroy and FcBlanks
42622c393a42Smrg
42632c393a42SmrgSynopsis
42642c393a42Smrg
4265eceda581Smrg#include <fontconfig/fontconfig.h>
4266a6844aabSmrg
4267953daebaSmrg   void FcBlanksDestroy(FcBlanks *b);
42682c393a42Smrg
42692c393a42SmrgDescription
42702c393a42Smrg
4271a32e9e42Smrg   FcBlanks is deprecated. This function does nothing.
42722c393a42Smrg
4273eceda581SmrgFcBlanksAdd
42742c393a42Smrg
42752c393a42SmrgName
42762c393a42Smrg
4277eceda581Smrg   FcBlanksAdd -- Add a character to an FcBlanks
42782c393a42Smrg
42792c393a42SmrgSynopsis
42802c393a42Smrg
4281eceda581Smrg#include <fontconfig/fontconfig.h>
4282a6844aabSmrg
4283953daebaSmrg   FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4);
42842c393a42Smrg
42852c393a42SmrgDescription
42862c393a42Smrg
4287a32e9e42Smrg   FcBlanks is deprecated. This function always returns FALSE.
42882c393a42Smrg
4289eceda581SmrgFcBlanksIsMember
4290ca08ab68Smrg
4291953daebaSmrgName
4292ca08ab68Smrg
4293eceda581Smrg   FcBlanksIsMember -- Query membership in an FcBlanks
4294ca08ab68Smrg
4295953daebaSmrgSynopsis
4296ca08ab68Smrg
4297eceda581Smrg#include <fontconfig/fontconfig.h>
4298a6844aabSmrg
4299953daebaSmrg   FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4);
43002c393a42Smrg
4301953daebaSmrgDescription
43022c393a42Smrg
4303a32e9e42Smrg   FcBlanks is deprecated. This function always returns FALSE.
4304eceda581Smrg     __________________________________________________________
4305a32e9e42Smrg
4306eceda581SmrgFcAtomic
43072c393a42Smrg
4308953daebaSmrg   Table of Contents
4309eceda581Smrg   FcAtomicCreate -- create an FcAtomic object
4310eceda581Smrg   FcAtomicLock -- lock a file
4311eceda581Smrg   FcAtomicNewFile -- return new temporary file name
4312eceda581Smrg   FcAtomicOrigFile -- return original file name
4313eceda581Smrg   FcAtomicReplaceOrig -- replace original with new
4314eceda581Smrg   FcAtomicDeleteNew -- delete new file
4315eceda581Smrg   FcAtomicUnlock -- unlock a file
4316eceda581Smrg   FcAtomicDestroy -- destroy an FcAtomic object
4317ca08ab68Smrg
4318eceda581Smrg   These functions provide a safe way to update configuration
4319eceda581Smrg   files, allowing ongoing reading of the old configuration file
4320eceda581Smrg   while locked for writing and ensuring that a consistent and
4321eceda581Smrg   complete version of the configuration file is always available.
4322a32e9e42Smrg
4323eceda581SmrgFcAtomicCreate
43242c393a42Smrg
43252c393a42SmrgName
43262c393a42Smrg
4327eceda581Smrg   FcAtomicCreate -- create an FcAtomic object
43282c393a42Smrg
43292c393a42SmrgSynopsis
43302c393a42Smrg
4331eceda581Smrg#include <fontconfig/fontconfig.h>
4332a6844aabSmrg
4333ca08ab68Smrg   FcAtomic * FcAtomicCreate(const FcChar8 *file);
43342c393a42Smrg
43352c393a42SmrgDescription
43362c393a42Smrg
4337eceda581Smrg   Creates a data structure containing data needed to control
4338eceda581Smrg   access to file. Writing is done to a separate file. Once that
4339eceda581Smrg   file is complete, the original configuration file is atomically
4340eceda581Smrg   replaced so that reading process always see a consistent and
4341eceda581Smrg   complete file without the need to lock for reading.
43422c393a42Smrg
4343eceda581SmrgFcAtomicLock
43442c393a42Smrg
43452c393a42SmrgName
43462c393a42Smrg
4347eceda581Smrg   FcAtomicLock -- lock a file
43482c393a42Smrg
43492c393a42SmrgSynopsis
43502c393a42Smrg
4351eceda581Smrg#include <fontconfig/fontconfig.h>
4352a6844aabSmrg
4353ca08ab68Smrg   FcBool FcAtomicLock(FcAtomic *atomic);
43542c393a42Smrg
43552c393a42SmrgDescription
43562c393a42Smrg
4357eceda581Smrg   Attempts to lock the file referenced by atomic. Returns FcFalse
4358eceda581Smrg   if the file is already locked, else returns FcTrue and leaves
4359eceda581Smrg   the file locked.
43602c393a42Smrg
4361eceda581SmrgFcAtomicNewFile
43622c393a42Smrg
43632c393a42SmrgName
43642c393a42Smrg
4365eceda581Smrg   FcAtomicNewFile -- return new temporary file name
43662c393a42Smrg
43672c393a42SmrgSynopsis
43682c393a42Smrg
4369eceda581Smrg#include <fontconfig/fontconfig.h>
4370a6844aabSmrg
4371ca08ab68Smrg   FcChar8 * FcAtomicNewFile(FcAtomic *atomic);
43722c393a42Smrg
43732c393a42SmrgDescription
43742c393a42Smrg
4375eceda581Smrg   Returns the filename for writing a new version of the file
4376eceda581Smrg   referenced by atomic.
43772c393a42Smrg
4378eceda581SmrgFcAtomicOrigFile
43792c393a42Smrg
43802c393a42SmrgName
43812c393a42Smrg
4382eceda581Smrg   FcAtomicOrigFile -- return original file name
43832c393a42Smrg
43842c393a42SmrgSynopsis
43852c393a42Smrg
4386eceda581Smrg#include <fontconfig/fontconfig.h>
4387a6844aabSmrg
4388ca08ab68Smrg   FcChar8 * FcAtomicOrigFile(FcAtomic *atomic);
43892c393a42Smrg
43902c393a42SmrgDescription
43912c393a42Smrg
4392ca08ab68Smrg   Returns the file referenced by atomic.
43932c393a42Smrg
4394eceda581SmrgFcAtomicReplaceOrig
43952c393a42Smrg
43962c393a42SmrgName
43972c393a42Smrg
4398eceda581Smrg   FcAtomicReplaceOrig -- replace original with new
43992c393a42Smrg
44002c393a42SmrgSynopsis
44012c393a42Smrg
4402eceda581Smrg#include <fontconfig/fontconfig.h>
4403a6844aabSmrg
4404ca08ab68Smrg   FcBool FcAtomicReplaceOrig(FcAtomic *atomic);
44052c393a42Smrg
44062c393a42SmrgDescription
44072c393a42Smrg
4408eceda581Smrg   Replaces the original file referenced by atomic with the new
4409eceda581Smrg   file. Returns FcFalse if the file cannot be replaced due to
4410eceda581Smrg   permission issues in the filesystem. Otherwise returns FcTrue.
44112c393a42Smrg
4412eceda581SmrgFcAtomicDeleteNew
44132c393a42Smrg
44142c393a42SmrgName
44152c393a42Smrg
4416eceda581Smrg   FcAtomicDeleteNew -- delete new file
44172c393a42Smrg
44182c393a42SmrgSynopsis
44192c393a42Smrg
4420eceda581Smrg#include <fontconfig/fontconfig.h>
4421a6844aabSmrg
4422ca08ab68Smrg   void FcAtomicDeleteNew(FcAtomic *atomic);
44232c393a42Smrg
44242c393a42SmrgDescription
44252c393a42Smrg
4426eceda581Smrg   Deletes the new file. Used in error recovery to back out
4427eceda581Smrg   changes.
44282c393a42Smrg
4429eceda581SmrgFcAtomicUnlock
44302c393a42Smrg
44312c393a42SmrgName
44322c393a42Smrg
4433eceda581Smrg   FcAtomicUnlock -- unlock a file
44342c393a42Smrg
44352c393a42SmrgSynopsis
44362c393a42Smrg
4437eceda581Smrg#include <fontconfig/fontconfig.h>
4438a6844aabSmrg
4439ca08ab68Smrg   void FcAtomicUnlock(FcAtomic *atomic);
44402c393a42Smrg
44412c393a42SmrgDescription
44422c393a42Smrg
4443ca08ab68Smrg   Unlocks the file.
44442c393a42Smrg
4445eceda581SmrgFcAtomicDestroy
44462c393a42Smrg
44472c393a42SmrgName
44482c393a42Smrg
4449eceda581Smrg   FcAtomicDestroy -- destroy an FcAtomic object
44502c393a42Smrg
44512c393a42SmrgSynopsis
44522c393a42Smrg
4453eceda581Smrg#include <fontconfig/fontconfig.h>
4454a6844aabSmrg
4455ca08ab68Smrg   void FcAtomicDestroy(FcAtomic *atomic);
44562c393a42Smrg
44572c393a42SmrgDescription
44582c393a42Smrg
4459ca08ab68Smrg   Destroys atomic.
4460eceda581Smrg     __________________________________________________________
44612c393a42Smrg
4462eceda581SmrgFile and Directory routines
4463ca08ab68Smrg
4464ca08ab68Smrg   Table of Contents
4465eceda581Smrg   FcFileScan -- scan a font file
4466eceda581Smrg   FcFileIsDir -- check whether a file is a directory
4467eceda581Smrg   FcDirScan -- scan a font directory without caching it
4468eceda581Smrg   FcDirSave -- DEPRECATED: formerly used to save a directory
4469eceda581Smrg          cache
4470ca08ab68Smrg
4471eceda581Smrg   FcDirCacheUnlink -- Remove all caches related to dir
4472eceda581Smrg   FcDirCacheValid -- check directory cache
4473eceda581Smrg   FcDirCacheLoad -- load a directory cache
4474eceda581Smrg   FcDirCacheRescan -- Re-scan a directory cache
4475eceda581Smrg   FcDirCacheRead -- read or construct a directory cache
4476eceda581Smrg   FcDirCacheLoadFile -- load a cache file
4477eceda581Smrg   FcDirCacheUnload -- unload a cache file
44782c393a42Smrg
4479eceda581Smrg   These routines work with font files and directories, including
4480eceda581Smrg   font directory cache files.
4481a32e9e42Smrg
4482eceda581SmrgFcFileScan
44832c393a42Smrg
44842c393a42SmrgName
44852c393a42Smrg
4486eceda581Smrg   FcFileScan -- scan a font file
44872c393a42Smrg
44882c393a42SmrgSynopsis
44892c393a42Smrg
4490eceda581Smrg#include <fontconfig/fontconfig.h>
4491a32e9e42Smrg
4492eceda581Smrg   FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
4493eceda581Smrg   *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force);
44942c393a42Smrg
44952c393a42SmrgDescription
44962c393a42Smrg
4497eceda581Smrg   Scans a single file and adds all fonts found to set. If force
4498eceda581Smrg   is FcTrue, then the file is scanned even if associated
4499eceda581Smrg   information is found in cache. If file is a directory, it is
4500eceda581Smrg   added to dirs. Whether fonts are found depends on fontconfig
4501eceda581Smrg   policy as well as the current configuration. Internally,
4502eceda581Smrg   fontconfig will ignore BDF and PCF fonts which are not in
4503eceda581Smrg   Unicode (or the effectively equivalent ISO Latin-1) encoding as
4504eceda581Smrg   those are not usable by Unicode-based applications. The
4505eceda581Smrg   configuration can ignore fonts based on filename or contents of
4506eceda581Smrg   the font file itself. Returns FcFalse if any of the fonts
4507eceda581Smrg   cannot be added (due to allocation failure). Otherwise returns
4508eceda581Smrg   FcTrue.
45092c393a42Smrg
4510eceda581SmrgFcFileIsDir
45112c393a42Smrg
45122c393a42SmrgName
45132c393a42Smrg
4514eceda581Smrg   FcFileIsDir -- check whether a file is a directory
45152c393a42Smrg
45162c393a42SmrgSynopsis
45172c393a42Smrg
4518eceda581Smrg#include <fontconfig/fontconfig.h>
4519a6844aabSmrg
4520ca08ab68Smrg   FcBool FcFileIsDir(const FcChar8 *file);
45212c393a42Smrg
45222c393a42SmrgDescription
45232c393a42Smrg
4524eceda581Smrg   Returns FcTrue if file is a directory, otherwise returns
4525eceda581Smrg   FcFalse.
45262c393a42Smrg
4527eceda581SmrgFcDirScan
45282c393a42Smrg
45292c393a42SmrgName
45302c393a42Smrg
4531eceda581Smrg   FcDirScan -- scan a font directory without caching it
45322c393a42Smrg
45332c393a42SmrgSynopsis
45342c393a42Smrg
4535eceda581Smrg#include <fontconfig/fontconfig.h>
4536a32e9e42Smrg
4537eceda581Smrg   FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
4538eceda581Smrg   *cache, FcBlanks *blanks, const FcChar8 *dir, FcBool force);
45392c393a42Smrg
45402c393a42SmrgDescription
45412c393a42Smrg
4542eceda581Smrg   If cache is not zero or if force is FcFalse, this function
4543eceda581Smrg   currently returns FcFalse. Otherwise, it scans an entire
4544eceda581Smrg   directory and adds all fonts found to set. Any subdirectories
4545eceda581Smrg   found are added to dirs. Calling this function does not create
4546eceda581Smrg   any cache files. Use FcDirCacheRead() if caching is desired.
45472c393a42Smrg
4548eceda581SmrgFcDirSave
45492c393a42Smrg
45502c393a42SmrgName
45512c393a42Smrg
4552eceda581Smrg   FcDirSave -- DEPRECATED: formerly used to save a directory
4553eceda581Smrg   cache
45542c393a42Smrg
45552c393a42SmrgSynopsis
45562c393a42Smrg
4557eceda581Smrg#include <fontconfig/fontconfig.h>
4558a32e9e42Smrg
4559eceda581Smrg   FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8
4560eceda581Smrg   *dir);
45612c393a42Smrg
45622c393a42SmrgDescription
45632c393a42Smrg
4564eceda581Smrg   This function now does nothing aside from returning FcFalse. It
4565eceda581Smrg   used to creates the per-directory cache file for dir and
4566eceda581Smrg   populates it with the fonts in set and subdirectories in dirs.
4567eceda581Smrg   All of this functionality is now automatically managed by
4568eceda581Smrg   FcDirCacheLoad and FcDirCacheRead.
45692c393a42Smrg
4570eceda581SmrgFcDirCacheUnlink
45712c393a42Smrg
45722c393a42SmrgName
45732c393a42Smrg
4574eceda581Smrg   FcDirCacheUnlink -- Remove all caches related to dir
45752c393a42Smrg
45762c393a42SmrgSynopsis
45772c393a42Smrg
4578eceda581Smrg#include <fontconfig/fontconfig.h>
4579a6844aabSmrg
4580ca08ab68Smrg   FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config);
45812c393a42Smrg
45822c393a42SmrgDescription
45832c393a42Smrg
4584eceda581Smrg   Scans the cache directories in config, removing any instances
4585eceda581Smrg   of the cache file for dir. Returns FcFalse when some internal
4586eceda581Smrg   error occurs (out of memory, etc). Errors actually unlinking
4587eceda581Smrg   any files are ignored.
45882c393a42Smrg
4589eceda581SmrgFcDirCacheValid
45902c393a42Smrg
45912c393a42SmrgName
45922c393a42Smrg
4593eceda581Smrg   FcDirCacheValid -- check directory cache
45942c393a42Smrg
45952c393a42SmrgSynopsis
45962c393a42Smrg
4597eceda581Smrg#include <fontconfig/fontconfig.h>
4598a6844aabSmrg
4599ca08ab68Smrg   FcBool FcDirCacheValid(const FcChar8 *dir);
46002c393a42Smrg
46012c393a42SmrgDescription
46022c393a42Smrg
4603eceda581Smrg   Returns FcTrue if dir has an associated valid cache file, else
4604eceda581Smrg   returns FcFalse
46052c393a42Smrg
4606eceda581SmrgFcDirCacheLoad
46072c393a42Smrg
46082c393a42SmrgName
46092c393a42Smrg
4610eceda581Smrg   FcDirCacheLoad -- load a directory cache
46112c393a42Smrg
46122c393a42SmrgSynopsis
46132c393a42Smrg
4614eceda581Smrg#include <fontconfig/fontconfig.h>
4615a32e9e42Smrg
4616eceda581Smrg   FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config,
4617eceda581Smrg   FcChar8 **cache_file);
46182c393a42Smrg
46192c393a42SmrgDescription
46202c393a42Smrg
4621eceda581Smrg   Loads the cache related to dir. If no cache file exists,
4622eceda581Smrg   returns NULL. The name of the cache file is returned in
4623eceda581Smrg   cache_file, unless that is NULL. See also FcDirCacheRead.
46242c393a42Smrg
4625eceda581SmrgFcDirCacheRescan
4626b09479dcSmrg
4627b09479dcSmrgName
4628b09479dcSmrg
4629eceda581Smrg   FcDirCacheRescan -- Re-scan a directory cache
4630b09479dcSmrg
4631b09479dcSmrgSynopsis
4632b09479dcSmrg
4633eceda581Smrg#include <fontconfig/fontconfig.h>
4634b09479dcSmrg
4635eceda581Smrg   FcCache * FcDirCacheRescan(const FcChar8 *dir, FcConfig
4636eceda581Smrg   *config);
4637b09479dcSmrg
4638b09479dcSmrgDescription
4639b09479dcSmrg
4640eceda581Smrg   Re-scan directories only at dir and update the cache. returns
4641eceda581Smrg   NULL if failed.
4642b09479dcSmrg
4643b09479dcSmrgSince
46442c393a42Smrg
4645b09479dcSmrg   version 2.11.1
46462c393a42Smrg
4647eceda581SmrgFcDirCacheRead
46482c393a42Smrg
46492c393a42SmrgName
46502c393a42Smrg
4651eceda581Smrg   FcDirCacheRead -- read or construct a directory cache
46522c393a42Smrg
46532c393a42SmrgSynopsis
46542c393a42Smrg
4655eceda581Smrg#include <fontconfig/fontconfig.h>
4656a32e9e42Smrg
4657eceda581Smrg   FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force,
4658eceda581Smrg   FcConfig *config);
46592c393a42Smrg
46602c393a42SmrgDescription
46612c393a42Smrg
4662eceda581Smrg   This returns a cache for dir. If force is FcFalse, then an
4663eceda581Smrg   existing, valid cache file will be used. Otherwise, a new cache
4664eceda581Smrg   will be created by scanning the directory and that returned.
46652c393a42Smrg
4666eceda581SmrgFcDirCacheLoadFile
46672c393a42Smrg
46682c393a42SmrgName
46692c393a42Smrg
4670eceda581Smrg   FcDirCacheLoadFile -- load a cache file
46712c393a42Smrg
46722c393a42SmrgSynopsis
46732c393a42Smrg
4674eceda581Smrg#include <fontconfig/fontconfig.h>
4675a32e9e42Smrg
4676eceda581Smrg   FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct
4677eceda581Smrg   stat *file_stat);
46782c393a42Smrg
46792c393a42SmrgDescription
46802c393a42Smrg
4681eceda581Smrg   This function loads a directory cache from cache_file. If
4682eceda581Smrg   file_stat is non-NULL, it will be filled with the results of
4683eceda581Smrg   stat(2) on the cache file.
46842c393a42Smrg
4685eceda581SmrgFcDirCacheUnload
46862c393a42Smrg
46872c393a42SmrgName
46882c393a42Smrg
4689eceda581Smrg   FcDirCacheUnload -- unload a cache file
46902c393a42Smrg
46912c393a42SmrgSynopsis
46922c393a42Smrg
4693eceda581Smrg#include <fontconfig/fontconfig.h>
4694a6844aabSmrg
4695ca08ab68Smrg   void FcDirCacheUnload(FcCache *cache);
46962c393a42Smrg
46972c393a42SmrgDescription
46982c393a42Smrg
4699eceda581Smrg   This function dereferences cache. When no other references to
4700eceda581Smrg   it remain, all memory associated with the cache will be freed.
4701eceda581Smrg     __________________________________________________________
4702a32e9e42Smrg
4703eceda581SmrgFcCache routines
4704ca08ab68Smrg
4705ca08ab68Smrg   Table of Contents
4706eceda581Smrg   FcCacheDir -- Return directory of cache
4707eceda581Smrg   FcCacheCopySet -- Returns a copy of the fontset from cache
4708eceda581Smrg   FcCacheSubdir -- Return the i'th subdirectory.
4709eceda581Smrg   FcCacheNumSubdir -- Return the number of subdirectories in
4710eceda581Smrg          cache.
4711ca08ab68Smrg
4712eceda581Smrg   FcCacheNumFont -- Returns the number of fonts in cache.
4713eceda581Smrg   FcDirCacheClean -- Clean up a cache directory
4714eceda581Smrg   FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
4715eceda581Smrg   FcDirCacheCreateUUID -- Create .uuid file at a directory
4716eceda581Smrg   FcDirCacheDeleteUUID -- Delete .uuid file
47172c393a42Smrg
4718eceda581Smrg   These routines work with font directory caches, accessing their
4719eceda581Smrg   contents in limited ways. It is not expected that normal
4720eceda581Smrg   applications will need to use these functions.
4721ca08ab68Smrg
4722eceda581SmrgFcCacheDir
47232c393a42Smrg
47242c393a42SmrgName
47252c393a42Smrg
4726eceda581Smrg   FcCacheDir -- Return directory of cache
47272c393a42Smrg
47282c393a42SmrgSynopsis
47292c393a42Smrg
4730eceda581Smrg#include <fontconfig/fontconfig.h>
4731a6844aabSmrg
4732ca08ab68Smrg   const FcChar8 * FcCacheDir(const FcCache *cache);
47332c393a42Smrg
47342c393a42SmrgDescription
47352c393a42Smrg
4736eceda581Smrg   This function returns the directory from which the cache was
4737eceda581Smrg   constructed.
47382c393a42Smrg
4739eceda581SmrgFcCacheCopySet
47402c393a42Smrg
47412c393a42SmrgName
47422c393a42Smrg
4743eceda581Smrg   FcCacheCopySet -- Returns a copy of the fontset from cache
47442c393a42Smrg
47452c393a42SmrgSynopsis
47462c393a42Smrg
4747eceda581Smrg#include <fontconfig/fontconfig.h>
4748a6844aabSmrg
4749ca08ab68Smrg   FcFontSet * FcCacheCopySet(const FcCache *cache);
47502c393a42Smrg
47512c393a42SmrgDescription
47522c393a42Smrg
4753eceda581Smrg   The returned fontset contains each of the font patterns from
4754eceda581Smrg   cache. This fontset may be modified, but the patterns from the
4755eceda581Smrg   cache are read-only.
47562c393a42Smrg
4757eceda581SmrgFcCacheSubdir
47582c393a42Smrg
47592c393a42SmrgName
47602c393a42Smrg
4761eceda581Smrg   FcCacheSubdir -- Return the i'th subdirectory.
47622c393a42Smrg
47632c393a42SmrgSynopsis
47642c393a42Smrg
4765eceda581Smrg#include <fontconfig/fontconfig.h>
4766a6844aabSmrg
4767ca08ab68Smrg   const FcChar8 * FcCacheSubdir(const FcCache *cache, inti);
47682c393a42Smrg
47692c393a42SmrgDescription
47702c393a42Smrg
4771eceda581Smrg   The set of subdirectories stored in a cache file are indexed by
4772eceda581Smrg   this function, i should range from 0 to n-1, where n is the
4773eceda581Smrg   return value from FcCacheNumSubdir.
47742c393a42Smrg
4775eceda581SmrgFcCacheNumSubdir
47762c393a42Smrg
47772c393a42SmrgName
47782c393a42Smrg
4779eceda581Smrg   FcCacheNumSubdir -- Return the number of subdirectories in
4780eceda581Smrg   cache.
47812c393a42Smrg
47822c393a42SmrgSynopsis
47832c393a42Smrg
4784eceda581Smrg#include <fontconfig/fontconfig.h>
4785a6844aabSmrg
4786ca08ab68Smrg   int FcCacheNumSubdir(const FcCache *cache);
47872c393a42Smrg
47882c393a42SmrgDescription
47892c393a42Smrg
4790ca08ab68Smrg   This returns the total number of subdirectories in the cache.
47912c393a42Smrg
4792eceda581SmrgFcCacheNumFont
47932c393a42Smrg
47942c393a42SmrgName
47952c393a42Smrg
4796eceda581Smrg   FcCacheNumFont -- Returns the number of fonts in cache.
47972c393a42Smrg
47982c393a42SmrgSynopsis
47992c393a42Smrg
4800eceda581Smrg#include <fontconfig/fontconfig.h>
4801a6844aabSmrg
4802ca08ab68Smrg   int FcCacheNumFont(const FcCache *cache);
48032c393a42Smrg
48042c393a42SmrgDescription
48052c393a42Smrg
4806eceda581Smrg   This returns the number of fonts which would be included in the
4807eceda581Smrg   return from FcCacheCopySet.
48082c393a42Smrg
4809eceda581SmrgFcDirCacheClean
4810ca08ab68Smrg
4811ca08ab68SmrgName
4812ca08ab68Smrg
4813eceda581Smrg   FcDirCacheClean -- Clean up a cache directory
4814ca08ab68Smrg
4815ca08ab68SmrgSynopsis
4816ca08ab68Smrg
4817eceda581Smrg#include <fontconfig/fontconfig.h>
4818a6844aabSmrg
4819eceda581Smrg   FcBool FcDirCacheClean(const FcChar8 *cache_dir,
4820eceda581Smrg   FcBoolverbose);
4821ca08ab68Smrg
4822ca08ab68SmrgDescription
48232c393a42Smrg
4824eceda581Smrg   This tries to clean up the cache directory of cache_dir. This
4825eceda581Smrg   returns FcTrue if the operation is successfully complete.
4826eceda581Smrg   otherwise FcFalse.
4827a32e9e42Smrg
4828b09479dcSmrgSince
48292c393a42Smrg
4830b09479dcSmrg   version 2.9.91
4831ca08ab68Smrg
4832eceda581SmrgFcCacheCreateTagFile
48332c393a42Smrg
48342c393a42SmrgName
48352c393a42Smrg
4836eceda581Smrg   FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
48372c393a42Smrg
48382c393a42SmrgSynopsis
48392c393a42Smrg
4840eceda581Smrg#include <fontconfig/fontconfig.h>
4841a6844aabSmrg
4842ca08ab68Smrg   void FcCacheCreateTagFile(const FcConfig *config);
48432c393a42Smrg
48442c393a42SmrgDescription
48452c393a42Smrg
4846eceda581Smrg   This tries to create CACHEDIR.TAG file at the cache directory
4847eceda581Smrg   registered to config.
48482c393a42Smrg
4849b09479dcSmrgSince
48502c393a42Smrg
4851b09479dcSmrg   version 2.9.91
4852ca08ab68Smrg
4853eceda581SmrgFcDirCacheCreateUUID
4854a32e9e42Smrg
4855a32e9e42SmrgName
4856a32e9e42Smrg
4857eceda581Smrg   FcDirCacheCreateUUID -- Create .uuid file at a directory
4858a32e9e42Smrg
4859a32e9e42SmrgSynopsis
4860a32e9e42Smrg
4861eceda581Smrg#include <fontconfig/fontconfig.h>
4862a32e9e42Smrg
4863eceda581Smrg   FcBool FcDirCacheCreateUUID(FcChar8 *dir, FcBoolforce, FcConfig
4864eceda581Smrg   *config);
4865a32e9e42Smrg
4866a32e9e42SmrgDescription
4867a32e9e42Smrg
4868a4e54154Smrg   This function is deprecated. it doesn't take any effects.
4869a32e9e42Smrg
4870a32e9e42SmrgSince
4871a32e9e42Smrg
4872a32e9e42Smrg   version 2.12.92
4873a32e9e42Smrg
4874eceda581SmrgFcDirCacheDeleteUUID
4875a32e9e42Smrg
4876a32e9e42SmrgName
4877a32e9e42Smrg
4878eceda581Smrg   FcDirCacheDeleteUUID -- Delete .uuid file
4879a32e9e42Smrg
4880a32e9e42SmrgSynopsis
4881a32e9e42Smrg
4882eceda581Smrg#include <fontconfig/fontconfig.h>
4883a32e9e42Smrg
4884eceda581Smrg   FcBool FcDirCacheDeleteUUID(const FcChar8 *dir, FcConfig
4885eceda581Smrg   *config);
4886a32e9e42Smrg
4887a32e9e42SmrgDescription
4888a32e9e42Smrg
4889eceda581Smrg   This is to delete .uuid file containing an UUID at a font
4890eceda581Smrg   directory of dir.
4891a32e9e42Smrg
4892a32e9e42SmrgSince
4893a32e9e42Smrg
4894a32e9e42Smrg   version 2.13.1
4895eceda581Smrg     __________________________________________________________
4896a32e9e42Smrg
4897eceda581SmrgFcStrSet and FcStrList
4898ca08ab68Smrg
4899ca08ab68Smrg   Table of Contents
4900eceda581Smrg   FcStrSetCreate -- create a string set
4901eceda581Smrg   FcStrSetMember -- check set for membership
4902eceda581Smrg   FcStrSetEqual -- check sets for equality
4903eceda581Smrg   FcStrSetAdd -- add to a string set
4904eceda581Smrg   FcStrSetAddFilename -- add a filename to a string set
4905eceda581Smrg   FcStrSetDel -- delete from a string set
4906eceda581Smrg   FcStrSetDestroy -- destroy a string set
4907eceda581Smrg   FcStrListCreate -- create a string iterator
4908eceda581Smrg   FcStrListFirst -- get first string in iteration
4909eceda581Smrg   FcStrListNext -- get next string in iteration
4910eceda581Smrg   FcStrListDone -- destroy a string iterator
4911ca08ab68Smrg
4912eceda581Smrg   A data structure for enumerating strings, used to list
4913eceda581Smrg   directories while scanning the configuration as directories are
4914eceda581Smrg   added while scanning.
4915a32e9e42Smrg
4916eceda581SmrgFcStrSetCreate
49172c393a42Smrg
49182c393a42SmrgName
49192c393a42Smrg
4920eceda581Smrg   FcStrSetCreate -- create a string set
49212c393a42Smrg
49222c393a42SmrgSynopsis
49232c393a42Smrg
4924eceda581Smrg#include <fontconfig/fontconfig.h>
4925a6844aabSmrg
4926ca08ab68Smrg   FcStrSet * FcStrSetCreate(void);
49272c393a42Smrg
49282c393a42SmrgDescription
49292c393a42Smrg
4930ca08ab68Smrg   Create an empty set.
49312c393a42Smrg
4932eceda581SmrgFcStrSetMember
49332c393a42Smrg
49342c393a42SmrgName
49352c393a42Smrg
4936eceda581Smrg   FcStrSetMember -- check set for membership
49372c393a42Smrg
49382c393a42SmrgSynopsis
49392c393a42Smrg
4940eceda581Smrg#include <fontconfig/fontconfig.h>
4941a6844aabSmrg
4942ca08ab68Smrg   FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s);
49432c393a42Smrg
49442c393a42SmrgDescription
49452c393a42Smrg
4946ca08ab68Smrg   Returns whether s is a member of set.
49472c393a42Smrg
4948eceda581SmrgFcStrSetEqual
49492c393a42Smrg
49502c393a42SmrgName
49512c393a42Smrg
4952eceda581Smrg   FcStrSetEqual -- check sets for equality
49532c393a42Smrg
49542c393a42SmrgSynopsis
49552c393a42Smrg
4956eceda581Smrg#include <fontconfig/fontconfig.h>
4957a6844aabSmrg
4958ca08ab68Smrg   FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b);
49592c393a42Smrg
49602c393a42SmrgDescription
49612c393a42Smrg
4962eceda581Smrg   Returns whether set_a contains precisely the same strings as
4963eceda581Smrg   set_b. Ordering of strings within the two sets is not
4964eceda581Smrg   considered.
49652c393a42Smrg
4966eceda581SmrgFcStrSetAdd
49672c393a42Smrg
49682c393a42SmrgName
49692c393a42Smrg
4970eceda581Smrg   FcStrSetAdd -- add to a string set
49712c393a42Smrg
49722c393a42SmrgSynopsis
49732c393a42Smrg
4974eceda581Smrg#include <fontconfig/fontconfig.h>
4975a6844aabSmrg
4976ca08ab68Smrg   FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s);
49772c393a42Smrg
49782c393a42SmrgDescription
49792c393a42Smrg
4980ca08ab68Smrg   Adds a copy of s to set.
49812c393a42Smrg
4982eceda581SmrgFcStrSetAddFilename
49832c393a42Smrg
49842c393a42SmrgName
49852c393a42Smrg
4986eceda581Smrg   FcStrSetAddFilename -- add a filename to a string set
49872c393a42Smrg
49882c393a42SmrgSynopsis
49892c393a42Smrg
4990eceda581Smrg#include <fontconfig/fontconfig.h>
4991a6844aabSmrg
4992ca08ab68Smrg   FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s);
49932c393a42Smrg
49942c393a42SmrgDescription
49952c393a42Smrg
4996eceda581Smrg   Adds a copy s to set, The copy is created with
4997eceda581Smrg   FcStrCopyFilename so that leading '~' values are replaced with
4998eceda581Smrg   the value of the HOME environment variable.
49992c393a42Smrg
5000eceda581SmrgFcStrSetDel
50012c393a42Smrg
50022c393a42SmrgName
50032c393a42Smrg
5004eceda581Smrg   FcStrSetDel -- delete from a string set
50052c393a42Smrg
50062c393a42SmrgSynopsis
50072c393a42Smrg
5008eceda581Smrg#include <fontconfig/fontconfig.h>
5009a6844aabSmrg
5010ca08ab68Smrg   FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s);
50112c393a42Smrg
50122c393a42SmrgDescription
50132c393a42Smrg
5014eceda581Smrg   Removes s from set, returning FcTrue if s was a member else
5015eceda581Smrg   FcFalse.
50162c393a42Smrg
5017eceda581SmrgFcStrSetDestroy
50182c393a42Smrg
50192c393a42SmrgName
50202c393a42Smrg
5021eceda581Smrg   FcStrSetDestroy -- destroy a string set
50222c393a42Smrg
50232c393a42SmrgSynopsis
50242c393a42Smrg
5025eceda581Smrg#include <fontconfig/fontconfig.h>
5026a6844aabSmrg
5027ca08ab68Smrg   void FcStrSetDestroy(FcStrSet *set);
50282c393a42Smrg
50292c393a42SmrgDescription
50302c393a42Smrg
5031ca08ab68Smrg   Destroys set.
50322c393a42Smrg
5033eceda581SmrgFcStrListCreate
50342c393a42Smrg
50352c393a42SmrgName
50362c393a42Smrg
5037eceda581Smrg   FcStrListCreate -- create a string iterator
50382c393a42Smrg
50392c393a42SmrgSynopsis
50402c393a42Smrg
5041eceda581Smrg#include <fontconfig/fontconfig.h>
5042a6844aabSmrg
5043ca08ab68Smrg   FcStrList * FcStrListCreate(FcStrSet *set);
50442c393a42Smrg
50452c393a42SmrgDescription
50462c393a42Smrg
5047ca08ab68Smrg   Creates an iterator to list the strings in set.
50482c393a42Smrg
5049eceda581SmrgFcStrListFirst
50506fc018e4Smrg
50516fc018e4SmrgName
50526fc018e4Smrg
5053eceda581Smrg   FcStrListFirst -- get first string in iteration
50546fc018e4Smrg
50556fc018e4SmrgSynopsis
50566fc018e4Smrg
5057eceda581Smrg#include <fontconfig/fontconfig.h>
50586fc018e4Smrg
50596fc018e4Smrg   void FcStrListFirst(FcStrList *list);
50606fc018e4Smrg
50616fc018e4SmrgDescription
50626fc018e4Smrg
50636fc018e4Smrg   Returns the first string in list.
50646fc018e4Smrg
5065b09479dcSmrgSince
50666fc018e4Smrg
5067b09479dcSmrg   version 2.11.0
50682c393a42Smrg
5069eceda581SmrgFcStrListNext
50702c393a42Smrg
50712c393a42SmrgName
50722c393a42Smrg
5073eceda581Smrg   FcStrListNext -- get next string in iteration
50742c393a42Smrg
50752c393a42SmrgSynopsis
50762c393a42Smrg
5077eceda581Smrg#include <fontconfig/fontconfig.h>
5078a6844aabSmrg
5079ca08ab68Smrg   FcChar8 * FcStrListNext(FcStrList *list);
50802c393a42Smrg
50812c393a42SmrgDescription
50822c393a42Smrg
50836fc018e4Smrg   Returns the next string in list.
50842c393a42Smrg
5085eceda581SmrgFcStrListDone
50862c393a42Smrg
5087ca08ab68SmrgName
5088ca08ab68Smrg
5089eceda581Smrg   FcStrListDone -- destroy a string iterator
5090ca08ab68Smrg
5091ca08ab68SmrgSynopsis
5092ca08ab68Smrg
5093eceda581Smrg#include <fontconfig/fontconfig.h>
5094ca08ab68Smrg
5095ca08ab68Smrg   void FcStrListDone(FcStrList *list);
5096ca08ab68Smrg
5097ca08ab68SmrgDescription
5098ca08ab68Smrg
5099ca08ab68Smrg   Destroys the enumerator list.
5100eceda581Smrg     __________________________________________________________
5101ca08ab68Smrg
5102eceda581SmrgString utilities
5103ca08ab68Smrg
5104ca08ab68Smrg   Table of Contents
5105eceda581Smrg   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
5106eceda581Smrg   FcUcs4ToUtf8 -- convert UCS4 to UTF-8
5107eceda581Smrg   FcUtf8Len -- count UTF-8 encoded chars
5108eceda581Smrg   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
5109eceda581Smrg   FcUtf16Len -- count UTF-16 encoded chars
5110eceda581Smrg   FcIsLower -- check for lower case ASCII character
5111eceda581Smrg   FcIsUpper -- check for upper case ASCII character
5112eceda581Smrg   FcToLower -- convert upper case ASCII to lower case
5113eceda581Smrg   FcStrCopy -- duplicate a string
5114eceda581Smrg   FcStrDowncase -- create a lower case translation of a string
5115eceda581Smrg   FcStrCopyFilename -- create a complete path from a filename
5116eceda581Smrg   FcStrCmp -- compare UTF-8 strings
5117eceda581Smrg   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
5118eceda581Smrg   FcStrStr -- locate UTF-8 substring
5119eceda581Smrg   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring case
5120eceda581Smrg   FcStrPlus -- concatenate two strings
5121eceda581Smrg   FcStrFree -- free a string
5122eceda581Smrg   FcStrBuildFilename -- Concatenate strings as a file path
5123eceda581Smrg   FcStrDirname -- directory part of filename
5124eceda581Smrg   FcStrBasename -- last component of filename
5125ca08ab68Smrg
5126eceda581Smrg   Fontconfig manipulates many UTF-8 strings represented with the
5127eceda581Smrg   FcChar8 type. These functions are exposed to help applications
5128eceda581Smrg   deal with these UTF-8 strings in a locale-insensitive manner.
5129a32e9e42Smrg
5130eceda581SmrgFcUtf8ToUcs4
51312c393a42Smrg
51322c393a42SmrgName
51332c393a42Smrg
5134eceda581Smrg   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
51352c393a42Smrg
51362c393a42SmrgSynopsis
51372c393a42Smrg
5138eceda581Smrg#include <fontconfig/fontconfig.h>
5139a6844aabSmrg
5140ca08ab68Smrg   int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len);
51412c393a42Smrg
51422c393a42SmrgDescription
51432c393a42Smrg
5144eceda581Smrg   Converts the next Unicode char from src into dst and returns
5145eceda581Smrg   the number of bytes containing the char. src must be at least
5146eceda581Smrg   len bytes long.
51472c393a42Smrg
5148eceda581SmrgFcUcs4ToUtf8
51492c393a42Smrg
51502c393a42SmrgName
51512c393a42Smrg
5152eceda581Smrg   FcUcs4ToUtf8 -- convert UCS4 to UTF-8
51532c393a42Smrg
51542c393a42SmrgSynopsis
51552c393a42Smrg
5156eceda581Smrg#include <fontconfig/fontconfig.h>
5157a6844aabSmrg
5158ca08ab68Smrg   int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]);
51592c393a42Smrg
51602c393a42SmrgDescription
51612c393a42Smrg
5162eceda581Smrg   Converts the Unicode char from src into dst and returns the
5163eceda581Smrg   number of bytes needed to encode the char.
51642c393a42Smrg
5165eceda581SmrgFcUtf8Len
51662c393a42Smrg
51672c393a42SmrgName
51682c393a42Smrg
5169eceda581Smrg   FcUtf8Len -- count UTF-8 encoded chars
51702c393a42Smrg
51712c393a42SmrgSynopsis
51722c393a42Smrg
5173eceda581Smrg#include <fontconfig/fontconfig.h>
5174a6844aabSmrg
5175eceda581Smrg   FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int
5176eceda581Smrg   *wchar);
51772c393a42Smrg
51782c393a42SmrgDescription
51792c393a42Smrg
5180eceda581Smrg   Counts the number of Unicode chars in len bytes of src. Places
5181eceda581Smrg   that count in nchar. wchar contains 1, 2 or 4 depending on the
5182eceda581Smrg   number of bytes needed to hold the largest Unicode char
5183eceda581Smrg   counted. The return value indicates whether src is a
5184eceda581Smrg   well-formed UTF8 string.
51852c393a42Smrg
5186eceda581SmrgFcUtf16ToUcs4
51872c393a42Smrg
51882c393a42SmrgName
51892c393a42Smrg
5190eceda581Smrg   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
51912c393a42Smrg
51922c393a42SmrgSynopsis
51932c393a42Smrg
5194eceda581Smrg#include <fontconfig/fontconfig.h>
5195a32e9e42Smrg
5196eceda581Smrg   int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst,
5197eceda581Smrg   int len);
51982c393a42Smrg
51992c393a42SmrgDescription
52002c393a42Smrg
5201eceda581Smrg   Converts the next Unicode char from src into dst and returns
5202eceda581Smrg   the number of bytes containing the char. src must be at least
5203eceda581Smrg   len bytes long. Bytes of src are combined into 16-bit units
5204eceda581Smrg   according to endian.
52052c393a42Smrg
5206eceda581SmrgFcUtf16Len
52072c393a42Smrg
52082c393a42SmrgName
52092c393a42Smrg
5210eceda581Smrg   FcUtf16Len -- count UTF-16 encoded chars
52112c393a42Smrg
52122c393a42SmrgSynopsis
52132c393a42Smrg
5214eceda581Smrg#include <fontconfig/fontconfig.h>
5215a32e9e42Smrg
5216eceda581Smrg   FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int
5217eceda581Smrg   *nchar, int *wchar);
52182c393a42Smrg
52192c393a42SmrgDescription
52202c393a42Smrg
5221eceda581Smrg   Counts the number of Unicode chars in len bytes of src. Bytes
5222eceda581Smrg   of src are combined into 16-bit units according to endian.
5223eceda581Smrg   Places that count in nchar. wchar contains 1, 2 or 4 depending
5224eceda581Smrg   on the number of bytes needed to hold the largest Unicode char
5225eceda581Smrg   counted. The return value indicates whether string is a
5226eceda581Smrg   well-formed UTF16 string.
52272c393a42Smrg
5228eceda581SmrgFcIsLower
52292c393a42Smrg
52302c393a42SmrgName
52312c393a42Smrg
5232eceda581Smrg   FcIsLower -- check for lower case ASCII character
52332c393a42Smrg
52342c393a42SmrgSynopsis
52352c393a42Smrg
5236eceda581Smrg#include <fontconfig/fontconfig.h>
5237a6844aabSmrg
5238ca08ab68Smrg   FcBool FcIsLower(FcChar8c);
52392c393a42Smrg
52402c393a42SmrgDescription
52412c393a42Smrg
5242ca08ab68Smrg   This macro checks whether c is an lower case ASCII letter.
52432c393a42Smrg
5244eceda581SmrgFcIsUpper
52452c393a42Smrg
52462c393a42SmrgName
52472c393a42Smrg
5248eceda581Smrg   FcIsUpper -- check for upper case ASCII character
52492c393a42Smrg
52502c393a42SmrgSynopsis
52512c393a42Smrg
5252eceda581Smrg#include <fontconfig/fontconfig.h>
5253a6844aabSmrg
5254ca08ab68Smrg   FcBool FcIsUpper(FcChar8c);
52552c393a42Smrg
52562c393a42SmrgDescription
52572c393a42Smrg
5258ca08ab68Smrg   This macro checks whether c is a upper case ASCII letter.
52592c393a42Smrg
5260eceda581SmrgFcToLower
52612c393a42Smrg
52622c393a42SmrgName
52632c393a42Smrg
5264eceda581Smrg   FcToLower -- convert upper case ASCII to lower case
52652c393a42Smrg
52662c393a42SmrgSynopsis
52672c393a42Smrg
5268eceda581Smrg#include <fontconfig/fontconfig.h>
5269a6844aabSmrg
5270ca08ab68Smrg   FcChar8 FcToLower(FcChar8c);
52712c393a42Smrg
52722c393a42SmrgDescription
52732c393a42Smrg
5274eceda581Smrg   This macro converts upper case ASCII c to the equivalent lower
5275eceda581Smrg   case letter.
52762c393a42Smrg
5277eceda581SmrgFcStrCopy
52782c393a42Smrg
52792c393a42SmrgName
52802c393a42Smrg
5281eceda581Smrg   FcStrCopy -- duplicate a string
52822c393a42Smrg
52832c393a42SmrgSynopsis
52842c393a42Smrg
5285eceda581Smrg#include <fontconfig/fontconfig.h>
5286a6844aabSmrg
5287ca08ab68Smrg   FcChar8 * FcStrCopy(const FcChar8 *s);
52882c393a42Smrg
52892c393a42SmrgDescription
52902c393a42Smrg
5291eceda581Smrg   Allocates memory, copies s and returns the resulting buffer.
5292eceda581Smrg   Yes, this is strdup, but that function isn't available on every
5293eceda581Smrg   platform.
52942c393a42Smrg
5295eceda581SmrgFcStrDowncase
52962c393a42Smrg
52972c393a42SmrgName
52982c393a42Smrg
5299eceda581Smrg   FcStrDowncase -- create a lower case translation of a string
53002c393a42Smrg
53012c393a42SmrgSynopsis
53022c393a42Smrg
5303eceda581Smrg#include <fontconfig/fontconfig.h>
5304a6844aabSmrg
5305ca08ab68Smrg   FcChar8 * FcStrDowncase(const FcChar8 *s);
53062c393a42Smrg
53072c393a42SmrgDescription
53082c393a42Smrg
5309eceda581Smrg   Allocates memory, copies s, converting upper case letters to
5310eceda581Smrg   lower case and returns the allocated buffer.
53112c393a42Smrg
5312eceda581SmrgFcStrCopyFilename
53132c393a42Smrg
53142c393a42SmrgName
53152c393a42Smrg
5316eceda581Smrg   FcStrCopyFilename -- create a complete path from a filename
53172c393a42Smrg
53182c393a42SmrgSynopsis
53192c393a42Smrg
5320eceda581Smrg#include <fontconfig/fontconfig.h>
5321a6844aabSmrg
5322ca08ab68Smrg   FcChar8 * FcStrCopyFilename(const FcChar8 *s);
53232c393a42Smrg
53242c393a42SmrgDescription
53252c393a42Smrg
5326eceda581Smrg   FcStrCopyFilename constructs an absolute pathname from s. It
5327eceda581Smrg   converts any leading '~' characters in to the value of the HOME
5328eceda581Smrg   environment variable, and any relative paths are converted to
5329eceda581Smrg   absolute paths using the current working directory. Sequences
5330eceda581Smrg   of '/' characters are converted to a single '/', and names
5331eceda581Smrg   containing the current directory '.' or parent directory '..'
5332eceda581Smrg   are correctly reconstructed. Returns NULL if '~' is the leading
5333eceda581Smrg   character and HOME is unset or disabled (see
5334eceda581Smrg   FcConfigEnableHome).
53352c393a42Smrg
5336eceda581SmrgFcStrCmp
53372c393a42Smrg
53382c393a42SmrgName
53392c393a42Smrg
5340eceda581Smrg   FcStrCmp -- compare UTF-8 strings
53412c393a42Smrg
53422c393a42SmrgSynopsis
53432c393a42Smrg
5344eceda581Smrg#include <fontconfig/fontconfig.h>
5345a6844aabSmrg
5346ca08ab68Smrg   int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2);
53472c393a42Smrg
53482c393a42SmrgDescription
53492c393a42Smrg
5350ca08ab68Smrg   Returns the usual <0, 0, >0 result of comparing s1 and s2.
53512c393a42Smrg
5352eceda581SmrgFcStrCmpIgnoreCase
53532c393a42Smrg
53542c393a42SmrgName
53552c393a42Smrg
5356eceda581Smrg   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
53572c393a42Smrg
53582c393a42SmrgSynopsis
53592c393a42Smrg
5360eceda581Smrg#include <fontconfig/fontconfig.h>
5361a6844aabSmrg
5362ca08ab68Smrg   int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2);
53632c393a42Smrg
53642c393a42SmrgDescription
53652c393a42Smrg
5366eceda581Smrg   Returns the usual <0, 0, >0 result of comparing s1 and s2. This
5367eceda581Smrg   test is case-insensitive for all proper UTF-8 encoded strings.
53682c393a42Smrg
5369eceda581SmrgFcStrStr
53702c393a42Smrg
53712c393a42SmrgName
53722c393a42Smrg
5373eceda581Smrg   FcStrStr -- locate UTF-8 substring
53742c393a42Smrg
53752c393a42SmrgSynopsis
53762c393a42Smrg
5377eceda581Smrg#include <fontconfig/fontconfig.h>
5378a6844aabSmrg
5379ca08ab68Smrg   FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2);
53802c393a42Smrg
53812c393a42SmrgDescription
53822c393a42Smrg
5383eceda581Smrg   Returns the location of s2 in s1. Returns NULL if s2 is not
5384eceda581Smrg   present in s1. This test will operate properly with UTF8
5385eceda581Smrg   encoded strings.
53862c393a42Smrg
5387eceda581SmrgFcStrStrIgnoreCase
53882c393a42Smrg
53892c393a42SmrgName
53902c393a42Smrg
5391eceda581Smrg   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring case
53922c393a42Smrg
53932c393a42SmrgSynopsis
53942c393a42Smrg
5395eceda581Smrg#include <fontconfig/fontconfig.h>
5396a32e9e42Smrg
5397eceda581Smrg   FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8
5398eceda581Smrg   *s2);
53992c393a42Smrg
54002c393a42SmrgDescription
54012c393a42Smrg
5402eceda581Smrg   Returns the location of s2 in s1, ignoring case. Returns NULL
5403eceda581Smrg   if s2 is not present in s1. This test is case-insensitive for
5404eceda581Smrg   all proper UTF-8 encoded strings.
54052c393a42Smrg
5406eceda581SmrgFcStrPlus
54072c393a42Smrg
54082c393a42SmrgName
54092c393a42Smrg
5410eceda581Smrg   FcStrPlus -- concatenate two strings
54112c393a42Smrg
54122c393a42SmrgSynopsis
54132c393a42Smrg
5414eceda581Smrg#include <fontconfig/fontconfig.h>
5415a6844aabSmrg
5416ca08ab68Smrg   FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2);
54172c393a42Smrg
54182c393a42SmrgDescription
54192c393a42Smrg
5420eceda581Smrg   This function allocates new storage and places the
5421eceda581Smrg   concatenation of s1 and s2 there, returning the new string.
54222c393a42Smrg
5423eceda581SmrgFcStrFree
54242c393a42Smrg
54252c393a42SmrgName
54262c393a42Smrg
5427eceda581Smrg   FcStrFree -- free a string
54282c393a42Smrg
54292c393a42SmrgSynopsis
54302c393a42Smrg
5431eceda581Smrg#include <fontconfig/fontconfig.h>
5432a6844aabSmrg
5433ca08ab68Smrg   void FcStrFree(FcChar8 *s);
54342c393a42Smrg
54352c393a42SmrgDescription
54362c393a42Smrg
5437eceda581Smrg   This is just a wrapper around free(3) which helps track memory
5438eceda581Smrg   usage of strings within the fontconfig library.
54392c393a42Smrg
5440eceda581SmrgFcStrBuildFilename
5441a4e54154Smrg
5442a4e54154SmrgName
5443a4e54154Smrg
5444eceda581Smrg   FcStrBuildFilename -- Concatenate strings as a file path
5445a4e54154Smrg
5446a4e54154SmrgSynopsis
5447a4e54154Smrg
5448eceda581Smrg#include <fontconfig/fontconfig.h>
5449a4e54154Smrg
5450a4e54154Smrg   FcChar8 * FcStrBuildFilename(const FcChar8 *path, ...);
5451a4e54154Smrg
5452a4e54154SmrgDescription
5453a4e54154Smrg
5454eceda581Smrg   Creates a filename from the given elements of strings as file
5455eceda581Smrg   paths and concatenate them with the appropriate file separator.
5456eceda581Smrg   Arguments must be null-terminated. This returns a
5457eceda581Smrg   newly-allocated memory which should be freed when no longer
5458eceda581Smrg   needed.
5459a4e54154Smrg
5460eceda581SmrgFcStrDirname
54612c393a42Smrg
54622c393a42SmrgName
54632c393a42Smrg
5464eceda581Smrg   FcStrDirname -- directory part of filename
54652c393a42Smrg
54662c393a42SmrgSynopsis
54672c393a42Smrg
5468eceda581Smrg#include <fontconfig/fontconfig.h>
5469a6844aabSmrg
5470ca08ab68Smrg   FcChar8 * FcStrDirname(const FcChar8 *file);
54712c393a42Smrg
54722c393a42SmrgDescription
54732c393a42Smrg
5474eceda581Smrg   Returns the directory containing file. This is returned in
5475eceda581Smrg   newly allocated storage which should be freed when no longer
5476eceda581Smrg   needed.
54772c393a42Smrg
5478eceda581SmrgFcStrBasename
54792c393a42Smrg
54802c393a42SmrgName
54812c393a42Smrg
5482eceda581Smrg   FcStrBasename -- last component of filename
54832c393a42Smrg
54842c393a42SmrgSynopsis
54852c393a42Smrg
5486eceda581Smrg#include <fontconfig/fontconfig.h>
5487a6844aabSmrg
5488ca08ab68Smrg   FcChar8 * FcStrBasename(const FcChar8 *file);
54892c393a42Smrg
54902c393a42SmrgDescription
54912c393a42Smrg
5492eceda581Smrg   Returns the filename of file stripped of any leading directory
5493eceda581Smrg   names. This is returned in newly allocated storage which should
5494eceda581Smrg   be freed when no longer needed.
5495