fontconfig-devel.txt revision 1cc69409
1Fontconfig Developers Reference, Version 2.14.2
2
3   Copyright © 2002 Keith Packard
4
5   Permission to use, copy, modify, distribute, and sell this
6   software and its documentation for any purpose is hereby
7   granted without fee, provided that the above copyright notice
8   appear in all copies and that both that copyright notice and
9   this permission notice appear in supporting documentation, and
10   that the name of the author(s) not be used in advertising or
11   publicity pertaining to distribution of the software without
12   specific, written prior permission. The authors make no
13   representations about the suitability of this software for any
14   purpose. It is provided "as is" without express or implied
15   warranty.
16
17   THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
18   SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19   AND FITNESS, IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
20   SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
22   IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23   ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24   THIS SOFTWARE.
25           _______________________________________________
26
27   Table of Contents
28   DESCRIPTION
29   FUNCTIONAL OVERVIEW
30   Datatypes
31   FUNCTIONS
32
33DESCRIPTION
34
35   Fontconfig is a library designed to provide system-wide font
36   configuration, customization and application access.
37     __________________________________________________________
38
39FUNCTIONAL OVERVIEW
40
41   Fontconfig contains two essential modules, the configuration
42   module which builds an internal configuration from XML files
43   and the matching module which accepts font patterns and returns
44   the nearest matching font.
45     __________________________________________________________
46
47FONT CONFIGURATION
48
49   The configuration module consists of the FcConfig datatype,
50   libexpat and FcConfigParse which walks over an XML tree and
51   amends a configuration with data found within. From an external
52   perspective, configuration of the library consists of
53   generating a valid XML tree and feeding that to FcConfigParse.
54   The only other mechanism provided to applications for changing
55   the running configuration is to add fonts and directories to
56   the list of application-provided font files.
57
58   The intent is to make font configurations relatively static,
59   and shared by as many applications as possible. It is hoped
60   that this will lead to more stable font selection when passing
61   names from one application to another. XML was chosen as a
62   configuration file format because it provides a format which is
63   easy for external agents to edit while retaining the correct
64   structure and syntax.
65
66   Font configuration is separate from font matching; applications
67   needing to do their own matching can access the available fonts
68   from the library and perform private matching. The intent is to
69   permit applications to pick and choose appropriate
70   functionality from the library instead of forcing them to
71   choose between this library and a private configuration
72   mechanism. The hope is that this will ensure that configuration
73   of fonts for all applications can be centralized in one place.
74   Centralizing font configuration will simplify and regularize
75   font installation and customization.
76     __________________________________________________________
77
78FONT PROPERTIES
79
80   While font patterns may contain essentially any properties,
81   there are some well known properties with associated types.
82   Fontconfig uses some of these properties for font matching and
83   font completion. Others are provided as a convenience for the
84   application's rendering mechanism.
85                 Property Definitions
86
87    Property       C Preprocessor Symbol  Type    Description
88    ----------------------------------------------------
89    family         FC_FAMILY              String  Font family names
90    familylang     FC_FAMILYLANG          String  Language corresponding
91 to
92                                                  each family name
93    style          FC_STYLE               String  Font style. Overrides
94weight
95                                                  and slant
96    stylelang      FC_STYLELANG           String  Language corresponding
97 to
98                                                  each style name
99    fullname       FC_FULLNAME            String  Font face full name wh
100ere
101                                                  different from family
102and
103                                                  family + style
104    fullnamelang   FC_FULLNAMELANG        String  Language corresponding
105 to
106                                                  each fullname
107    slant          FC_SLANT               Int     Italic, oblique or rom
108an
109    weight         FC_WEIGHT              Int     Light, medium, demibol
110d,
111                                                  bold or black
112    width          FC_WIDTH               Int     Condensed, normal or e
113xpanded
114    size           FC_SIZE                Double  Point size
115    aspect         FC_ASPECT              Double  Stretches glyphs horiz
116ontally
117                                                  before hinting
118    pixelsize      FC_PIXEL_SIZE          Double  Pixel size
119    spacing        FC_SPACING             Int     Proportional, dual-wid
120th,
121                                                  monospace or charcell
122    foundry        FC_FOUNDRY             String  Font foundry name
123    antialias      FC_ANTIALIAS           Bool    Whether glyphs can be
124                                                  antialiased
125    hintstyle      FC_HINT_STYLE          Int     Automatic hinting styl
126e
127    hinting        FC_HINTING             Bool    Whether the rasterizer
128 should
129                                                  use hinting
130    verticallayout FC_VERTICAL_LAYOUT     Bool    Use vertical layout
131    autohint       FC_AUTOHINT            Bool    Use autohinter instead
132 of
133                                                  normal hinter
134    globaladvance  FC_GLOBAL_ADVANCE      Bool    Use font global advanc
135e data (deprecated)
136    file           FC_FILE                String  The filename holding t
137he font
138                                                  relative to the config
139's sysroot
140    index          FC_INDEX               Int     The index of the font
141within
142                                                  the file
143    ftface         FC_FT_FACE             FT_Face Use the specified Free
144Type
145                                                  face object
146    rasterizer     FC_RASTERIZER          String  Which rasterizer is in
147 use (deprecated)
148    outline        FC_OUTLINE             Bool    Whether the glyphs are
149 outlines
150    scalable       FC_SCALABLE            Bool    Whether glyphs can be
151scaled
152    dpi            FC_DPI                 Double  Target dots per inch
153    rgba           FC_RGBA                Int     unknown, rgb, bgr, vrg
154b,
155                                                  vbgr, none - subpixel
156geometry
157    scale          FC_SCALE               Double  Scale factor for point
158->pixel
159                                                  conversions (deprecate
160d)
161    minspace       FC_MINSPACE            Bool    Eliminate leading from
162 line
163                                                  spacing
164    charset        FC_CHARSET             CharSet Unicode chars encoded
165by
166                                                  the font
167    lang           FC_LANG                LangSet Set of RFC-3066-style
168                                                  languages this font su
169pports
170    fontversion    FC_FONTVERSION         Int     Version number of the
171font
172    capability     FC_CAPABILITY          String  List of layout capabil
173ities in
174                                                  the font
175    fontformat     FC_FONTFORMAT          String  String name of the fon
176t format
177    embolden       FC_EMBOLDEN            Bool    Rasterizer should
178                                                  synthetically embolden
179 the font
180    embeddedbitmap FC_EMBEDDED_BITMAP     Bool    Use the embedded bitma
181p instead
182                                                  of the outline
183    decorative     FC_DECORATIVE          Bool    Whether the style is a
184 decorative
185                                                  variant
186    lcdfilter      FC_LCD_FILTER          Int     Type of LCD filter
187    namelang       FC_NAMELANG            String  Language name to be us
188ed for the
189                                                  default value of famil
190ylang,
191                                                  stylelang and fullname
192lang
193    fontfeatures   FC_FONT_FEATURES       String  List of extra feature
194tags in
195                                                  OpenType to be enabled
196    prgname        FC_PRGNAME             String  Name of the running pr
197ogram
198    hash           FC_HASH                String  SHA256 hash value of t
199he font data
200                                                  with "sha256:" prefix
201(deprecated)
202    postscriptname FC_POSTSCRIPT_NAME     String  Font name in PostScrip
203t
204    symbol         FC_SYMBOL              Bool    Whether font uses MS s
205ymbol-font encoding
206    color          FC_COLOR               Bool    Whether any glyphs hav
207e color
208    fontvariations FC_FONT_VARIATIONS     String  comma-separated string
209 of axes in variable font
210    variable       FC_VARIABLE            Bool    Whether font is Variab
211le Font
212    fonthashint    FC_FONT_HAS_HINT       Bool    Whether font has hinti
213ng
214    order          FC_ORDER               Int     Order number of the fo
215nt
216     __________________________________________________________
217
218Datatypes
219
220   Fontconfig uses abstract data types to hide internal
221   implementation details for most data structures. A few
222   structures are exposed where appropriate.
223     __________________________________________________________
224
225FcChar8, FcChar16, FcChar32, FcBool
226
227   These are primitive data types; the FcChar* types hold
228   precisely the number of bits stated (if supported by the C
229   implementation). FcBool holds one of two C preprocessor
230   symbols: FcFalse or FcTrue.
231     __________________________________________________________
232
233FcMatrix
234
235   An FcMatrix holds an affine transformation, usually used to
236   reshape glyphs. A small set of matrix operations are provided
237   to manipulate these.
238        typedef struct _FcMatrix {
239                double xx, xy, yx, yy;
240        } FcMatrix;
241     __________________________________________________________
242
243FcCharSet
244
245   An FcCharSet is an abstract type that holds the set of encoded
246   Unicode chars in a font. Operations to build and compare these
247   sets are provided.
248     __________________________________________________________
249
250FcLangSet
251
252   An FcLangSet is an abstract type that holds the set of
253   languages supported by a font. Operations to build and compare
254   these sets are provided. These are computed for a font based on
255   orthographic information built into the fontconfig library.
256   Fontconfig has orthographies for all of the ISO 639-1 languages
257   except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA.
258   If you have orthographic information for any of these
259   languages, please submit them.
260     __________________________________________________________
261
262FcLangResult
263
264   An FcLangResult is an enumeration used to return the results of
265   comparing two language strings or FcLangSet objects.
266   FcLangEqual means the objects match language and territory.
267   FcLangDifferentTerritory means the objects match in language
268   but differ in territory. FcLangDifferentLang means the objects
269   differ in language.
270     __________________________________________________________
271
272FcType
273
274   Tags the kind of data stored in an FcValue.
275     __________________________________________________________
276
277FcValue
278
279   An FcValue object holds a single value with one of a number of
280   different types. The 'type' tag indicates which member is
281   valid.
282        typedef struct _FcValue {
283                FcType type;
284                union {
285                        const FcChar8 *s;
286                        int i;
287                        FcBool b;
288                        double d;
289                        const FcMatrix *m;
290                        const FcCharSet *c;
291                        void *f;
292                        const FcLangSet *l;
293                        const FcRange   *r;
294                } u;
295        } FcValue;
296
297                  FcValue Members
298
299        Type            Union member    Datatype
300        --------------------------------
301        FcTypeVoid      (none)          (none)
302        FcTypeInteger   i               int
303        FcTypeDouble    d               double
304        FcTypeString    s               FcChar8 *
305        FcTypeBool      b               b
306        FcTypeMatrix    m               FcMatrix *
307        FcTypeCharSet   c               FcCharSet *
308        FcTypeFTFace    f               void * (FT_Face)
309        FcTypeLangSet   l               FcLangSet *
310        FcTypeRange     r               FcRange *
311     __________________________________________________________
312
313FcPattern, FcPatternIter
314
315   An FcPattern holds a set of names with associated value lists;
316   each name refers to a property of a font. FcPatterns are used
317   as inputs to the matching code as well as holding information
318   about specific fonts. Each property can hold one or more
319   values; conventionally all of the same type, although the
320   interface doesn't demand that. An FcPatternIter is used during
321   iteration to access properties in FcPattern.
322     __________________________________________________________
323
324FcFontSet
325
326        typedef struct _FcFontSet {
327                int nfont;
328                int sfont;
329                FcPattern **fonts;
330        } FcFontSet;
331
332   An FcFontSet contains a list of FcPatterns. Internally
333   fontconfig uses this data structure to hold sets of fonts.
334   Externally, fontconfig returns the results of listing fonts in
335   this format. 'nfont' holds the number of patterns in the
336   'fonts' array; 'sfont' is used to indicate the size of that
337   array.
338     __________________________________________________________
339
340FcStrSet, FcStrList
341
342   FcStrSet holds a list of strings that can be appended to and
343   enumerated. Its unique characteristic is that the enumeration
344   works even while strings are appended during enumeration.
345   FcStrList is used during enumeration to safely and correctly
346   walk the list of strings even while that list is edited in the
347   middle of enumeration.
348     __________________________________________________________
349
350FcObjectSet
351
352        typedef struct _FcObjectSet {
353                int nobject;
354                int sobject;
355                const char **objects;
356        } FcObjectSet;
357
358   holds a set of names and is used to specify which fields from
359   fonts are placed in the the list of returned patterns when
360   listing fonts.
361     __________________________________________________________
362
363FcObjectType
364
365        typedef struct _FcObjectType {
366                const char *object;
367                FcType type;
368        } FcObjectType;
369
370   marks the type of a pattern element generated when parsing font
371   names. Applications can add new object types so that font names
372   may contain the new elements.
373     __________________________________________________________
374
375FcConstant
376
377        typedef struct _FcConstant {
378            const FcChar8 *name;
379            const char *object;
380            int value;
381        } FcConstant;
382
383   Provides for symbolic constants for new pattern elements. When
384   'name' is seen in a font name, an 'object' element is created
385   with value 'value'.
386     __________________________________________________________
387
388FcBlanks
389
390   holds a list of Unicode chars which are expected to be blank;
391   unexpectedly blank chars are assumed to be invalid and are
392   elided from the charset associated with the font.
393
394   FcBlanks is deprecated and should not be used in newly written
395   code. It is still accepted by some functions for compatibility
396   with older code but will be removed in the future.
397     __________________________________________________________
398
399FcFileCache
400
401   holds the per-user cache information for use while loading the
402   font database. This is built automatically for the current
403   configuration when that is loaded. Applications must always
404   pass '0' when one is requested.
405     __________________________________________________________
406
407FcConfig
408
409   holds a complete configuration of the library; there is one
410   default configuration, other can be constructed from XML data
411   structures. All public entry points that need global data can
412   take an optional FcConfig* argument; passing 0 uses the default
413   configuration. FcConfig objects hold two sets of fonts, the
414   first contains those specified by the configuration, the second
415   set holds those added by the application at run-time.
416   Interfaces that need to reference a particular set use one of
417   the FcSetName enumerated values.
418     __________________________________________________________
419
420FcSetName
421
422   Specifies one of the two sets of fonts available in a
423   configuration; FcSetSystem for those fonts specified in the
424   configuration and FcSetApplication which holds fonts provided
425   by the application.
426     __________________________________________________________
427
428FcResult
429
430   Used as a return type for functions manipulating FcPattern
431   objects.
432      FcResult Values
433        Result Code             Meaning
434        -----------------------------------------------------------
435        FcResultMatch           Object exists with the specified ID
436        FcResultNoMatch         Object doesn't exist at all
437        FcResultTypeMismatch    Object exists, but the type doesn't matc
438h
439        FcResultNoId            Object exists, but has fewer values
440                                than specified
441        FcResultOutOfMemory     malloc failed
442     __________________________________________________________
443
444FcAtomic
445
446   Used for locking access to configuration files. Provides a safe
447   way to update configuration files.
448     __________________________________________________________
449
450FcCache
451
452   Holds information about the fonts contained in a single
453   directory. Normal applications need not worry about this as
454   caches for font access are automatically managed by the
455   library. Applications dealing with cache management may want to
456   use some of these objects in their work, however the included
457   'fc-cache' program generally suffices for all of that.
458     __________________________________________________________
459
460FUNCTIONS
461
462   These are grouped by functionality, often using the main data
463   type being manipulated.
464     __________________________________________________________
465
466Initialization
467
468   Table of Contents
469   FcInitLoadConfig -- load configuration
470   FcInitLoadConfigAndFonts -- load configuration and font data
471   FcInit -- initialize fontconfig library
472   FcFini -- finalize fontconfig library
473   FcGetVersion -- library version number
474   FcInitReinitialize -- re-initialize library
475   FcInitBringUptoDate -- reload configuration files if needed
476
477   These functions provide some control over how the library is
478   initialized.
479
480FcInitLoadConfig
481
482Name
483
484   FcInitLoadConfig -- load configuration
485
486Synopsis
487
488#include <fontconfig/fontconfig.h>
489
490   FcConfig * FcInitLoadConfig(void);
491
492Description
493
494   Loads the default configuration file and returns the resulting
495   configuration. Does not load any font information.
496
497FcInitLoadConfigAndFonts
498
499Name
500
501   FcInitLoadConfigAndFonts -- load configuration and font data
502
503Synopsis
504
505#include <fontconfig/fontconfig.h>
506
507   FcConfig * FcInitLoadConfigAndFonts(void);
508
509Description
510
511   Loads the default configuration file and builds information
512   about the available fonts. Returns the resulting configuration.
513
514FcInit
515
516Name
517
518   FcInit -- initialize fontconfig library
519
520Synopsis
521
522#include <fontconfig/fontconfig.h>
523
524   FcBool FcInit(void);
525
526Description
527
528   Loads the default configuration file and the fonts referenced
529   therein and sets the default configuration to that result.
530   Returns whether this process succeeded or not. If the default
531   configuration has already been loaded, this routine does
532   nothing and returns FcTrue.
533
534FcFini
535
536Name
537
538   FcFini -- finalize fontconfig library
539
540Synopsis
541
542#include <fontconfig/fontconfig.h>
543
544   void FcFini(void);
545
546Description
547
548   Frees all data structures allocated by previous calls to
549   fontconfig functions. Fontconfig returns to an uninitialized
550   state, requiring a new call to one of the FcInit functions
551   before any other fontconfig function may be called.
552
553FcGetVersion
554
555Name
556
557   FcGetVersion -- library version number
558
559Synopsis
560
561#include <fontconfig/fontconfig.h>
562
563   int FcGetVersion(void);
564
565Description
566
567   Returns the version number of the library.
568
569FcInitReinitialize
570
571Name
572
573   FcInitReinitialize -- re-initialize library
574
575Synopsis
576
577#include <fontconfig/fontconfig.h>
578
579   FcBool FcInitReinitialize(void);
580
581Description
582
583   Forces the default configuration file to be reloaded and resets
584   the default configuration. Returns FcFalse if the configuration
585   cannot be reloaded (due to configuration file errors,
586   allocation failures or other issues) and leaves the existing
587   configuration unchanged. Otherwise returns FcTrue.
588
589FcInitBringUptoDate
590
591Name
592
593   FcInitBringUptoDate -- reload configuration files if needed
594
595Synopsis
596
597#include <fontconfig/fontconfig.h>
598
599   FcBool FcInitBringUptoDate(void);
600
601Description
602
603   Checks the rescan interval in the default configuration,
604   checking the configuration if the interval has passed and
605   reloading the configuration if when any changes are detected.
606   Returns FcFalse if the configuration cannot be reloaded (see
607   FcInitReinitialize). Otherwise returns FcTrue.
608     __________________________________________________________
609
610FcPattern
611
612   Table of Contents
613   FcPatternCreate -- Create a pattern
614   FcPatternDuplicate -- Copy a pattern
615   FcPatternReference -- Increment pattern reference count
616   FcPatternDestroy -- Destroy a pattern
617   FcPatternObjectCount -- Returns the number of the object
618   FcPatternEqual -- Compare patterns
619   FcPatternEqualSubset -- Compare portions of patterns
620   FcPatternFilter -- Filter the objects of pattern
621   FcPatternHash -- Compute a pattern hash value
622   FcPatternAdd -- Add a value to a pattern
623   FcPatternAddWeak -- Add a value to a pattern with weak binding
624   FcPatternAdd-Type -- Add a typed value to a pattern
625   FcPatternGetWithBinding -- Return a value with binding from a
626          pattern
627
628   FcPatternGet -- Return a value from a pattern
629   FcPatternGet-Type -- Return a typed value from a pattern
630   FcPatternBuild -- Create patterns from arguments
631   FcPatternDel -- Delete a property from a pattern
632   FcPatternRemove -- Remove one object of the specified type from
633          the pattern
634
635   FcPatternIterStart -- Initialize the iterator with the first
636          iterator in the pattern
637
638   FcPatternIterNext --
639   FcPatternIterEqual -- Compare iterators
640   FcPatternFindIter -- Set the iterator to point to the object in
641          the pattern
642
643   FcPatternIterIsValid -- Check whether the iterator is valid or
644          not
645
646   FcPatternIterGetObject -- Returns an object name which the
647          iterator point to
648
649   FcPatternIterValueCount -- Returns the number of the values
650          which the iterator point to
651
652   FcPatternIterGetValue -- Returns a value which the iterator
653          point to
654
655   FcPatternPrint -- Print a pattern for debugging
656   FcDefaultSubstitute -- Perform default substitutions in a
657          pattern
658
659   FcNameParse -- Parse a pattern string
660   FcNameUnparse -- Convert a pattern back into a string that can
661          be parsed
662
663   FcPatternFormat -- Format a pattern into a string according to
664          a format specifier
665
666   An FcPattern is an opaque type that holds both patterns to
667   match against the available fonts, as well as the information
668   about each font.
669
670FcPatternCreate
671
672Name
673
674   FcPatternCreate -- Create a pattern
675
676Synopsis
677
678#include <fontconfig/fontconfig.h>
679
680   FcPattern * FcPatternCreate(void);
681
682Description
683
684   Creates a pattern with no properties; used to build patterns
685   from scratch.
686
687FcPatternDuplicate
688
689Name
690
691   FcPatternDuplicate -- Copy a pattern
692
693Synopsis
694
695#include <fontconfig/fontconfig.h>
696
697   FcPattern * FcPatternDuplicate(const FcPattern *p);
698
699Description
700
701   Copy a pattern, returning a new pattern that matches p. Each
702   pattern may be modified without affecting the other.
703
704FcPatternReference
705
706Name
707
708   FcPatternReference -- Increment pattern reference count
709
710Synopsis
711
712#include <fontconfig/fontconfig.h>
713
714   void FcPatternReference(FcPattern *p);
715
716Description
717
718   Add another reference to p. Patterns are freed only when the
719   reference count reaches zero.
720
721FcPatternDestroy
722
723Name
724
725   FcPatternDestroy -- Destroy a pattern
726
727Synopsis
728
729#include <fontconfig/fontconfig.h>
730
731   void FcPatternDestroy(FcPattern *p);
732
733Description
734
735   Decrement the pattern reference count. If all references are
736   gone, destroys the pattern, in the process destroying all
737   related values.
738
739FcPatternObjectCount
740
741Name
742
743   FcPatternObjectCount -- Returns the number of the object
744
745Synopsis
746
747#include <fontconfig/fontconfig.h>
748
749   int FcPatternObjectCount(const FcPattern *p);
750
751Description
752
753   Returns the number of the object p has.
754
755Since
756
757   version 2.13.1
758
759FcPatternEqual
760
761Name
762
763   FcPatternEqual -- Compare patterns
764
765Synopsis
766
767#include <fontconfig/fontconfig.h>
768
769   FcBool FcPatternEqual(const FcPattern *pa, const FcPattern
770   *pb);
771
772Description
773
774   Returns whether pa and pb are exactly alike.
775
776FcPatternEqualSubset
777
778Name
779
780   FcPatternEqualSubset -- Compare portions of patterns
781
782Synopsis
783
784#include <fontconfig/fontconfig.h>
785
786   FcBool FcPatternEqualSubset(const FcPattern *pa, const
787   FcPattern *pb, const FcObjectSet *os);
788
789Description
790
791   Returns whether pa and pb have exactly the same values for all
792   of the objects in os.
793
794FcPatternFilter
795
796Name
797
798   FcPatternFilter -- Filter the objects of pattern
799
800Synopsis
801
802#include <fontconfig/fontconfig.h>
803
804   FcPattern * FcPatternFilter(FcPattern *p, const FcObjectSet
805   *os);
806
807Description
808
809   Returns a new pattern that only has those objects from p that
810   are in os. If os is NULL, a duplicate of p is returned.
811
812FcPatternHash
813
814Name
815
816   FcPatternHash -- Compute a pattern hash value
817
818Synopsis
819
820#include <fontconfig/fontconfig.h>
821
822   FcChar32 FcPatternHash(const FcPattern *p);
823
824Description
825
826   Returns a 32-bit number which is the same for any two patterns
827   which are equal.
828
829FcPatternAdd
830
831Name
832
833   FcPatternAdd -- Add a value to a pattern
834
835Synopsis
836
837#include <fontconfig/fontconfig.h>
838
839   FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue
840   value, FcBool append);
841
842Description
843
844   Adds a single value to the list of values associated with the
845   property named `object. If `append is FcTrue, the value is
846   added at the end of any existing list, otherwise it is inserted
847   at the beginning. `value' is saved (with FcValueSave) when
848   inserted into the pattern so that the library retains no
849   reference to any application-supplied data structure.
850
851FcPatternAddWeak
852
853Name
854
855   FcPatternAddWeak -- Add a value to a pattern with weak binding
856
857Synopsis
858
859#include <fontconfig/fontconfig.h>
860
861   FcBool FcPatternAddWeak(FcPattern *p, const char *object,
862   FcValue value, FcBool append);
863
864Description
865
866   FcPatternAddWeak is essentially the same as FcPatternAdd except
867   that any values added to the list have binding weak instead of
868   strong.
869
870FcPatternAdd-Type
871
872Name
873
874   FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString,
875   FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool,
876   FcPatternAddFTFace, FcPatternAddLangSet,
877   FcPatternAddRange -- Add a typed value to a pattern
878
879Synopsis
880
881#include <fontconfig/fontconfig.h>
882
883   FcBool FcPatternAddInteger(FcPattern *p, const char *object,
884   int i);
885
886   FcBool FcPatternAddDouble(FcPattern *p, const char *object,
887   double d);
888
889   FcBool FcPatternAddString(FcPattern *p, const char *object,
890   const FcChar8 *s);
891
892   FcBool FcPatternAddMatrix(FcPattern *p, const char *object,
893   const FcMatrix *m);
894
895   FcBool FcPatternAddCharSet(FcPattern *p, const char *object,
896   const FcCharSet *c);
897
898   FcBool FcPatternAddBool(FcPattern *p, const char *object,
899   FcBool b);
900
901   FcBool FcPatternAddFTFace(FcPattern *p, const char *object,
902   const FT_Facef);
903
904   FcBool FcPatternAddLangSet(FcPattern *p, const char *object,
905   const FcLangSet *l);
906
907   FcBool FcPatternAddRange(FcPattern *p, const char *object,
908   const FcRange *r);
909
910Description
911
912   These are all convenience functions that insert objects of the
913   specified type into the pattern. Use these in preference to
914   FcPatternAdd as they will provide compile-time typechecking.
915   These all append values to any existing list of values.
916   FcPatternAddRange are available since 2.11.91.
917
918FcPatternGetWithBinding
919
920Name
921
922   FcPatternGetWithBinding -- Return a value with binding from a
923   pattern
924
925Synopsis
926
927#include <fontconfig/fontconfig.h>
928
929   FcResult FcPatternGetWithBinding(FcPattern *p, const char
930   *object, int id, FcValue *v, FcValueBinding *b);
931
932Description
933
934   Returns in v the id'th value and b binding for that associated
935   with the property object. The Value returned is not a copy, but
936   rather refers to the data stored within the pattern directly.
937   Applications must not free this value.
938
939Since
940
941   version 2.12.5
942
943FcPatternGet
944
945Name
946
947   FcPatternGet -- Return a value from a pattern
948
949Synopsis
950
951#include <fontconfig/fontconfig.h>
952
953   FcResult FcPatternGet(FcPattern *p, const char *object, int id,
954   FcValue *v);
955
956Description
957
958   Returns in v the id'th value associated with the property
959   object. The value returned is not a copy, but rather refers to
960   the data stored within the pattern directly. Applications must
961   not free this value.
962
963FcPatternGet-Type
964
965Name
966
967   FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString,
968   FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool,
969   FcPatternGetFTFace, FcPatternGetLangSet,
970   FcPatternGetRange -- Return a typed value from a pattern
971
972Synopsis
973
974#include <fontconfig/fontconfig.h>
975
976   FcResult FcPatternGetInteger(FcPattern *p, const char *object,
977   int n, int *i);
978
979   FcResult FcPatternGetDouble(FcPattern *p, const char *object,
980   int n, double *d);
981
982   FcResult FcPatternGetString(FcPattern *p, const char *object,
983   int n, FcChar8 **s);
984
985   FcResult FcPatternGetMatrix(FcPattern *p, const char *object,
986   int n, FcMatrix **s);
987
988   FcResult FcPatternGetCharSet(FcPattern *p, const char *object,
989   int n, FcCharSet **c);
990
991   FcResult FcPatternGetBool(FcPattern *p, const char *object, int
992   n, FcBool *b);
993
994   FcResult FcPatternGetFTFace(FcPattern *p, const char *object,
995   int n, FT_Face *f);
996
997   FcResult FcPatternGetLangSet(FcPattern *p, const char *object,
998   int n, FcLangSet **l);
999
1000   FcResult FcPatternGetRange(FcPattern *p, const char *object,
1001   int n, FcRange **r);
1002
1003Description
1004
1005   These are convenience functions that call FcPatternGet and
1006   verify that the returned data is of the expected type. They
1007   return FcResultTypeMismatch if this is not the case. Note that
1008   these (like FcPatternGet) do not make a copy of any data
1009   structure referenced by the return value. Use these in
1010   preference to FcPatternGet to provide compile-time
1011   typechecking. FcPatternGetRange are available since 2.11.91.
1012
1013FcPatternBuild
1014
1015Name
1016
1017   FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create
1018   patterns from arguments
1019
1020Synopsis
1021
1022#include <fontconfig/fontconfig.h>
1023
1024   FcPattern * FcPatternBuild(FcPattern *pattern, ...);
1025
1026   FcPattern * FcPatternVaBuild(FcPattern *pattern, va_list va);
1027
1028   void FcPatternVapBuild(FcPattern *result, FcPattern *pattern,
1029   va_list va);
1030
1031Description
1032
1033   Builds a pattern using a list of objects, types and values.
1034   Each value to be entered in the pattern is specified with three
1035   arguments:
1036
1037    1. Object name, a string describing the property to be added.
1038    2. Object type, one of the FcType enumerated values
1039    3. Value, not an FcValue, but the raw type as passed to any of
1040       the FcPatternAdd<type> functions. Must match the type of
1041       the second argument.
1042
1043   The argument list is terminated by a null object name, no
1044   object type nor value need be passed for this. The values are
1045   added to `pattern', if `pattern' is null, a new pattern is
1046   created. In either case, the pattern is returned. Example
1047pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *)
10480);
1049
1050   FcPatternVaBuild is used when the arguments are already in the
1051   form of a varargs value. FcPatternVapBuild is a macro version
1052   of FcPatternVaBuild which returns its result directly in the
1053   result variable.
1054
1055FcPatternDel
1056
1057Name
1058
1059   FcPatternDel -- Delete a property from a pattern
1060
1061Synopsis
1062
1063#include <fontconfig/fontconfig.h>
1064
1065   FcBool FcPatternDel(FcPattern *p, const char *object);
1066
1067Description
1068
1069   Deletes all values associated with the property `object',
1070   returning whether the property existed or not.
1071
1072FcPatternRemove
1073
1074Name
1075
1076   FcPatternRemove -- Remove one object of the specified type from
1077   the pattern
1078
1079Synopsis
1080
1081#include <fontconfig/fontconfig.h>
1082
1083   FcBool FcPatternRemove(FcPattern *p, const char *object, int
1084   id);
1085
1086Description
1087
1088   Removes the value associated with the property `object' at
1089   position `id', returning whether the property existed and had a
1090   value at that position or not.
1091
1092FcPatternIterStart
1093
1094Name
1095
1096   FcPatternIterStart -- Initialize the iterator with the first
1097   iterator in the pattern
1098
1099Synopsis
1100
1101#include <fontconfig/fontconfig.h>
1102
1103   void FcPatternIterStart(const FcPattern *p, FcPatternIter
1104   *iter);
1105
1106Description
1107
1108   Initialize iter with the first iterator in p. If there are no
1109   objects in p, iter will not have any valid data.
1110
1111Since
1112
1113   version 2.13.1
1114
1115FcPatternIterNext
1116
1117Name
1118
1119   FcPatternIterNext --
1120
1121Synopsis
1122
1123#include <fontconfig/fontconfig.h>
1124
1125   FcBool FcPatternIterNext(const FcPattern *p, FcPatternIter
1126   *iter);
1127
1128Description
1129
1130   Set iter to point to the next object in p and returns FcTrue if
1131   iter has been changed to the next object. returns FcFalse
1132   otherwise.
1133
1134Since
1135
1136   version 2.13.1
1137
1138FcPatternIterEqual
1139
1140Name
1141
1142   FcPatternIterEqual -- Compare iterators
1143
1144Synopsis
1145
1146#include <fontconfig/fontconfig.h>
1147
1148   FcBool FcPatternIterEqual(const FcPattern *p1, FcPatternIter
1149   *i1, const FcPattern *p2, FcPatternIter *i2);
1150
1151Description
1152
1153   Return FcTrue if both i1 and i2 point to same object and
1154   contains same values. return FcFalse otherwise.
1155
1156Since
1157
1158   version 2.13.1
1159
1160FcPatternFindIter
1161
1162Name
1163
1164   FcPatternFindIter -- Set the iterator to point to the object in
1165   the pattern
1166
1167Synopsis
1168
1169#include <fontconfig/fontconfig.h>
1170
1171   FcBool FcPatternFindIter(const FcPattern *p, FcPatternIter
1172   *iter, const char *object);
1173
1174Description
1175
1176   Set iter to point to object in p if any and returns FcTrue.
1177   returns FcFalse otherwise.
1178
1179Since
1180
1181   version 2.13.1
1182
1183FcPatternIterIsValid
1184
1185Name
1186
1187   FcPatternIterIsValid -- Check whether the iterator is valid or
1188   not
1189
1190Synopsis
1191
1192#include <fontconfig/fontconfig.h>
1193
1194   FcBool FcPatternIterIsValid(const FcPattern *p, FcPatternIter
1195   :iter);
1196
1197Description
1198
1199   Returns FcTrue if iter point to the valid entry in p. returns
1200   FcFalse otherwise.
1201
1202Since
1203
1204   version 2.13.1
1205
1206FcPatternIterGetObject
1207
1208Name
1209
1210   FcPatternIterGetObject -- Returns an object name which the
1211   iterator point to
1212
1213Synopsis
1214
1215#include <fontconfig/fontconfig.h>
1216
1217   const char * FcPatternIterGetObject(const FcPattern *p,
1218   FcPatternIter *iter);
1219
1220Description
1221
1222   Returns an object name in p which iter point to. returns NULL
1223   if iter isn't valid.
1224
1225Since
1226
1227   version 2.13.1
1228
1229FcPatternIterValueCount
1230
1231Name
1232
1233   FcPatternIterValueCount -- Returns the number of the values
1234   which the iterator point to
1235
1236Synopsis
1237
1238#include <fontconfig/fontconfig.h>
1239
1240   int FcPatternIterValueCount(const FcPattern *p, FcPatternIter
1241   *iter);
1242
1243Description
1244
1245   Returns the number of the values in the object which iter point
1246   to. if iter isn't valid, returns 0.
1247
1248Since
1249
1250   version 2.13.1
1251
1252FcPatternIterGetValue
1253
1254Name
1255
1256   FcPatternIterGetValue -- Returns a value which the iterator
1257   point to
1258
1259Synopsis
1260
1261#include <fontconfig/fontconfig.h>
1262
1263   FcResult FcPatternIterGetValue(const FcPattern *p,
1264   FcPatternIter *iter, intid, FcValue *v, FcValueBinding *b);
1265
1266Description
1267
1268   Returns in v the id'th value which iter point to. also binding
1269   to b if given. The value returned is not a copy, but rather
1270   refers to the data stored within the pattern directly.
1271   Applications must not free this value.
1272
1273Since
1274
1275   version 2.13.1
1276
1277FcPatternPrint
1278
1279Name
1280
1281   FcPatternPrint -- Print a pattern for debugging
1282
1283Synopsis
1284
1285#include <fontconfig/fontconfig.h>
1286
1287   void FcPatternPrint(const FcPattern *p);
1288
1289Description
1290
1291   Prints an easily readable version of the pattern to stdout.
1292   There is no provision for reparsing data in this format, it's
1293   just for diagnostics and debugging.
1294
1295FcDefaultSubstitute
1296
1297Name
1298
1299   FcDefaultSubstitute -- Perform default substitutions in a
1300   pattern
1301
1302Synopsis
1303
1304#include <fontconfig/fontconfig.h>
1305
1306   void FcDefaultSubstitute(FcPattern *pattern);
1307
1308Description
1309
1310   Supplies default values for underspecified font patterns:
1311
1312     * Patterns without a specified style or weight are set to
1313       Medium
1314     * Patterns without a specified style or slant are set to
1315       Roman
1316     * Patterns without a specified pixel size are given one
1317       computed from any specified point size (default 12), dpi
1318       (default 75) and scale (default 1).
1319
1320FcNameParse
1321
1322Name
1323
1324   FcNameParse -- Parse a pattern string
1325
1326Synopsis
1327
1328#include <fontconfig/fontconfig.h>
1329
1330   FcPattern * FcNameParse(const FcChar8 *name);
1331
1332Description
1333
1334   Converts name from the standard text format described above
1335   into a pattern.
1336
1337FcNameUnparse
1338
1339Name
1340
1341   FcNameUnparse -- Convert a pattern back into a string that can
1342   be parsed
1343
1344Synopsis
1345
1346#include <fontconfig/fontconfig.h>
1347
1348   FcChar8 * FcNameUnparse(FcPattern *pat);
1349
1350Description
1351
1352   Converts the given pattern into the standard text format
1353   described above. The return value is not static, but instead
1354   refers to newly allocated memory which should be freed by the
1355   caller using free().
1356
1357FcPatternFormat
1358
1359Name
1360
1361   FcPatternFormat -- Format a pattern into a string according to
1362   a format specifier
1363
1364Synopsis
1365
1366#include <fontconfig/fontconfig.h>
1367
1368   FcChar8 * FcPatternFormat(FcPattern *pat, const FcChar8
1369   *format);
1370
1371Description
1372
1373   Converts given pattern pat into text described by the format
1374   specifier format. The return value refers to newly allocated
1375   memory which should be freed by the caller using free(), or
1376   NULL if format is invalid.
1377
1378   The format is loosely modeled after printf-style format string.
1379   The format string is composed of zero or more directives:
1380   ordinary characters (not "%"), which are copied unchanged to
1381   the output stream; and tags which are interpreted to construct
1382   text from the pattern in a variety of ways (explained below).
1383   Special characters can be escaped using backslash. C-string
1384   style special characters like \n and \r are also supported
1385   (this is useful when the format string is not a C string
1386   literal). It is advisable to always escape curly braces that
1387   are meant to be copied to the output as ordinary characters.
1388
1389   Each tag is introduced by the character "%", followed by an
1390   optional minimum field width, followed by tag contents in curly
1391   braces ({}). If the minimum field width value is provided the
1392   tag will be expanded and the result padded to achieve the
1393   minimum width. If the minimum field width is positive, the
1394   padding will right-align the text. Negative field width will
1395   left-align. The rest of this section describes various
1396   supported tag contents and their expansion.
1397
1398   A simple tag is one where the content is an identifier. When
1399   simple tags are expanded, the named identifier will be looked
1400   up in pattern and the resulting list of values returned, joined
1401   together using comma. For example, to print the family name and
1402   style of the pattern, use the format "%{family} %{style}\n". To
1403   extend the family column to forty characters use
1404   "%-40{family}%{style}\n".
1405
1406   Simple tags expand to list of all values for an element. To
1407   only choose one of the values, one can index using the syntax
1408   "%{elt[idx]}". For example, to get the first family name only,
1409   use "%{family[0]}".
1410
1411   If a simple tag ends with "=" and the element is found in the
1412   pattern, the name of the element followed by "=" will be output
1413   before the list of values. For example, "%{weight=}" may expand
1414   to the string "weight=80". Or to the empty string if pattern
1415   does not have weight set.
1416
1417   If a simple tag starts with ":" and the element is found in the
1418   pattern, ":" will be printed first. For example, combining this
1419   with the =, the format "%{:weight=}" may expand to ":weight=80"
1420   or to the empty string if pattern does not have weight set.
1421
1422   If a simple tag contains the string ":-", the rest of the the
1423   tag contents will be used as a default string. The default
1424   string is output if the element is not found in the pattern.
1425   For example, the format "%{:weight=:-123}" may expand to
1426   ":weight=80" or to the string ":weight=123" if pattern does not
1427   have weight set.
1428
1429   A count tag is one that starts with the character "#" followed
1430   by an element name, and expands to the number of values for the
1431   element in the pattern. For example, "%{#family}" expands to
1432   the number of family names pattern has set, which may be zero.
1433
1434   A sub-expression tag is one that expands a sub-expression. The
1435   tag contents are the sub-expression to expand placed inside
1436   another set of curly braces. Sub-expression tags are useful for
1437   aligning an entire sub-expression, or to apply converters
1438   (explained later) to the entire sub-expression output. For
1439   example, the format "%40{{%{family} %{style}}}" expands the
1440   sub-expression to construct the family name followed by the
1441   style, then takes the entire string and pads it on the left to
1442   be at least forty characters.
1443
1444   A filter-out tag is one starting with the character "-"
1445   followed by a comma-separated list of element names, followed
1446   by a sub-expression enclosed in curly braces. The
1447   sub-expression will be expanded but with a pattern that has the
1448   listed elements removed from it. For example, the format
1449   "%{-size,pixelsize{sub-expr}}" will expand "sub-expr" with
1450   pattern sans the size and pixelsize elements.
1451
1452   A filter-in tag is one starting with the character "+" followed
1453   by a comma-separated list of element names, followed by a
1454   sub-expression enclosed in curly braces. The sub-expression
1455   will be expanded but with a pattern that only has the listed
1456   elements from the surrounding pattern. For example, the format
1457   "%{+family,familylang{sub-expr}}" will expand "sub-expr" with a
1458   sub-pattern consisting only the family and family lang elements
1459   of pattern.
1460
1461   A conditional tag is one starting with the character "?"
1462   followed by a comma-separated list of element conditions,
1463   followed by two sub-expression enclosed in curly braces. An
1464   element condition can be an element name, in which case it
1465   tests whether the element is defined in pattern, or the
1466   character "!" followed by an element name, in which case the
1467   test is negated. The conditional passes if all the element
1468   conditions pass. The tag expands the first sub-expression if
1469   the conditional passes, and expands the second sub-expression
1470   otherwise. For example, the format
1471   "%{?size,dpi,!pixelsize{pass}{fail}}" will expand to "pass" if
1472   pattern has size and dpi elements but no pixelsize element, and
1473   to "fail" otherwise.
1474
1475   An enumerate tag is one starting with the string "[]" followed
1476   by a comma-separated list of element names, followed by a
1477   sub-expression enclosed in curly braces. The list of values for
1478   the named elements are walked in parallel and the
1479   sub-expression expanded each time with a pattern just having a
1480   single value for those elements, starting from the first value
1481   and continuing as long as any of those elements has a value.
1482   For example, the format "%{[]family,familylang{%{family}
1483   (%{familylang})\n}}" will expand the pattern "%{family}
1484   (%{familylang})\n" with a pattern having only the first value
1485   of the family and familylang elements, then expands it with the
1486   second values, then the third, etc.
1487
1488   As a special case, if an enumerate tag has only one element,
1489   and that element has only one value in the pattern, and that
1490   value is of type FcLangSet, the individual languages in the
1491   language set are enumerated.
1492
1493   A builtin tag is one starting with the character "=" followed
1494   by a builtin name. The following builtins are defined:
1495
1496   unparse
1497          Expands to the result of calling FcNameUnparse() on the
1498          pattern.
1499
1500   fcmatch
1501          Expands to the output of the default output format of
1502          the fc-match command on the pattern, without the final
1503          newline.
1504
1505   fclist
1506          Expands to the output of the default output format of
1507          the fc-list command on the pattern, without the final
1508          newline.
1509
1510   fccat
1511          Expands to the output of the default output format of
1512          the fc-cat command on the pattern, without the final
1513          newline.
1514
1515   pkgkit
1516          Expands to the list of PackageKit font() tags for the
1517          pattern. Currently this includes tags for each family
1518          name, and each language from the pattern, enumerated and
1519          sanitized into a set of tags terminated by newline.
1520          Package management systems can use these tags to tag
1521          their packages accordingly.
1522
1523   For example, the format "%{+family,style{%{=unparse}}}\n" will
1524   expand to an unparsed name containing only the family and style
1525   element values from pattern.
1526
1527   The contents of any tag can be followed by a set of zero or
1528   more converters. A converter is specified by the character "|"
1529   followed by the converter name and arguments. The following
1530   converters are defined:
1531
1532   basename
1533          Replaces text with the results of calling
1534          FcStrBasename() on it.
1535
1536   dirname
1537          Replaces text with the results of calling FcStrDirname()
1538          on it.
1539
1540   downcase
1541          Replaces text with the results of calling
1542          FcStrDowncase() on it.
1543
1544   shescape
1545          Escapes text for one level of shell expansion. (Escapes
1546          single-quotes, also encloses text in single-quotes.)
1547
1548   cescape
1549          Escapes text such that it can be used as part of a C
1550          string literal. (Escapes backslash and double-quotes.)
1551
1552   xmlescape
1553          Escapes text such that it can be used in XML and HTML.
1554          (Escapes less-than, greater-than, and ampersand.)
1555
1556   delete(chars)
1557          Deletes all occurrences of each of the characters in
1558          chars from the text. FIXME: This converter is not UTF-8
1559          aware yet.
1560
1561   escape(chars)
1562          Escapes all occurrences of each of the characters in
1563          chars by prepending it by the first character in chars.
1564          FIXME: This converter is not UTF-8 aware yet.
1565
1566   translate(from,to)
1567          Translates all occurrences of each of the characters in
1568          from by replacing them with their corresponding
1569          character in to. If to has fewer characters than from,
1570          it will be extended by repeating its last character.
1571          FIXME: This converter is not UTF-8 aware yet.
1572
1573   For example, the format "%{family|downcase|delete( )}\n" will
1574   expand to the values of the family element in pattern,
1575   lower-cased and with spaces removed.
1576
1577Since
1578
1579   version 2.9.0
1580     __________________________________________________________
1581
1582FcFontSet
1583
1584   Table of Contents
1585   FcFontSetCreate -- Create a font set
1586   FcFontSetDestroy -- Destroy a font set
1587   FcFontSetAdd -- Add to a font set
1588   FcFontSetList -- List fonts from a set of font sets
1589   FcFontSetMatch -- Return the best font from a set of font sets
1590   FcFontSetPrint -- Print a set of patterns to stdout
1591   FcFontSetSort -- Add to a font set
1592   FcFontSetSortDestroy -- DEPRECATED destroy a font set
1593
1594   An FcFontSet simply holds a list of patterns; these are used to
1595   return the results of listing available fonts.
1596
1597FcFontSetCreate
1598
1599Name
1600
1601   FcFontSetCreate -- Create a font set
1602
1603Synopsis
1604
1605#include <fontconfig/fontconfig.h>
1606
1607   FcFontSet * FcFontSetCreate(void);
1608
1609Description
1610
1611   Creates an empty font set.
1612
1613FcFontSetDestroy
1614
1615Name
1616
1617   FcFontSetDestroy -- Destroy a font set
1618
1619Synopsis
1620
1621#include <fontconfig/fontconfig.h>
1622
1623   void FcFontSetDestroy(FcFontSet *s);
1624
1625Description
1626
1627   Destroys a font set. Note that this destroys any referenced
1628   patterns as well.
1629
1630FcFontSetAdd
1631
1632Name
1633
1634   FcFontSetAdd -- Add to a font set
1635
1636Synopsis
1637
1638#include <fontconfig/fontconfig.h>
1639
1640   FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font);
1641
1642Description
1643
1644   Adds a pattern to a font set. Note that the pattern is not
1645   copied before being inserted into the set. Returns FcFalse if
1646   the pattern cannot be inserted into the set (due to allocation
1647   failure). Otherwise returns FcTrue.
1648
1649FcFontSetList
1650
1651Name
1652
1653   FcFontSetList -- List fonts from a set of font sets
1654
1655Synopsis
1656
1657#include <fontconfig/fontconfig.h>
1658
1659   FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets,
1660   intnsets, FcPattern *pattern, FcObjectSet *object_set);
1661
1662Description
1663
1664   Selects fonts matching pattern from sets, creates patterns from
1665   those fonts containing only the objects in object_set and
1666   returns the set of unique such patterns. If config is NULL, the
1667   default configuration is checked to be up to date, and used.
1668
1669FcFontSetMatch
1670
1671Name
1672
1673   FcFontSetMatch -- Return the best font from a set of font sets
1674
1675Synopsis
1676
1677#include <fontconfig/fontconfig.h>
1678
1679   FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets,
1680   intnsets, FcPattern *pattern, FcResult *result);
1681
1682Description
1683
1684   Finds the font in sets most closely matching pattern and
1685   returns the result of FcFontRenderPrepare for that font and the
1686   provided pattern. This function should be called only after
1687   FcConfigSubstitute and FcDefaultSubstitute have been called for
1688   pattern; otherwise the results will not be correct. If config
1689   is NULL, the current configuration is used. Returns NULL if an
1690   error occurs during this process.
1691
1692FcFontSetPrint
1693
1694Name
1695
1696   FcFontSetPrint -- Print a set of patterns to stdout
1697
1698Synopsis
1699
1700#include <fontconfig/fontconfig.h>
1701
1702   void FcFontSetPrint(FcFontSet *set);
1703
1704Description
1705
1706   This function is useful for diagnosing font related issues,
1707   printing the complete contents of every pattern in set. The
1708   format of the output is designed to be of help to users and
1709   developers, and may change at any time.
1710
1711FcFontSetSort
1712
1713Name
1714
1715   FcFontSetSort -- Add to a font set
1716
1717Synopsis
1718
1719#include <fontconfig/fontconfig.h>
1720
1721   FcFontSet * FcFontSetSort(FcConfig *config, FcFontSet **sets,
1722   intnsets, FcPattern *pattern, FcBool trim, FcCharSet **csp,
1723   FcResult *result);
1724
1725Description
1726
1727   Returns the list of fonts from sets sorted by closeness to
1728   pattern. If trim is FcTrue, elements in the list which don't
1729   include Unicode coverage not provided by earlier elements in
1730   the list are elided. The union of Unicode coverage of all of
1731   the fonts is returned in csp, if csp is not NULL. This function
1732   should be called only after FcConfigSubstitute and
1733   FcDefaultSubstitute have been called for p; otherwise the
1734   results will not be correct.
1735
1736   The returned FcFontSet references FcPattern structures which
1737   may be shared by the return value from multiple FcFontSort
1738   calls, applications cannot modify these patterns. Instead, they
1739   should be passed, along with pattern to FcFontRenderPrepare
1740   which combines them into a complete pattern.
1741
1742   The FcFontSet returned by FcFontSetSort is destroyed by calling
1743   FcFontSetDestroy.
1744
1745FcFontSetSortDestroy
1746
1747Name
1748
1749   FcFontSetSortDestroy -- DEPRECATED destroy a font set
1750
1751Synopsis
1752
1753#include <fontconfig/fontconfig.h>
1754
1755   void FcFontSetSortDestroy(FcFontSet *set);
1756
1757Description
1758
1759   This function is DEPRECATED. FcFontSetSortDestroy destroys set
1760   by calling FcFontSetDestroy. Applications should use
1761   FcFontSetDestroy directly instead.
1762     __________________________________________________________
1763
1764FcObjectSet
1765
1766   Table of Contents
1767   FcObjectSetCreate -- Create an object set
1768   FcObjectSetAdd -- Add to an object set
1769   FcObjectSetDestroy -- Destroy an object set
1770   FcObjectSetBuild -- Build object set from args
1771
1772   An FcObjectSet holds a list of pattern property names; it is
1773   used to indicate which properties are to be returned in the
1774   patterns from FcFontList.
1775
1776FcObjectSetCreate
1777
1778Name
1779
1780   FcObjectSetCreate -- Create an object set
1781
1782Synopsis
1783
1784#include <fontconfig/fontconfig.h>
1785
1786   FcObjectSet * FcObjectSetCreate(void);
1787
1788Description
1789
1790   Creates an empty set.
1791
1792FcObjectSetAdd
1793
1794Name
1795
1796   FcObjectSetAdd -- Add to an object set
1797
1798Synopsis
1799
1800#include <fontconfig/fontconfig.h>
1801
1802   FcBool FcObjectSetAdd(FcObjectSet *os, const char *object);
1803
1804Description
1805
1806   Adds a property name to the set. Returns FcFalse if the
1807   property name cannot be inserted into the set (due to
1808   allocation failure). Otherwise returns FcTrue.
1809
1810FcObjectSetDestroy
1811
1812Name
1813
1814   FcObjectSetDestroy -- Destroy an object set
1815
1816Synopsis
1817
1818#include <fontconfig/fontconfig.h>
1819
1820   void FcObjectSetDestroy(FcObjectSet *os);
1821
1822Description
1823
1824   Destroys an object set.
1825
1826FcObjectSetBuild
1827
1828Name
1829
1830   FcObjectSetBuild, FcObjectSetVaBuild,
1831   FcObjectSetVapBuild -- Build object set from args
1832
1833Synopsis
1834
1835#include <fontconfig/fontconfig.h>
1836
1837   FcObjectSet * FcObjectSetBuild(const char *first, ...);
1838
1839   FcObjectSet * FcObjectSetVaBuild(const char *first, va_list
1840   va);
1841
1842   void FcObjectSetVapBuild(FcObjectSet *result, const char
1843   *first, va_list va);
1844
1845Description
1846
1847   These build an object set from a null-terminated list of
1848   property names. FcObjectSetVapBuild is a macro version of
1849   FcObjectSetVaBuild which returns the result in the result
1850   variable directly.
1851     __________________________________________________________
1852
1853FreeType specific functions
1854
1855   Table of Contents
1856   FcFreeTypeCharIndex -- map Unicode to glyph id
1857   FcFreeTypeCharSet -- compute Unicode coverage
1858   FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and
1859          spacing type
1860
1861   FcFreeTypeQuery -- compute pattern from font file (and index)
1862   FcFreeTypeQueryAll -- compute all patterns from font file (and
1863          index)
1864
1865   FcFreeTypeQueryFace -- compute pattern from FT_Face
1866
1867   While the fontconfig library doesn't insist that FreeType be
1868   used as the rasterization mechanism for fonts, it does provide
1869   some convenience functions.
1870
1871FcFreeTypeCharIndex
1872
1873Name
1874
1875   FcFreeTypeCharIndex -- map Unicode to glyph id
1876
1877Synopsis
1878
1879#include <fontconfig.h>
1880#include <fcfreetype.h>
1881
1882   FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4);
1883
1884Description
1885
1886   Maps a Unicode char to a glyph index. This function uses
1887   information from several possible underlying encoding tables to
1888   work around broken fonts. As a result, this function isn't
1889   designed to be used in performance sensitive areas; results
1890   from this function are intended to be cached by higher level
1891   functions.
1892
1893FcFreeTypeCharSet
1894
1895Name
1896
1897   FcFreeTypeCharSet -- compute Unicode coverage
1898
1899Synopsis
1900
1901#include <fontconfig.h>
1902#include <fcfreetype.h>
1903
1904   FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks);
1905
1906Description
1907
1908   Scans a FreeType face and returns the set of encoded Unicode
1909   chars. FcBlanks is deprecated, blanks is ignored and accepted
1910   only for compatibility with older code.
1911
1912FcFreeTypeCharSetAndSpacing
1913
1914Name
1915
1916   FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and
1917   spacing type
1918
1919Synopsis
1920
1921#include <fontconfig.h>
1922#include <fcfreetype.h>
1923
1924   FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks
1925   *blanks, int *spacing);
1926
1927Description
1928
1929   Scans a FreeType face and returns the set of encoded Unicode
1930   chars. FcBlanks is deprecated, blanks is ignored and accepted
1931   only for compatibility with older code. spacing receives the
1932   computed spacing type of the font, one of FC_MONO for a font
1933   where all glyphs have the same width, FC_DUAL, where the font
1934   has glyphs in precisely two widths, one twice as wide as the
1935   other, or FC_PROPORTIONAL where the font has glyphs of many
1936   widths.
1937
1938FcFreeTypeQuery
1939
1940Name
1941
1942   FcFreeTypeQuery -- compute pattern from font file (and index)
1943
1944Synopsis
1945
1946#include <fontconfig.h>
1947#include <fcfreetype.h>
1948
1949   FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id,
1950   FcBlanks *blanks, int *count);
1951
1952Description
1953
1954   Constructs a pattern representing the 'id'th face in 'file'.
1955   The number of faces in 'file' is returned in 'count'. FcBlanks
1956   is deprecated, blanks is ignored and accepted only for
1957   compatibility with older code.
1958
1959FcFreeTypeQueryAll
1960
1961Name
1962
1963   FcFreeTypeQueryAll -- compute all patterns from font file (and
1964   index)
1965
1966Synopsis
1967
1968#include <fontconfig.h>
1969#include <fcfreetype.h>
1970
1971   unsigned int FcFreeTypeQueryAll(const FcChar8 *file, int id,
1972   FcBlanks *blanks, int *count, FcFontSet *set);
1973
1974Description
1975
1976   Constructs patterns found in 'file'. If id is -1, then all
1977   patterns found in 'file' are added to 'set'. Otherwise, this
1978   function works exactly like FcFreeTypeQuery(). The number of
1979   faces in 'file' is returned in 'count'. The number of patterns
1980   added to 'set' is returned. FcBlanks is deprecated, blanks is
1981   ignored and accepted only for compatibility with older code.
1982
1983Since
1984
1985   version 2.12.91
1986
1987FcFreeTypeQueryFace
1988
1989Name
1990
1991   FcFreeTypeQueryFace -- compute pattern from FT_Face
1992
1993Synopsis
1994
1995#include <fontconfig.h>
1996#include <fcfreetype.h>
1997
1998   FcPattern * FcFreeTypeQueryFace(const FT_Face face, const
1999   FcChar8 *file, int id, FcBlanks *blanks);
2000
2001Description
2002
2003   Constructs a pattern representing 'face'. 'file' and 'id' are
2004   used solely as data for pattern elements (FC_FILE, FC_INDEX and
2005   sometimes FC_FAMILY). FcBlanks is deprecated, blanks is ignored
2006   and accepted only for compatibility with older code.
2007     __________________________________________________________
2008
2009FcValue
2010
2011   Table of Contents
2012   FcValueDestroy -- Free a value
2013   FcValueSave -- Copy a value
2014   FcValuePrint -- Print a value to stdout
2015   FcValueEqual -- Test two values for equality
2016
2017   FcValue is a structure containing a type tag and a union of all
2018   possible datatypes. The tag is an enum of type FcType and is
2019   intended to provide a measure of run-time typechecking,
2020   although that depends on careful programming.
2021
2022FcValueDestroy
2023
2024Name
2025
2026   FcValueDestroy -- Free a value
2027
2028Synopsis
2029
2030#include <fontconfig/fontconfig.h>
2031
2032   void FcValueDestroy(FcValue v);
2033
2034Description
2035
2036   Frees any memory referenced by v. Values of type FcTypeString,
2037   FcTypeMatrix and FcTypeCharSet reference memory, the other
2038   types do not.
2039
2040FcValueSave
2041
2042Name
2043
2044   FcValueSave -- Copy a value
2045
2046Synopsis
2047
2048#include <fontconfig/fontconfig.h>
2049
2050   FcValue FcValueSave(FcValue v);
2051
2052Description
2053
2054   Returns a copy of v duplicating any object referenced by it so
2055   that v may be safely destroyed without harming the new value.
2056
2057FcValuePrint
2058
2059Name
2060
2061   FcValuePrint -- Print a value to stdout
2062
2063Synopsis
2064
2065#include <fontconfig/fontconfig.h>
2066
2067   void FcValuePrint(FcValue v);
2068
2069Description
2070
2071   Prints a human-readable representation of v to stdout. The
2072   format should not be considered part of the library
2073   specification as it may change in the future.
2074
2075FcValueEqual
2076
2077Name
2078
2079   FcValueEqual -- Test two values for equality
2080
2081Synopsis
2082
2083#include <fontconfig/fontconfig.h>
2084
2085   FcBool FcValueEqual(FcValue v_a, FcValue v_b);
2086
2087Description
2088
2089   Compares two values. Integers and Doubles are compared as
2090   numbers; otherwise the two values have to be the same type to
2091   be considered equal. Strings are compared ignoring case.
2092     __________________________________________________________
2093
2094FcCharSet
2095
2096   Table of Contents
2097   FcCharSetCreate -- Create an empty character set
2098   FcCharSetDestroy -- Destroy a character set
2099   FcCharSetAddChar -- Add a character to a charset
2100   FcCharSetDelChar -- Add a character to a charset
2101   FcCharSetCopy -- Copy a charset
2102   FcCharSetEqual -- Compare two charsets
2103   FcCharSetIntersect -- Intersect charsets
2104   FcCharSetUnion -- Add charsets
2105   FcCharSetSubtract -- Subtract charsets
2106   FcCharSetMerge -- Merge charsets
2107   FcCharSetHasChar -- Check a charset for a char
2108   FcCharSetCount -- Count entries in a charset
2109   FcCharSetIntersectCount -- Intersect and count charsets
2110   FcCharSetSubtractCount -- Subtract and count charsets
2111   FcCharSetIsSubset -- Test for charset inclusion
2112   FcCharSetFirstPage -- Start enumerating charset contents
2113   FcCharSetNextPage -- Continue enumerating charset contents
2114   FcCharSetCoverage -- DEPRECATED return coverage for a Unicode
2115          page
2116
2117   FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
2118
2119   An FcCharSet is a boolean array indicating a set of Unicode
2120   chars. Those associated with a font are marked constant and
2121   cannot be edited. FcCharSets may be reference counted
2122   internally to reduce memory consumption; this may be visible to
2123   applications as the result of FcCharSetCopy may return it's
2124   argument, and that CharSet may remain unmodifiable.
2125
2126FcCharSetCreate
2127
2128Name
2129
2130   FcCharSetCreate -- Create an empty character set
2131
2132Synopsis
2133
2134#include <fontconfig/fontconfig.h>
2135
2136   FcCharSet * FcCharSetCreate(void);
2137
2138Description
2139
2140   FcCharSetCreate allocates and initializes a new empty character
2141   set object.
2142
2143FcCharSetDestroy
2144
2145Name
2146
2147   FcCharSetDestroy -- Destroy a character set
2148
2149Synopsis
2150
2151#include <fontconfig/fontconfig.h>
2152
2153   void FcCharSetDestroy(FcCharSet *fcs);
2154
2155Description
2156
2157   FcCharSetDestroy decrements the reference count fcs. If the
2158   reference count becomes zero, all memory referenced is freed.
2159
2160FcCharSetAddChar
2161
2162Name
2163
2164   FcCharSetAddChar -- Add a character to a charset
2165
2166Synopsis
2167
2168#include <fontconfig/fontconfig.h>
2169
2170   FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4);
2171
2172Description
2173
2174   FcCharSetAddChar adds a single Unicode char to the set,
2175   returning FcFalse on failure, either as a result of a constant
2176   set or from running out of memory.
2177
2178FcCharSetDelChar
2179
2180Name
2181
2182   FcCharSetDelChar -- Add a character to a charset
2183
2184Synopsis
2185
2186#include <fontconfig/fontconfig.h>
2187
2188   FcBool FcCharSetDelChar(FcCharSet *fcs, FcChar32 ucs4);
2189
2190Description
2191
2192   FcCharSetDelChar deletes a single Unicode char from the set,
2193   returning FcFalse on failure, either as a result of a constant
2194   set or from running out of memory.
2195
2196Since
2197
2198   version 2.9.0
2199
2200FcCharSetCopy
2201
2202Name
2203
2204   FcCharSetCopy -- Copy a charset
2205
2206Synopsis
2207
2208#include <fontconfig/fontconfig.h>
2209
2210   FcCharSet * FcCharSetCopy(FcCharSet *src);
2211
2212Description
2213
2214   Makes a copy of src; note that this may not actually do
2215   anything more than increment the reference count on src.
2216
2217FcCharSetEqual
2218
2219Name
2220
2221   FcCharSetEqual -- Compare two charsets
2222
2223Synopsis
2224
2225#include <fontconfig/fontconfig.h>
2226
2227   FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b);
2228
2229Description
2230
2231   Returns whether a and b contain the same set of Unicode chars.
2232
2233FcCharSetIntersect
2234
2235Name
2236
2237   FcCharSetIntersect -- Intersect charsets
2238
2239Synopsis
2240
2241#include <fontconfig/fontconfig.h>
2242
2243   FcCharSet * FcCharSetIntersect(const FcCharSet *a, const
2244   FcCharSet *b);
2245
2246Description
2247
2248   Returns a set including only those chars found in both a and b.
2249
2250FcCharSetUnion
2251
2252Name
2253
2254   FcCharSetUnion -- Add charsets
2255
2256Synopsis
2257
2258#include <fontconfig/fontconfig.h>
2259
2260   FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet
2261   *b);
2262
2263Description
2264
2265   Returns a set including only those chars found in either a or
2266   b.
2267
2268FcCharSetSubtract
2269
2270Name
2271
2272   FcCharSetSubtract -- Subtract charsets
2273
2274Synopsis
2275
2276#include <fontconfig/fontconfig.h>
2277
2278   FcCharSet * FcCharSetSubtract(const FcCharSet *a, const
2279   FcCharSet *b);
2280
2281Description
2282
2283   Returns a set including only those chars found in a but not b.
2284
2285FcCharSetMerge
2286
2287Name
2288
2289   FcCharSetMerge -- Merge charsets
2290
2291Synopsis
2292
2293#include <fontconfig/fontconfig.h>
2294
2295   FcBool FcCharSetMerge(FcCharSet *a, const FcCharSet *b, FcBool
2296   *changed);
2297
2298Description
2299
2300   Adds all chars in b to a. In other words, this is an in-place
2301   version of FcCharSetUnion. If changed is not NULL, then it
2302   returns whether any new chars from b were added to a. Returns
2303   FcFalse on failure, either when a is a constant set or from
2304   running out of memory.
2305
2306FcCharSetHasChar
2307
2308Name
2309
2310   FcCharSetHasChar -- Check a charset for a char
2311
2312Synopsis
2313
2314#include <fontconfig/fontconfig.h>
2315
2316   FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4);
2317
2318Description
2319
2320   Returns whether fcs contains the char ucs4.
2321
2322FcCharSetCount
2323
2324Name
2325
2326   FcCharSetCount -- Count entries in a charset
2327
2328Synopsis
2329
2330#include <fontconfig/fontconfig.h>
2331
2332   FcChar32 FcCharSetCount(const FcCharSet *a);
2333
2334Description
2335
2336   Returns the total number of Unicode chars in a.
2337
2338FcCharSetIntersectCount
2339
2340Name
2341
2342   FcCharSetIntersectCount -- Intersect and count charsets
2343
2344Synopsis
2345
2346#include <fontconfig/fontconfig.h>
2347
2348   FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const
2349   FcCharSet *b);
2350
2351Description
2352
2353   Returns the number of chars that are in both a and b.
2354
2355FcCharSetSubtractCount
2356
2357Name
2358
2359   FcCharSetSubtractCount -- Subtract and count charsets
2360
2361Synopsis
2362
2363#include <fontconfig/fontconfig.h>
2364
2365   FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const
2366   FcCharSet *b);
2367
2368Description
2369
2370   Returns the number of chars that are in a but not in b.
2371
2372FcCharSetIsSubset
2373
2374Name
2375
2376   FcCharSetIsSubset -- Test for charset inclusion
2377
2378Synopsis
2379
2380#include <fontconfig/fontconfig.h>
2381
2382   FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet
2383   *b);
2384
2385Description
2386
2387   Returns whether a is a subset of b.
2388
2389FcCharSetFirstPage
2390
2391Name
2392
2393   FcCharSetFirstPage -- Start enumerating charset contents
2394
2395Synopsis
2396
2397#include <fontconfig/fontconfig.h>
2398
2399   FcChar32 FcCharSetFirstPage(const FcCharSet *a,
2400   FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);
2401
2402Description
2403
2404   Builds an array of bits in map marking the first page of
2405   Unicode coverage of a. *next is set to contains the base code
2406   point for the next page in a. Returns the base code point for
2407   the page, or FC_CHARSET_DONE if a contains no pages. As an
2408   example, if FcCharSetFirstPage returns 0x300 and fills map with
24090xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff
24107fff 0xffff0003
2411
2412   Then the page contains code points 0x300 through 0x33f (the
2413   first 64 code points on the page) because map[0] and map[1]
2414   both have all their bits set. It also contains code points
2415   0x343 (0x300 + 32*2 + (4-1)) and 0x35e (0x300 + 32*2 + (31-1))
2416   because map[2] has the 4th and 31st bits set. The code points
2417   represented by map[3] and later are left as an exercise for the
2418   reader ;).
2419
2420FcCharSetNextPage
2421
2422Name
2423
2424   FcCharSetNextPage -- Continue enumerating charset contents
2425
2426Synopsis
2427
2428#include <fontconfig/fontconfig.h>
2429
2430   FcChar32 FcCharSetNextPage(const FcCharSet *a,
2431   FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);
2432
2433Description
2434
2435   Builds an array of bits in map marking the Unicode coverage of
2436   a for page containing *next (see the FcCharSetFirstPage
2437   description for details). *next is set to contains the base
2438   code point for the next page in a. Returns the base of code
2439   point for the page, or FC_CHARSET_DONE if a does not contain
2440   *next.
2441
2442FcCharSetCoverage
2443
2444Name
2445
2446   FcCharSetCoverage -- DEPRECATED return coverage for a Unicode
2447   page
2448
2449Synopsis
2450
2451#include <fontconfig/fontconfig.h>
2452
2453   FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page,
2454   FcChar32[8]result);
2455
2456Description
2457
2458   DEPRECATED This function returns a bitmask in result which
2459   indicates which code points in page are included in a.
2460   FcCharSetCoverage returns the next page in the charset which
2461   has any coverage.
2462
2463FcCharSetNew
2464
2465Name
2466
2467   FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
2468
2469Synopsis
2470
2471#include <fontconfig/fontconfig.h>
2472
2473   FcCharSet * FcCharSetNew(void);
2474
2475Description
2476
2477   FcCharSetNew is a DEPRECATED alias for FcCharSetCreate.
2478     __________________________________________________________
2479
2480FcLangSet
2481
2482   Table of Contents
2483   FcLangSetCreate -- create a langset object
2484   FcLangSetDestroy -- destroy a langset object
2485   FcLangSetCopy -- copy a langset object
2486   FcLangSetAdd -- add a language to a langset
2487   FcLangSetDel -- delete a language from a langset
2488   FcLangSetUnion -- Add langsets
2489   FcLangSetSubtract -- Subtract langsets
2490   FcLangSetCompare -- compare language sets
2491   FcLangSetContains -- check langset subset relation
2492   FcLangSetEqual -- test for matching langsets
2493   FcLangSetHash -- return a hash value for a langset
2494   FcLangSetHasLang -- test langset for language support
2495   FcGetDefaultLangs -- Get the default languages list
2496   FcLangSetGetLangs -- get the list of languages in the langset
2497   FcGetLangs -- Get list of languages
2498   FcLangNormalize -- Normalize the language string
2499   FcLangGetCharSet -- Get character map for a language
2500
2501   An FcLangSet is a set of language names (each of which include
2502   language and an optional territory). They are used when
2503   selecting fonts to indicate which languages the fonts need to
2504   support. Each font is marked, using language orthography
2505   information built into fontconfig, with the set of supported
2506   languages.
2507
2508FcLangSetCreate
2509
2510Name
2511
2512   FcLangSetCreate -- create a langset object
2513
2514Synopsis
2515
2516#include <fontconfig/fontconfig.h>
2517
2518   FcLangSet * FcLangSetCreate(void);
2519
2520Description
2521
2522   FcLangSetCreate creates a new FcLangSet object.
2523
2524FcLangSetDestroy
2525
2526Name
2527
2528   FcLangSetDestroy -- destroy a langset object
2529
2530Synopsis
2531
2532#include <fontconfig/fontconfig.h>
2533
2534   void FcLangSetDestroy(FcLangSet *ls);
2535
2536Description
2537
2538   FcLangSetDestroy destroys a FcLangSet object, freeing all
2539   memory associated with it.
2540
2541FcLangSetCopy
2542
2543Name
2544
2545   FcLangSetCopy -- copy a langset object
2546
2547Synopsis
2548
2549#include <fontconfig/fontconfig.h>
2550
2551   FcLangSet * FcLangSetCopy(const FcLangSet *ls);
2552
2553Description
2554
2555   FcLangSetCopy creates a new FcLangSet object and populates it
2556   with the contents of ls.
2557
2558FcLangSetAdd
2559
2560Name
2561
2562   FcLangSetAdd -- add a language to a langset
2563
2564Synopsis
2565
2566#include <fontconfig/fontconfig.h>
2567
2568   FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang);
2569
2570Description
2571
2572   lang is added to ls. lang should be of the form Ll-Tt where Ll
2573   is a two or three letter language from ISO 639 and Tt is a
2574   territory from ISO 3166.
2575
2576FcLangSetDel
2577
2578Name
2579
2580   FcLangSetDel -- delete a language from a langset
2581
2582Synopsis
2583
2584#include <fontconfig/fontconfig.h>
2585
2586   FcBool FcLangSetDel(FcLangSet *ls, const FcChar8 *lang);
2587
2588Description
2589
2590   lang is removed from ls. lang should be of the form Ll-Tt where
2591   Ll is a two or three letter language from ISO 639 and Tt is a
2592   territory from ISO 3166.
2593
2594Since
2595
2596   version 2.9.0
2597
2598FcLangSetUnion
2599
2600Name
2601
2602   FcLangSetUnion -- Add langsets
2603
2604Synopsis
2605
2606#include <fontconfig/fontconfig.h>
2607
2608   FcLangSet * FcLangSetUnion(const FcLangSet *ls_a, const
2609   FcLangSet *ls_b);
2610
2611Description
2612
2613   Returns a set including only those languages found in either
2614   ls_a or ls_b.
2615
2616Since
2617
2618   version 2.9.0
2619
2620FcLangSetSubtract
2621
2622Name
2623
2624   FcLangSetSubtract -- Subtract langsets
2625
2626Synopsis
2627
2628#include <fontconfig/fontconfig.h>
2629
2630   FcLangSet * FcLangSetSubtract(const FcLangSet *ls_a, const
2631   FcLangSet *ls_b);
2632
2633Description
2634
2635   Returns a set including only those languages found in ls_a but
2636   not in ls_b.
2637
2638Since
2639
2640   version 2.9.0
2641
2642FcLangSetCompare
2643
2644Name
2645
2646   FcLangSetCompare -- compare language sets
2647
2648Synopsis
2649
2650#include <fontconfig/fontconfig.h>
2651
2652   FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const
2653   FcLangSet *ls_b);
2654
2655Description
2656
2657   FcLangSetCompare compares language coverage for ls_a and ls_b.
2658   If they share any language and territory pair, this function
2659   returns FcLangEqual. If they share a language but differ in
2660   which territory that language is for, this function returns
2661   FcLangDifferentTerritory. If they share no languages in common,
2662   this function returns FcLangDifferentLang.
2663
2664FcLangSetContains
2665
2666Name
2667
2668   FcLangSetContains -- check langset subset relation
2669
2670Synopsis
2671
2672#include <fontconfig/fontconfig.h>
2673
2674   FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet
2675   *ls_b);
2676
2677Description
2678
2679   FcLangSetContains returns FcTrue if ls_a contains every
2680   language in ls_b. ls_a will 'contain' a language from ls_b if
2681   ls_a has exactly the language, or either the language or ls_a
2682   has no territory.
2683
2684FcLangSetEqual
2685
2686Name
2687
2688   FcLangSetEqual -- test for matching langsets
2689
2690Synopsis
2691
2692#include <fontconfig/fontconfig.h>
2693
2694   FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet
2695   *ls_b);
2696
2697Description
2698
2699   Returns FcTrue if and only if ls_a supports precisely the same
2700   language and territory combinations as ls_b.
2701
2702FcLangSetHash
2703
2704Name
2705
2706   FcLangSetHash -- return a hash value for a langset
2707
2708Synopsis
2709
2710#include <fontconfig/fontconfig.h>
2711
2712   FcChar32 FcLangSetHash(const FcLangSet *ls);
2713
2714Description
2715
2716   This function returns a value which depends solely on the
2717   languages supported by ls. Any language which equals ls will
2718   have the same result from FcLangSetHash. However, two langsets
2719   with the same hash value may not be equal.
2720
2721FcLangSetHasLang
2722
2723Name
2724
2725   FcLangSetHasLang -- test langset for language support
2726
2727Synopsis
2728
2729#include <fontconfig/fontconfig.h>
2730
2731   FcLangResult FcLangSetHasLang(const FcLangSet *ls, const
2732   FcChar8 *lang);
2733
2734Description
2735
2736   FcLangSetHasLang checks whether ls supports lang. If ls has a
2737   matching language and territory pair, this function returns
2738   FcLangEqual. If ls has a matching language but differs in which
2739   territory that language is for, this function returns
2740   FcLangDifferentTerritory. If ls has no matching language, this
2741   function returns FcLangDifferentLang.
2742
2743FcGetDefaultLangs
2744
2745Name
2746
2747   FcGetDefaultLangs -- Get the default languages list
2748
2749Synopsis
2750
2751#include <fontconfig/fontconfig.h>
2752
2753   FcStrSet * FcGetDefaultLangs(void);
2754
2755Description
2756
2757   Returns a string set of the default languages according to the
2758   environment variables on the system. This function looks for
2759   them in order of FC_LANG, LC_ALL, LC_CTYPE and LANG then. If
2760   there are no valid values in those environment variables, "en"
2761   will be set as fallback.
2762
2763Since
2764
2765   version 2.9.91
2766
2767FcLangSetGetLangs
2768
2769Name
2770
2771   FcLangSetGetLangs -- get the list of languages in the langset
2772
2773Synopsis
2774
2775#include <fontconfig/fontconfig.h>
2776
2777   FcStrSet * FcLangSetGetLangs(const FcLangSet *ls);
2778
2779Description
2780
2781   Returns a string set of all languages in langset.
2782
2783FcGetLangs
2784
2785Name
2786
2787   FcGetLangs -- Get list of languages
2788
2789Synopsis
2790
2791#include <fontconfig/fontconfig.h>
2792
2793   FcStrSet * FcGetLangs(void);
2794
2795Description
2796
2797   Returns a string set of all known languages.
2798
2799FcLangNormalize
2800
2801Name
2802
2803   FcLangNormalize -- Normalize the language string
2804
2805Synopsis
2806
2807#include <fontconfig/fontconfig.h>
2808
2809   FcChar8 * FcLangNormalize(const FcChar8 *lang);
2810
2811Description
2812
2813   Returns a string to make lang suitable on fontconfig.
2814
2815Since
2816
2817   version 2.10.91
2818
2819FcLangGetCharSet
2820
2821Name
2822
2823   FcLangGetCharSet -- Get character map for a language
2824
2825Synopsis
2826
2827#include <fontconfig/fontconfig.h>
2828
2829   const FcCharSet * FcLangGetCharSet(const FcChar8 *lang);
2830
2831Description
2832
2833   Returns the FcCharMap for a language.
2834     __________________________________________________________
2835
2836FcMatrix
2837
2838   Table of Contents
2839   FcMatrixInit -- initialize an FcMatrix structure
2840   FcMatrixCopy -- Copy a matrix
2841   FcMatrixEqual -- Compare two matrices
2842   FcMatrixMultiply -- Multiply matrices
2843   FcMatrixRotate -- Rotate a matrix
2844   FcMatrixScale -- Scale a matrix
2845   FcMatrixShear -- Shear a matrix
2846
2847   FcMatrix structures hold an affine transformation in matrix
2848   form.
2849
2850FcMatrixInit
2851
2852Name
2853
2854   FcMatrixInit -- initialize an FcMatrix structure
2855
2856Synopsis
2857
2858#include <fontconfig/fontconfig.h>
2859
2860   void FcMatrixInit(FcMatrix *matrix);
2861
2862Description
2863
2864   FcMatrixInit initializes matrix to the identity matrix.
2865
2866FcMatrixCopy
2867
2868Name
2869
2870   FcMatrixCopy -- Copy a matrix
2871
2872Synopsis
2873
2874#include <fontconfig/fontconfig.h>
2875
2876   void FcMatrixCopy(const FcMatrix *matrix);
2877
2878Description
2879
2880   FcMatrixCopy allocates a new FcMatrix and copies mat into it.
2881
2882FcMatrixEqual
2883
2884Name
2885
2886   FcMatrixEqual -- Compare two matrices
2887
2888Synopsis
2889
2890#include <fontconfig/fontconfig.h>
2891
2892   void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix
2893   *matrix2);
2894
2895Description
2896
2897   FcMatrixEqual compares matrix1 and matrix2 returning FcTrue
2898   when they are equal and FcFalse when they are not.
2899
2900FcMatrixMultiply
2901
2902Name
2903
2904   FcMatrixMultiply -- Multiply matrices
2905
2906Synopsis
2907
2908#include <fontconfig/fontconfig.h>
2909
2910   void FcMatrixMultiply(FcMatrix *result, const FcMatrix
2911   *matrix1, const FcMatrix *matrix2);
2912
2913Description
2914
2915   FcMatrixMultiply multiplies matrix1 and matrix2 storing the
2916   result in result.
2917
2918FcMatrixRotate
2919
2920Name
2921
2922   FcMatrixRotate -- Rotate a matrix
2923
2924Synopsis
2925
2926#include <fontconfig/fontconfig.h>
2927
2928   void FcMatrixRotate(FcMatrix *matrix, double cos, double sin);
2929
2930Description
2931
2932   FcMatrixRotate rotates matrix by the angle who's sine is sin
2933   and cosine is cos. This is done by multiplying by the matrix:
2934  cos -sin
2935  sin  cos
2936
2937FcMatrixScale
2938
2939Name
2940
2941   FcMatrixScale -- Scale a matrix
2942
2943Synopsis
2944
2945#include <fontconfig/fontconfig.h>
2946
2947   void FcMatrixScale(FcMatrix *matrix, double sx, double dy);
2948
2949Description
2950
2951   FcMatrixScale multiplies matrix x values by sx and y values by
2952   dy. This is done by multiplying by the matrix:
2953   sx  0
2954   0   dy
2955
2956FcMatrixShear
2957
2958Name
2959
2960   FcMatrixShear -- Shear a matrix
2961
2962Synopsis
2963
2964#include <fontconfig/fontconfig.h>
2965
2966   void FcMatrixShear(FcMatrix *matrix, double sh, double sv);
2967
2968Description
2969
2970   FcMatrixShare shears matrix horizontally by sh and vertically
2971   by sv. This is done by multiplying by the matrix:
2972  1  sh
2973  sv  1
2974     __________________________________________________________
2975
2976FcRange
2977
2978   Table of Contents
2979   FcRangeCopy -- Copy a range object
2980   FcRangeCreateDouble -- create a range object for double
2981   FcRangeCreateInteger -- create a range object for integer
2982   FcRangeDestroy -- destroy a range object
2983   FcRangeGetDouble -- Get the range in double
2984
2985   An FcRange holds two variables to indicate a range in between.
2986
2987FcRangeCopy
2988
2989Name
2990
2991   FcRangeCopy -- Copy a range object
2992
2993Synopsis
2994
2995#include <fontconfig/fontconfig.h>
2996
2997   FcRange * FcRangeCopy(const FcRange *range);
2998
2999Description
3000
3001   FcRangeCopy creates a new FcRange object and populates it with
3002   the contents of range.
3003
3004Since
3005
3006   version 2.11.91
3007
3008FcRangeCreateDouble
3009
3010Name
3011
3012   FcRangeCreateDouble -- create a range object for double
3013
3014Synopsis
3015
3016#include <fontconfig/fontconfig.h>
3017
3018   FcRange * FcRangeCreateDouble(doublebegin, doubleend);
3019
3020Description
3021
3022   FcRangeCreateDouble creates a new FcRange object with double
3023   sized value.
3024
3025Since
3026
3027   version 2.11.91
3028
3029FcRangeCreateInteger
3030
3031Name
3032
3033   FcRangeCreateInteger -- create a range object for integer
3034
3035Synopsis
3036
3037#include <fontconfig/fontconfig.h>
3038
3039   FcRange * FcRangeCreateInteger(intbegin, intend);
3040
3041Description
3042
3043   FcRangeCreateInteger creates a new FcRange object with integer
3044   sized value.
3045
3046Since
3047
3048   version 2.11.91
3049
3050FcRangeDestroy
3051
3052Name
3053
3054   FcRangeDestroy -- destroy a range object
3055
3056Synopsis
3057
3058#include <fontconfig/fontconfig.h>
3059
3060   void FcRangeDestroy(FcRange *range);
3061
3062Description
3063
3064   FcRangeDestroy destroys a FcRange object, freeing all memory
3065   associated with it.
3066
3067Since
3068
3069   version 2.11.91
3070
3071FcRangeGetDouble
3072
3073Name
3074
3075   FcRangeGetDouble -- Get the range in double
3076
3077Synopsis
3078
3079#include <fontconfig/fontconfig.h>
3080
3081   FcBool FcRangeGetDouble(const FcRange *range, double *begin,
3082   double *end);
3083
3084Description
3085
3086   Returns in begin and end as the range.
3087
3088Since
3089
3090   version 2.11.91
3091     __________________________________________________________
3092
3093FcConfig
3094
3095   Table of Contents
3096   FcConfigCreate -- Create a configuration
3097   FcConfigReference -- Increment config reference count
3098   FcConfigDestroy -- Destroy a configuration
3099   FcConfigSetCurrent -- Set configuration as default
3100   FcConfigGetCurrent -- Return current configuration
3101   FcConfigUptoDate -- Check timestamps on config files
3102   FcConfigHome -- return the current home directory.
3103   FcConfigEnableHome -- controls use of the home directory.
3104   FcConfigBuildFonts -- Build font database
3105   FcConfigGetConfigDirs -- Get config directories
3106   FcConfigGetFontDirs -- Get font directories
3107   FcConfigGetConfigFiles -- Get config files
3108   FcConfigGetCache -- DEPRECATED used to return per-user cache
3109          filename
3110
3111   FcConfigGetCacheDirs -- return the list of directories searched
3112          for cache files
3113
3114   FcConfigGetFonts -- Get config font set
3115   FcConfigGetBlanks -- Get config blanks
3116   FcConfigGetRescanInterval -- Get config rescan interval
3117   FcConfigSetRescanInterval -- Set config rescan interval
3118   FcConfigAppFontAddFile -- Add font file to font database
3119   FcConfigAppFontAddDir -- Add fonts from directory to font
3120          database
3121
3122   FcConfigAppFontClear -- Remove all app fonts from font database
3123   FcConfigSubstituteWithPat -- Execute substitutions
3124   FcConfigSubstitute -- Execute substitutions
3125   FcFontMatch -- Return best font
3126   FcFontSort -- Return list of matching fonts
3127   FcFontRenderPrepare -- Prepare pattern for loading font file
3128   FcFontList -- List fonts
3129   FcConfigFilename -- Find a config file
3130   FcConfigGetFilename -- Find a config file
3131   FcConfigParseAndLoad -- load a configuration file
3132   FcConfigParseAndLoadFromMemory -- load a configuration from
3133          memory
3134
3135   FcConfigGetSysRoot -- Obtain the system root directory
3136   FcConfigSetSysRoot -- Set the system root directory
3137   FcConfigFileInfoIterInit -- Initialize the iterator
3138   FcConfigFileInfoIterNext -- Set the iterator to point to the
3139          next list
3140
3141   FcConfigFileInfoIterGet -- Obtain the configuration file
3142          information
3143
3144   An FcConfig object holds the internal representation of a
3145   configuration. There is a default configuration which
3146   applications may use by passing 0 to any function using the
3147   data within an FcConfig.
3148
3149FcConfigCreate
3150
3151Name
3152
3153   FcConfigCreate -- Create a configuration
3154
3155Synopsis
3156
3157#include <fontconfig/fontconfig.h>
3158
3159   FcConfig * FcConfigCreate(void);
3160
3161Description
3162
3163   Creates an empty configuration.
3164
3165FcConfigReference
3166
3167Name
3168
3169   FcConfigReference -- Increment config reference count
3170
3171Synopsis
3172
3173#include <fontconfig/fontconfig.h>
3174
3175   FcConfig * FcConfigReference(FcConfig *config);
3176
3177Description
3178
3179   Add another reference to config. Configs are freed only when
3180   the reference count reaches zero. If config is NULL, the
3181   current configuration is used. In that case this function will
3182   be similar to FcConfigGetCurrent() except that it increments
3183   the reference count before returning and the user is
3184   responsible for destroying the configuration when not needed
3185   anymore.
3186
3187FcConfigDestroy
3188
3189Name
3190
3191   FcConfigDestroy -- Destroy a configuration
3192
3193Synopsis
3194
3195#include <fontconfig/fontconfig.h>
3196
3197   void FcConfigDestroy(FcConfig *config);
3198
3199Description
3200
3201   Decrements the config reference count. If all references are
3202   gone, destroys the configuration and any data associated with
3203   it. Note that calling this function with the return from
3204   FcConfigGetCurrent will cause a new configuration to be created
3205   for use as current configuration.
3206
3207FcConfigSetCurrent
3208
3209Name
3210
3211   FcConfigSetCurrent -- Set configuration as default
3212
3213Synopsis
3214
3215#include <fontconfig/fontconfig.h>
3216
3217   FcBool FcConfigSetCurrent(FcConfig *config);
3218
3219Description
3220
3221   Sets the current default configuration to config. Implicitly
3222   calls FcConfigBuildFonts if necessary, and FcConfigReference()
3223   to inrease the reference count in config since 2.12.0,
3224   returning FcFalse if that call fails.
3225
3226FcConfigGetCurrent
3227
3228Name
3229
3230   FcConfigGetCurrent -- Return current configuration
3231
3232Synopsis
3233
3234#include <fontconfig/fontconfig.h>
3235
3236   FcConfig * FcConfigGetCurrent(void);
3237
3238Description
3239
3240   Returns the current default configuration.
3241
3242FcConfigUptoDate
3243
3244Name
3245
3246   FcConfigUptoDate -- Check timestamps on config files
3247
3248Synopsis
3249
3250#include <fontconfig/fontconfig.h>
3251
3252   FcBool FcConfigUptoDate(FcConfig *config);
3253
3254Description
3255
3256   Checks all of the files related to config and returns whether
3257   any of them has been modified since the configuration was
3258   created. If config is NULL, the current configuration is used.
3259
3260FcConfigHome
3261
3262Name
3263
3264   FcConfigHome -- return the current home directory.
3265
3266Synopsis
3267
3268#include <fontconfig/fontconfig.h>
3269
3270   FcChar8 * FcConfigHome(void);
3271
3272Description
3273
3274   Return the current user's home directory, if it is available,
3275   and if using it is enabled, and NULL otherwise. See also
3276   FcConfigEnableHome).
3277
3278FcConfigEnableHome
3279
3280Name
3281
3282   FcConfigEnableHome -- controls use of the home directory.
3283
3284Synopsis
3285
3286#include <fontconfig/fontconfig.h>
3287
3288   FcBool FcConfigEnableHome(FcBool enable);
3289
3290Description
3291
3292   If enable is FcTrue, then Fontconfig will use various files
3293   which are specified relative to the user's home directory
3294   (using the ~ notation in the configuration). When enable is
3295   FcFalse, then all use of the home directory in these contexts
3296   will be disabled. The previous setting of the value is
3297   returned.
3298
3299FcConfigBuildFonts
3300
3301Name
3302
3303   FcConfigBuildFonts -- Build font database
3304
3305Synopsis
3306
3307#include <fontconfig/fontconfig.h>
3308
3309   FcBool FcConfigBuildFonts(FcConfig *config);
3310
3311Description
3312
3313   Builds the set of available fonts for the given configuration.
3314   Note that any changes to the configuration after this call have
3315   indeterminate effects. Returns FcFalse if this operation runs
3316   out of memory. If config is NULL, the current configuration is
3317   used.
3318
3319FcConfigGetConfigDirs
3320
3321Name
3322
3323   FcConfigGetConfigDirs -- Get config directories
3324
3325Synopsis
3326
3327#include <fontconfig/fontconfig.h>
3328
3329   FcStrList * FcConfigGetConfigDirs(FcConfig *config);
3330
3331Description
3332
3333   Returns the list of font directories specified in the
3334   configuration files for config. Does not include any
3335   subdirectories. If config is NULL, the current configuration is
3336   used.
3337
3338FcConfigGetFontDirs
3339
3340Name
3341
3342   FcConfigGetFontDirs -- Get font directories
3343
3344Synopsis
3345
3346#include <fontconfig/fontconfig.h>
3347
3348   FcStrList * FcConfigGetFontDirs(FcConfig *config);
3349
3350Description
3351
3352   Returns the list of font directories in config. This includes
3353   the configured font directories along with any directories
3354   below those in the filesystem. If config is NULL, the current
3355   configuration is used.
3356
3357FcConfigGetConfigFiles
3358
3359Name
3360
3361   FcConfigGetConfigFiles -- Get config files
3362
3363Synopsis
3364
3365#include <fontconfig/fontconfig.h>
3366
3367   FcStrList * FcConfigGetConfigFiles(FcConfig *config);
3368
3369Description
3370
3371   Returns the list of known configuration files used to generate
3372   config. If config is NULL, the current configuration is used.
3373
3374FcConfigGetCache
3375
3376Name
3377
3378   FcConfigGetCache -- DEPRECATED used to return per-user cache
3379   filename
3380
3381Synopsis
3382
3383#include <fontconfig/fontconfig.h>
3384
3385   FcChar8 * FcConfigGetCache(FcConfig *config);
3386
3387Description
3388
3389   With fontconfig no longer using per-user cache files, this
3390   function now simply returns NULL to indicate that no per-user
3391   file exists.
3392
3393FcConfigGetCacheDirs
3394
3395Name
3396
3397   FcConfigGetCacheDirs -- return the list of directories searched
3398   for cache files
3399
3400Synopsis
3401
3402#include <fontconfig/fontconfig.h>
3403
3404   FcStrList * FcConfigGetCacheDirs(const FcConfig *config);
3405
3406Description
3407
3408   FcConfigGetCacheDirs returns a string list containing all of
3409   the directories that fontconfig will search when attempting to
3410   load a cache file for a font directory. If config is NULL, the
3411   current configuration is used.
3412
3413FcConfigGetFonts
3414
3415Name
3416
3417   FcConfigGetFonts -- Get config font set
3418
3419Synopsis
3420
3421#include <fontconfig/fontconfig.h>
3422
3423   FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set);
3424
3425Description
3426
3427   Returns one of the two sets of fonts from the configuration as
3428   specified by set. This font set is owned by the library and
3429   must not be modified or freed. If config is NULL, the current
3430   configuration is used.
3431
3432   This function isn't MT-safe. FcConfigReference must be called
3433   before using this and then FcConfigDestroy when the return
3434   value is no longer referenced.
3435
3436FcConfigGetBlanks
3437
3438Name
3439
3440   FcConfigGetBlanks -- Get config blanks
3441
3442Synopsis
3443
3444#include <fontconfig/fontconfig.h>
3445
3446   FcBlanks * FcConfigGetBlanks(FcConfig *config);
3447
3448Description
3449
3450   FcBlanks is deprecated. This function always returns NULL.
3451
3452FcConfigGetRescanInterval
3453
3454Name
3455
3456   FcConfigGetRescanInterval -- Get config rescan interval
3457
3458Synopsis
3459
3460#include <fontconfig/fontconfig.h>
3461
3462   int FcConfigGetRescanInterval(FcConfig *config);
3463
3464Description
3465
3466   Returns the interval between automatic checks of the
3467   configuration (in seconds) specified in config. The
3468   configuration is checked during a call to FcFontList when this
3469   interval has passed since the last check. An interval setting
3470   of zero disables automatic checks. If config is NULL, the
3471   current configuration is used.
3472
3473FcConfigSetRescanInterval
3474
3475Name
3476
3477   FcConfigSetRescanInterval -- Set config rescan interval
3478
3479Synopsis
3480
3481#include <fontconfig/fontconfig.h>
3482
3483   FcBool FcConfigSetRescanInterval(FcConfig *config, int
3484   rescanInterval);
3485
3486Description
3487
3488   Sets the rescan interval. Returns FcFalse if the interval
3489   cannot be set (due to allocation failure). Otherwise returns
3490   FcTrue. An interval setting of zero disables automatic checks.
3491   If config is NULL, the current configuration is used.
3492
3493FcConfigAppFontAddFile
3494
3495Name
3496
3497   FcConfigAppFontAddFile -- Add font file to font database
3498
3499Synopsis
3500
3501#include <fontconfig/fontconfig.h>
3502
3503   FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8
3504   *file);
3505
3506Description
3507
3508   Adds an application-specific font to the configuration. Returns
3509   FcFalse if the fonts cannot be added (due to allocation failure
3510   or no fonts found). Otherwise returns FcTrue. If config is
3511   NULL, the current configuration is used.
3512
3513FcConfigAppFontAddDir
3514
3515Name
3516
3517   FcConfigAppFontAddDir -- Add fonts from directory to font
3518   database
3519
3520Synopsis
3521
3522#include <fontconfig/fontconfig.h>
3523
3524   FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8
3525   *dir);
3526
3527Description
3528
3529   Scans the specified directory for fonts, adding each one found
3530   to the application-specific set of fonts. Returns FcFalse if
3531   the fonts cannot be added (due to allocation failure).
3532   Otherwise returns FcTrue. If config is NULL, the current
3533   configuration is used.
3534
3535FcConfigAppFontClear
3536
3537Name
3538
3539   FcConfigAppFontClear -- Remove all app fonts from font database
3540
3541Synopsis
3542
3543#include <fontconfig/fontconfig.h>
3544
3545   void FcConfigAppFontClear(FcConfig *config);
3546
3547Description
3548
3549   Clears the set of application-specific fonts. If config is
3550   NULL, the current configuration is used.
3551
3552FcConfigSubstituteWithPat
3553
3554Name
3555
3556   FcConfigSubstituteWithPat -- Execute substitutions
3557
3558Synopsis
3559
3560#include <fontconfig/fontconfig.h>
3561
3562   FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern
3563   *p, FcPattern *p_pat, FcMatchKind kind);
3564
3565Description
3566
3567   Performs the sequence of pattern modification operations, if
3568   kind is FcMatchPattern, then those tagged as pattern operations
3569   are applied, else if kind is FcMatchFont, those tagged as font
3570   operations are applied and p_pat is used for <test> elements
3571   with target=pattern. Returns FcFalse if the substitution cannot
3572   be performed (due to allocation failure). Otherwise returns
3573   FcTrue. If config is NULL, the current configuration is used.
3574
3575FcConfigSubstitute
3576
3577Name
3578
3579   FcConfigSubstitute -- Execute substitutions
3580
3581Synopsis
3582
3583#include <fontconfig/fontconfig.h>
3584
3585   FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p,
3586   FcMatchKind kind);
3587
3588Description
3589
3590   Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns
3591   FcFalse if the substitution cannot be performed (due to
3592   allocation failure). Otherwise returns FcTrue. If config is
3593   NULL, the current configuration is used.
3594
3595FcFontMatch
3596
3597Name
3598
3599   FcFontMatch -- Return best font
3600
3601Synopsis
3602
3603#include <fontconfig/fontconfig.h>
3604
3605   FcPattern * FcFontMatch(FcConfig *config, FcPattern *p,
3606   FcResult *result);
3607
3608Description
3609
3610   Finds the font in sets most closely matching pattern and
3611   returns the result of FcFontRenderPrepare for that font and the
3612   provided pattern. This function should be called only after
3613   FcConfigSubstitute and FcDefaultSubstitute have been called for
3614   p; otherwise the results will not be correct. If config is
3615   NULL, the current configuration is used.
3616
3617FcFontSort
3618
3619Name
3620
3621   FcFontSort -- Return list of matching fonts
3622
3623Synopsis
3624
3625#include <fontconfig/fontconfig.h>
3626
3627   FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool
3628   trim, FcCharSet **csp, FcResult *result);
3629
3630Description
3631
3632   Returns the list of fonts sorted by closeness to p. If trim is
3633   FcTrue, elements in the list which don't include Unicode
3634   coverage not provided by earlier elements in the list are
3635   elided. The union of Unicode coverage of all of the fonts is
3636   returned in csp, if csp is not NULL. This function should be
3637   called only after FcConfigSubstitute and FcDefaultSubstitute
3638   have been called for p; otherwise the results will not be
3639   correct.
3640
3641   The returned FcFontSet references FcPattern structures which
3642   may be shared by the return value from multiple FcFontSort
3643   calls, applications must not modify these patterns. Instead,
3644   they should be passed, along with p to FcFontRenderPrepare
3645   which combines them into a complete pattern.
3646
3647   The FcFontSet returned by FcFontSort is destroyed by calling
3648   FcFontSetDestroy. If config is NULL, the current configuration
3649   is used.
3650
3651FcFontRenderPrepare
3652
3653Name
3654
3655   FcFontRenderPrepare -- Prepare pattern for loading font file
3656
3657Synopsis
3658
3659#include <fontconfig/fontconfig.h>
3660
3661   FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern
3662   *pat, FcPattern *font);
3663
3664Description
3665
3666   Creates a new pattern consisting of elements of font not
3667   appearing in pat, elements of pat not appearing in font and the
3668   best matching value from pat for elements appearing in both.
3669   The result is passed to FcConfigSubstituteWithPat with kind
3670   FcMatchFont and then returned.
3671
3672FcFontList
3673
3674Name
3675
3676   FcFontList -- List fonts
3677
3678Synopsis
3679
3680#include <fontconfig/fontconfig.h>
3681
3682   FcFontSet * FcFontList(FcConfig *config, FcPattern *p,
3683   FcObjectSet *os);
3684
3685Description
3686
3687   Selects fonts matching p, creates patterns from those fonts
3688   containing only the objects in os and returns the set of unique
3689   such patterns. If config is NULL, the default configuration is
3690   checked to be up to date, and used.
3691
3692FcConfigFilename
3693
3694Name
3695
3696   FcConfigFilename -- Find a config file
3697
3698Synopsis
3699
3700#include <fontconfig/fontconfig.h>
3701
3702   FcChar8 * FcConfigFilename(const FcChar8 *name);
3703
3704Description
3705
3706   This function is deprecated and is replaced by
3707   FcConfigGetFilename.
3708
3709FcConfigGetFilename
3710
3711Name
3712
3713   FcConfigGetFilename -- Find a config file
3714
3715Synopsis
3716
3717#include <fontconfig/fontconfig.h>
3718
3719   FcChar8 * FcConfigGetFilename(FcConfig *config, const FcChar8
3720   *name);
3721
3722Description
3723
3724   Given the specified external entity name, return the associated
3725   filename. This provides applications a way to convert various
3726   configuration file references into filename form.
3727
3728   A null or empty name indicates that the default configuration
3729   file should be used; which file this references can be
3730   overridden with the FONTCONFIG_FILE environment variable. Next,
3731   if the name starts with ~, it refers to a file in the current
3732   users home directory. Otherwise if the name doesn't start with
3733   '/', it refers to a file in the default configuration
3734   directory; the built-in default directory can be overridden
3735   with the FONTCONFIG_PATH environment variable.
3736
3737   The result of this function is affected by the
3738   FONTCONFIG_SYSROOT environment variable or equivalent
3739   functionality.
3740
3741FcConfigParseAndLoad
3742
3743Name
3744
3745   FcConfigParseAndLoad -- load a configuration file
3746
3747Synopsis
3748
3749#include <fontconfig/fontconfig.h>
3750
3751   FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8
3752   *file, FcBool complain);
3753
3754Description
3755
3756   Walks the configuration in 'file' and constructs the internal
3757   representation in 'config'. Any include files referenced from
3758   within 'file' will be loaded and parsed. If 'complain' is
3759   FcFalse, no warning will be displayed if 'file' does not exist.
3760   Error and warning messages will be output to stderr. Returns
3761   FcFalse if some error occurred while loading the file, either a
3762   parse error, semantic error or allocation failure. Otherwise
3763   returns FcTrue.
3764
3765FcConfigParseAndLoadFromMemory
3766
3767Name
3768
3769   FcConfigParseAndLoadFromMemory -- load a configuration from
3770   memory
3771
3772Synopsis
3773
3774#include <fontconfig/fontconfig.h>
3775
3776   FcBool FcConfigParseAndLoadFromMemory(FcConfig *config, const
3777   FcChar8 *buffer, FcBool complain);
3778
3779Description
3780
3781   Walks the configuration in 'memory' and constructs the internal
3782   representation in 'config'. Any includes files referenced from
3783   within 'memory' will be loaded and dparsed. If 'complain' is
3784   FcFalse, no warning will be displayed if 'file' does not exist.
3785   Error and warning messages will be output to stderr. Returns
3786   FcFalse if fsome error occurred while loading the file, either
3787   a parse error, semantic error or allocation failure. Otherwise
3788   returns FcTrue.
3789
3790Since
3791
3792   version 2.12.5
3793
3794FcConfigGetSysRoot
3795
3796Name
3797
3798   FcConfigGetSysRoot -- Obtain the system root directory
3799
3800Synopsis
3801
3802#include <fontconfig/fontconfig.h>
3803
3804   const FcChar8 * FcConfigGetSysRoot(const FcConfig *config);
3805
3806Description
3807
3808   Obtains the system root directory in 'config' if available. All
3809   files (including file properties in patterns) obtained from
3810   this 'config' are relative to this system root directory.
3811
3812   This function isn't MT-safe. FcConfigReference must be called
3813   before using this and then FcConfigDestroy when the return
3814   value is no longer referenced.
3815
3816Since
3817
3818   version 2.10.92
3819
3820FcConfigSetSysRoot
3821
3822Name
3823
3824   FcConfigSetSysRoot -- Set the system root directory
3825
3826Synopsis
3827
3828#include <fontconfig/fontconfig.h>
3829
3830   void FcConfigSetSysRoot(FcConfig *config, const FcChar8
3831   *sysroot);
3832
3833Description
3834
3835   Set 'sysroot' as the system root directory. All file paths used
3836   or created with this 'config' (including file properties in
3837   patterns) will be considered or made relative to this
3838   'sysroot'. This allows a host to generate caches for targets at
3839   build time. This also allows a cache to be re-targeted to a
3840   different base directory if 'FcConfigGetSysRoot' is used to
3841   resolve file paths. When setting this on the current config
3842   this causes changing current config (calls
3843   FcConfigSetCurrent()).
3844
3845Since
3846
3847   version 2.10.92
3848
3849FcConfigFileInfoIterInit
3850
3851Name
3852
3853   FcConfigFileInfoIterInit -- Initialize the iterator
3854
3855Synopsis
3856
3857#include <fontconfig/fontconfig.h>
3858
3859   void FcConfigFileInfoIterInit(FcConfig *config,
3860   FcConfigFileInfoIter *iter);
3861
3862Description
3863
3864   Initialize 'iter' with the first iterator in the config file
3865   information list.
3866
3867   The config file information list is stored in numerical order
3868   for filenames i.e. how fontconfig actually read them.
3869
3870   This function isn't MT-safe. FcConfigReference must be called
3871   before using this and then FcConfigDestroy when the relevant
3872   values are no longer referenced.
3873
3874Since
3875
3876   version 2.12.91
3877
3878FcConfigFileInfoIterNext
3879
3880Name
3881
3882   FcConfigFileInfoIterNext -- Set the iterator to point to the
3883   next list
3884
3885Synopsis
3886
3887#include <fontconfig/fontconfig.h>
3888
3889   FcBool FcConfigFileInfoIterNext(FcConfig *config,
3890   FcConfigFileInfoIter *iter);
3891
3892Description
3893
3894   Set 'iter' to point to the next node in the config file
3895   information list. If there is no next node, FcFalse is
3896   returned.
3897
3898   This function isn't MT-safe. FcConfigReference must be called
3899   before using FcConfigFileInfoIterInit and then FcConfigDestroy
3900   when the relevant values are no longer referenced.
3901
3902Since
3903
3904   version 2.12.91
3905
3906FcConfigFileInfoIterGet
3907
3908Name
3909
3910   FcConfigFileInfoIterGet -- Obtain the configuration file
3911   information
3912
3913Synopsis
3914
3915#include <fontconfig/fontconfig.h>
3916
3917   FcBool FcConfigFileInfoIterGet(FcConfig *config,
3918   FcConfigFileInfoIter *iter, FcChar8 **name, FcChar8
3919   **description, FcBool *enabled);
3920
3921Description
3922
3923   Obtain the filename, the description and the flag whether it is
3924   enabled or not for 'iter' where points to current configuration
3925   file information. If the iterator is invalid, FcFalse is
3926   returned.
3927
3928   This function isn't MT-safe. FcConfigReference must be called
3929   before using FcConfigFileInfoIterInit and then FcConfigDestroy
3930   when the relevant values are no longer referenced.
3931
3932Since
3933
3934   version 2.12.91
3935     __________________________________________________________
3936
3937FcObjectType
3938
3939   Table of Contents
3940   FcNameRegisterObjectTypes -- Register object types
3941   FcNameUnregisterObjectTypes -- Unregister object types
3942   FcNameGetObjectType -- Lookup an object type
3943
3944   Provides for application-specified font name object types so
3945   that new pattern elements can be generated from font names.
3946
3947FcNameRegisterObjectTypes
3948
3949Name
3950
3951   FcNameRegisterObjectTypes -- Register object types
3952
3953Synopsis
3954
3955#include <fontconfig/fontconfig.h>
3956
3957   FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int
3958   ntype);
3959
3960Description
3961
3962   Deprecated. Does nothing. Returns FcFalse.
3963
3964FcNameUnregisterObjectTypes
3965
3966Name
3967
3968   FcNameUnregisterObjectTypes -- Unregister object types
3969
3970Synopsis
3971
3972#include <fontconfig/fontconfig.h>
3973
3974   FcBool FcNameUnregisterObjectTypes(const FcObjectType *types,
3975   int ntype);
3976
3977Description
3978
3979   Deprecated. Does nothing. Returns FcFalse.
3980
3981FcNameGetObjectType
3982
3983Name
3984
3985   FcNameGetObjectType -- Lookup an object type
3986
3987Synopsis
3988
3989#include <fontconfig/fontconfig.h>
3990
3991   const FcObjectType * FcNameGetObjectType(const char *object);
3992
3993Description
3994
3995   Return the object type for the pattern element named object.
3996     __________________________________________________________
3997
3998FcConstant
3999
4000   Table of Contents
4001   FcNameRegisterConstants -- Register symbolic constants
4002   FcNameUnregisterConstants -- Unregister symbolic constants
4003   FcNameGetConstant -- Lookup symbolic constant
4004   FcNameGetConstantFor -- Lookup symbolic constant For object
4005   FcNameConstant -- Get the value for a symbolic constant
4006
4007   Provides for application-specified symbolic constants for font
4008   names.
4009
4010FcNameRegisterConstants
4011
4012Name
4013
4014   FcNameRegisterConstants -- Register symbolic constants
4015
4016Synopsis
4017
4018#include <fontconfig/fontconfig.h>
4019
4020   FcBool FcNameRegisterConstants(const FcConstant *consts, int
4021   nconsts);
4022
4023Description
4024
4025   Deprecated. Does nothing. Returns FcFalse.
4026
4027FcNameUnregisterConstants
4028
4029Name
4030
4031   FcNameUnregisterConstants -- Unregister symbolic constants
4032
4033Synopsis
4034
4035#include <fontconfig/fontconfig.h>
4036
4037   FcBool FcNameUnregisterConstants(const FcConstant *consts, int
4038   nconsts);
4039
4040Description
4041
4042   Deprecated. Does nothing. Returns FcFalse.
4043
4044FcNameGetConstant
4045
4046Name
4047
4048   FcNameGetConstant -- Lookup symbolic constant
4049
4050Synopsis
4051
4052#include <fontconfig/fontconfig.h>
4053
4054   const FcConstant * FcNameGetConstant(FcChar8 *string);
4055
4056Description
4057
4058   Return the FcConstant structure related to symbolic constant
4059   string.
4060
4061FcNameGetConstantFor
4062
4063Name
4064
4065   FcNameGetConstantFor -- Lookup symbolic constant For object
4066
4067Synopsis
4068
4069#include <fontconfig/fontconfig.h>
4070
4071   const FcConstant * FcNameGetConstantFor(FcChar8 *string, char
4072   *object);
4073
4074Description
4075
4076   Return the FcConstant structure related to symbolic constant
4077   string for object.
4078
4079FcNameConstant
4080
4081Name
4082
4083   FcNameConstant -- Get the value for a symbolic constant
4084
4085Synopsis
4086
4087#include <fontconfig/fontconfig.h>
4088
4089   FcBool FcNameConstant(FcChar8 *string, int *result);
4090
4091Description
4092
4093   Returns whether a symbolic constant with name string is
4094   registered, placing the value of the constant in result if
4095   present.
4096     __________________________________________________________
4097
4098FcWeight
4099
4100   Table of Contents
4101   FcWeightFromOpenTypeDouble -- Convert from OpenType weight
4102          values to fontconfig ones
4103
4104   FcWeightToOpenTypeDouble -- Convert from fontconfig weight
4105          values to OpenType ones
4106
4107   FcWeightFromOpenType -- Convert from OpenType weight values to
4108          fontconfig ones
4109
4110   FcWeightToOpenType -- Convert from fontconfig weight values to
4111          OpenType ones
4112
4113   Maps weights to and from OpenType weights.
4114
4115FcWeightFromOpenTypeDouble
4116
4117Name
4118
4119   FcWeightFromOpenTypeDouble -- Convert from OpenType weight
4120   values to fontconfig ones
4121
4122Synopsis
4123
4124#include <fontconfig/fontconfig.h>
4125
4126   double FcWeightFromOpenTypeDouble(doubleot_weight);
4127
4128Description
4129
4130   FcWeightFromOpenTypeDouble returns an double value to use with
4131   FC_WEIGHT, from an double in the 1..1000 range, resembling the
4132   numbers from OpenType specification's OS/2 usWeight numbers,
4133   which are also similar to CSS font-weight numbers. If input is
4134   negative, zero, or greater than 1000, returns -1. This function
4135   linearly interpolates between various FC_WEIGHT_* constants. As
4136   such, the returned value does not necessarily match any of the
4137   predefined constants.
4138
4139Since
4140
4141   version 2.12.92
4142
4143FcWeightToOpenTypeDouble
4144
4145Name
4146
4147   FcWeightToOpenTypeDouble -- Convert from fontconfig weight
4148   values to OpenType ones
4149
4150Synopsis
4151
4152#include <fontconfig/fontconfig.h>
4153
4154   double FcWeightToOpenTypeDouble(doubleot_weight);
4155
4156Description
4157
4158   FcWeightToOpenTypeDouble is the inverse of
4159   FcWeightFromOpenType. If the input is less than FC_WEIGHT_THIN
4160   or greater than FC_WEIGHT_EXTRABLACK, returns -1. Otherwise
4161   returns a number in the range 1 to 1000.
4162
4163Since
4164
4165   version 2.12.92
4166
4167FcWeightFromOpenType
4168
4169Name
4170
4171   FcWeightFromOpenType -- Convert from OpenType weight values to
4172   fontconfig ones
4173
4174Synopsis
4175
4176#include <fontconfig/fontconfig.h>
4177
4178   int FcWeightFromOpenType(intot_weight);
4179
4180Description
4181
4182   FcWeightFromOpenType is like FcWeightFromOpenTypeDouble but
4183   with integer arguments. Use the other function instead.
4184
4185Since
4186
4187   version 2.11.91
4188
4189FcWeightToOpenType
4190
4191Name
4192
4193   FcWeightToOpenType -- Convert from fontconfig weight values to
4194   OpenType ones
4195
4196Synopsis
4197
4198#include <fontconfig/fontconfig.h>
4199
4200   int FcWeightToOpenType(intot_weight);
4201
4202Description
4203
4204   FcWeightToOpenType is like FcWeightToOpenTypeDouble but with
4205   integer arguments. Use the other function instead.
4206
4207Since
4208
4209   version 2.11.91
4210     __________________________________________________________
4211
4212FcBlanks
4213
4214   Table of Contents
4215   FcBlanksCreate -- Create an FcBlanks
4216   FcBlanksDestroy -- Destroy and FcBlanks
4217   FcBlanksAdd -- Add a character to an FcBlanks
4218   FcBlanksIsMember -- Query membership in an FcBlanks
4219
4220   An FcBlanks object holds a list of Unicode chars which are
4221   expected to be blank when drawn. When scanning new fonts, any
4222   glyphs which are empty and not in this list will be assumed to
4223   be broken and not placed in the FcCharSet associated with the
4224   font. This provides a significantly more accurate CharSet for
4225   applications.
4226
4227   FcBlanks is deprecated and should not be used in newly written
4228   code. It is still accepted by some functions for compatibility
4229   with older code but will be removed in the future.
4230
4231FcBlanksCreate
4232
4233Name
4234
4235   FcBlanksCreate -- Create an FcBlanks
4236
4237Synopsis
4238
4239#include <fontconfig/fontconfig.h>
4240
4241   FcBlanks * FcBlanksCreate(void);
4242
4243Description
4244
4245   FcBlanks is deprecated. This function always returns NULL.
4246
4247FcBlanksDestroy
4248
4249Name
4250
4251   FcBlanksDestroy -- Destroy and FcBlanks
4252
4253Synopsis
4254
4255#include <fontconfig/fontconfig.h>
4256
4257   void FcBlanksDestroy(FcBlanks *b);
4258
4259Description
4260
4261   FcBlanks is deprecated. This function does nothing.
4262
4263FcBlanksAdd
4264
4265Name
4266
4267   FcBlanksAdd -- Add a character to an FcBlanks
4268
4269Synopsis
4270
4271#include <fontconfig/fontconfig.h>
4272
4273   FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4);
4274
4275Description
4276
4277   FcBlanks is deprecated. This function always returns FALSE.
4278
4279FcBlanksIsMember
4280
4281Name
4282
4283   FcBlanksIsMember -- Query membership in an FcBlanks
4284
4285Synopsis
4286
4287#include <fontconfig/fontconfig.h>
4288
4289   FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4);
4290
4291Description
4292
4293   FcBlanks is deprecated. This function always returns FALSE.
4294     __________________________________________________________
4295
4296FcAtomic
4297
4298   Table of Contents
4299   FcAtomicCreate -- create an FcAtomic object
4300   FcAtomicLock -- lock a file
4301   FcAtomicNewFile -- return new temporary file name
4302   FcAtomicOrigFile -- return original file name
4303   FcAtomicReplaceOrig -- replace original with new
4304   FcAtomicDeleteNew -- delete new file
4305   FcAtomicUnlock -- unlock a file
4306   FcAtomicDestroy -- destroy an FcAtomic object
4307
4308   These functions provide a safe way to update configuration
4309   files, allowing ongoing reading of the old configuration file
4310   while locked for writing and ensuring that a consistent and
4311   complete version of the configuration file is always available.
4312
4313FcAtomicCreate
4314
4315Name
4316
4317   FcAtomicCreate -- create an FcAtomic object
4318
4319Synopsis
4320
4321#include <fontconfig/fontconfig.h>
4322
4323   FcAtomic * FcAtomicCreate(const FcChar8 *file);
4324
4325Description
4326
4327   Creates a data structure containing data needed to control
4328   access to file. Writing is done to a separate file. Once that
4329   file is complete, the original configuration file is atomically
4330   replaced so that reading process always see a consistent and
4331   complete file without the need to lock for reading.
4332
4333FcAtomicLock
4334
4335Name
4336
4337   FcAtomicLock -- lock a file
4338
4339Synopsis
4340
4341#include <fontconfig/fontconfig.h>
4342
4343   FcBool FcAtomicLock(FcAtomic *atomic);
4344
4345Description
4346
4347   Attempts to lock the file referenced by atomic. Returns FcFalse
4348   if the file is already locked, else returns FcTrue and leaves
4349   the file locked.
4350
4351FcAtomicNewFile
4352
4353Name
4354
4355   FcAtomicNewFile -- return new temporary file name
4356
4357Synopsis
4358
4359#include <fontconfig/fontconfig.h>
4360
4361   FcChar8 * FcAtomicNewFile(FcAtomic *atomic);
4362
4363Description
4364
4365   Returns the filename for writing a new version of the file
4366   referenced by atomic.
4367
4368FcAtomicOrigFile
4369
4370Name
4371
4372   FcAtomicOrigFile -- return original file name
4373
4374Synopsis
4375
4376#include <fontconfig/fontconfig.h>
4377
4378   FcChar8 * FcAtomicOrigFile(FcAtomic *atomic);
4379
4380Description
4381
4382   Returns the file referenced by atomic.
4383
4384FcAtomicReplaceOrig
4385
4386Name
4387
4388   FcAtomicReplaceOrig -- replace original with new
4389
4390Synopsis
4391
4392#include <fontconfig/fontconfig.h>
4393
4394   FcBool FcAtomicReplaceOrig(FcAtomic *atomic);
4395
4396Description
4397
4398   Replaces the original file referenced by atomic with the new
4399   file. Returns FcFalse if the file cannot be replaced due to
4400   permission issues in the filesystem. Otherwise returns FcTrue.
4401
4402FcAtomicDeleteNew
4403
4404Name
4405
4406   FcAtomicDeleteNew -- delete new file
4407
4408Synopsis
4409
4410#include <fontconfig/fontconfig.h>
4411
4412   void FcAtomicDeleteNew(FcAtomic *atomic);
4413
4414Description
4415
4416   Deletes the new file. Used in error recovery to back out
4417   changes.
4418
4419FcAtomicUnlock
4420
4421Name
4422
4423   FcAtomicUnlock -- unlock a file
4424
4425Synopsis
4426
4427#include <fontconfig/fontconfig.h>
4428
4429   void FcAtomicUnlock(FcAtomic *atomic);
4430
4431Description
4432
4433   Unlocks the file.
4434
4435FcAtomicDestroy
4436
4437Name
4438
4439   FcAtomicDestroy -- destroy an FcAtomic object
4440
4441Synopsis
4442
4443#include <fontconfig/fontconfig.h>
4444
4445   void FcAtomicDestroy(FcAtomic *atomic);
4446
4447Description
4448
4449   Destroys atomic.
4450     __________________________________________________________
4451
4452File and Directory routines
4453
4454   Table of Contents
4455   FcFileScan -- scan a font file
4456   FcFileIsDir -- check whether a file is a directory
4457   FcDirScan -- scan a font directory without caching it
4458   FcDirSave -- DEPRECATED: formerly used to save a directory
4459          cache
4460
4461   FcDirCacheUnlink -- Remove all caches related to dir
4462   FcDirCacheValid -- check directory cache
4463   FcDirCacheLoad -- load a directory cache
4464   FcDirCacheRescan -- Re-scan a directory cache
4465   FcDirCacheRead -- read or construct a directory cache
4466   FcDirCacheLoadFile -- load a cache file
4467   FcDirCacheUnload -- unload a cache file
4468
4469   These routines work with font files and directories, including
4470   font directory cache files.
4471
4472FcFileScan
4473
4474Name
4475
4476   FcFileScan -- scan a font file
4477
4478Synopsis
4479
4480#include <fontconfig/fontconfig.h>
4481
4482   FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
4483   *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force);
4484
4485Description
4486
4487   Scans a single file and adds all fonts found to set. If force
4488   is FcTrue, then the file is scanned even if associated
4489   information is found in cache. If file is a directory, it is
4490   added to dirs. Whether fonts are found depends on fontconfig
4491   policy as well as the current configuration. Internally,
4492   fontconfig will ignore BDF and PCF fonts which are not in
4493   Unicode (or the effectively equivalent ISO Latin-1) encoding as
4494   those are not usable by Unicode-based applications. The
4495   configuration can ignore fonts based on filename or contents of
4496   the font file itself. Returns FcFalse if any of the fonts
4497   cannot be added (due to allocation failure). Otherwise returns
4498   FcTrue.
4499
4500FcFileIsDir
4501
4502Name
4503
4504   FcFileIsDir -- check whether a file is a directory
4505
4506Synopsis
4507
4508#include <fontconfig/fontconfig.h>
4509
4510   FcBool FcFileIsDir(const FcChar8 *file);
4511
4512Description
4513
4514   Returns FcTrue if file is a directory, otherwise returns
4515   FcFalse.
4516
4517FcDirScan
4518
4519Name
4520
4521   FcDirScan -- scan a font directory without caching it
4522
4523Synopsis
4524
4525#include <fontconfig/fontconfig.h>
4526
4527   FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
4528   *cache, FcBlanks *blanks, const FcChar8 *dir, FcBool force);
4529
4530Description
4531
4532   If cache is not zero or if force is FcFalse, this function
4533   currently returns FcFalse. Otherwise, it scans an entire
4534   directory and adds all fonts found to set. Any subdirectories
4535   found are added to dirs. Calling this function does not create
4536   any cache files. Use FcDirCacheRead() if caching is desired.
4537
4538FcDirSave
4539
4540Name
4541
4542   FcDirSave -- DEPRECATED: formerly used to save a directory
4543   cache
4544
4545Synopsis
4546
4547#include <fontconfig/fontconfig.h>
4548
4549   FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8
4550   *dir);
4551
4552Description
4553
4554   This function now does nothing aside from returning FcFalse. It
4555   used to creates the per-directory cache file for dir and
4556   populates it with the fonts in set and subdirectories in dirs.
4557   All of this functionality is now automatically managed by
4558   FcDirCacheLoad and FcDirCacheRead.
4559
4560FcDirCacheUnlink
4561
4562Name
4563
4564   FcDirCacheUnlink -- Remove all caches related to dir
4565
4566Synopsis
4567
4568#include <fontconfig/fontconfig.h>
4569
4570   FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config);
4571
4572Description
4573
4574   Scans the cache directories in config, removing any instances
4575   of the cache file for dir. Returns FcFalse when some internal
4576   error occurs (out of memory, etc). Errors actually unlinking
4577   any files are ignored.
4578
4579FcDirCacheValid
4580
4581Name
4582
4583   FcDirCacheValid -- check directory cache
4584
4585Synopsis
4586
4587#include <fontconfig/fontconfig.h>
4588
4589   FcBool FcDirCacheValid(const FcChar8 *dir);
4590
4591Description
4592
4593   Returns FcTrue if dir has an associated valid cache file, else
4594   returns FcFalse
4595
4596FcDirCacheLoad
4597
4598Name
4599
4600   FcDirCacheLoad -- load a directory cache
4601
4602Synopsis
4603
4604#include <fontconfig/fontconfig.h>
4605
4606   FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config,
4607   FcChar8 **cache_file);
4608
4609Description
4610
4611   Loads the cache related to dir. If no cache file exists,
4612   returns NULL. The name of the cache file is returned in
4613   cache_file, unless that is NULL. See also FcDirCacheRead.
4614
4615FcDirCacheRescan
4616
4617Name
4618
4619   FcDirCacheRescan -- Re-scan a directory cache
4620
4621Synopsis
4622
4623#include <fontconfig/fontconfig.h>
4624
4625   FcCache * FcDirCacheRescan(const FcChar8 *dir, FcConfig
4626   *config);
4627
4628Description
4629
4630   Re-scan directories only at dir and update the cache. returns
4631   NULL if failed.
4632
4633Since
4634
4635   version 2.11.1
4636
4637FcDirCacheRead
4638
4639Name
4640
4641   FcDirCacheRead -- read or construct a directory cache
4642
4643Synopsis
4644
4645#include <fontconfig/fontconfig.h>
4646
4647   FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force,
4648   FcConfig *config);
4649
4650Description
4651
4652   This returns a cache for dir. If force is FcFalse, then an
4653   existing, valid cache file will be used. Otherwise, a new cache
4654   will be created by scanning the directory and that returned.
4655
4656FcDirCacheLoadFile
4657
4658Name
4659
4660   FcDirCacheLoadFile -- load a cache file
4661
4662Synopsis
4663
4664#include <fontconfig/fontconfig.h>
4665
4666   FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct
4667   stat *file_stat);
4668
4669Description
4670
4671   This function loads a directory cache from cache_file. If
4672   file_stat is non-NULL, it will be filled with the results of
4673   stat(2) on the cache file.
4674
4675FcDirCacheUnload
4676
4677Name
4678
4679   FcDirCacheUnload -- unload a cache file
4680
4681Synopsis
4682
4683#include <fontconfig/fontconfig.h>
4684
4685   void FcDirCacheUnload(FcCache *cache);
4686
4687Description
4688
4689   This function dereferences cache. When no other references to
4690   it remain, all memory associated with the cache will be freed.
4691     __________________________________________________________
4692
4693FcCache routines
4694
4695   Table of Contents
4696   FcCacheDir -- Return directory of cache
4697   FcCacheCopySet -- Returns a copy of the fontset from cache
4698   FcCacheSubdir -- Return the i'th subdirectory.
4699   FcCacheNumSubdir -- Return the number of subdirectories in
4700          cache.
4701
4702   FcCacheNumFont -- Returns the number of fonts in cache.
4703   FcDirCacheClean -- Clean up a cache directory
4704   FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
4705   FcDirCacheCreateUUID -- Create .uuid file at a directory
4706   FcDirCacheDeleteUUID -- Delete .uuid file
4707
4708   These routines work with font directory caches, accessing their
4709   contents in limited ways. It is not expected that normal
4710   applications will need to use these functions.
4711
4712FcCacheDir
4713
4714Name
4715
4716   FcCacheDir -- Return directory of cache
4717
4718Synopsis
4719
4720#include <fontconfig/fontconfig.h>
4721
4722   const FcChar8 * FcCacheDir(const FcCache *cache);
4723
4724Description
4725
4726   This function returns the directory from which the cache was
4727   constructed.
4728
4729FcCacheCopySet
4730
4731Name
4732
4733   FcCacheCopySet -- Returns a copy of the fontset from cache
4734
4735Synopsis
4736
4737#include <fontconfig/fontconfig.h>
4738
4739   FcFontSet * FcCacheCopySet(const FcCache *cache);
4740
4741Description
4742
4743   The returned fontset contains each of the font patterns from
4744   cache. This fontset may be modified, but the patterns from the
4745   cache are read-only.
4746
4747FcCacheSubdir
4748
4749Name
4750
4751   FcCacheSubdir -- Return the i'th subdirectory.
4752
4753Synopsis
4754
4755#include <fontconfig/fontconfig.h>
4756
4757   const FcChar8 * FcCacheSubdir(const FcCache *cache, inti);
4758
4759Description
4760
4761   The set of subdirectories stored in a cache file are indexed by
4762   this function, i should range from 0 to n-1, where n is the
4763   return value from FcCacheNumSubdir.
4764
4765FcCacheNumSubdir
4766
4767Name
4768
4769   FcCacheNumSubdir -- Return the number of subdirectories in
4770   cache.
4771
4772Synopsis
4773
4774#include <fontconfig/fontconfig.h>
4775
4776   int FcCacheNumSubdir(const FcCache *cache);
4777
4778Description
4779
4780   This returns the total number of subdirectories in the cache.
4781
4782FcCacheNumFont
4783
4784Name
4785
4786   FcCacheNumFont -- Returns the number of fonts in cache.
4787
4788Synopsis
4789
4790#include <fontconfig/fontconfig.h>
4791
4792   int FcCacheNumFont(const FcCache *cache);
4793
4794Description
4795
4796   This returns the number of fonts which would be included in the
4797   return from FcCacheCopySet.
4798
4799FcDirCacheClean
4800
4801Name
4802
4803   FcDirCacheClean -- Clean up a cache directory
4804
4805Synopsis
4806
4807#include <fontconfig/fontconfig.h>
4808
4809   FcBool FcDirCacheClean(const FcChar8 *cache_dir,
4810   FcBoolverbose);
4811
4812Description
4813
4814   This tries to clean up the cache directory of cache_dir. This
4815   returns FcTrue if the operation is successfully complete.
4816   otherwise FcFalse.
4817
4818Since
4819
4820   version 2.9.91
4821
4822FcCacheCreateTagFile
4823
4824Name
4825
4826   FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory.
4827
4828Synopsis
4829
4830#include <fontconfig/fontconfig.h>
4831
4832   void FcCacheCreateTagFile(const FcConfig *config);
4833
4834Description
4835
4836   This tries to create CACHEDIR.TAG file at the cache directory
4837   registered to config.
4838
4839Since
4840
4841   version 2.9.91
4842
4843FcDirCacheCreateUUID
4844
4845Name
4846
4847   FcDirCacheCreateUUID -- Create .uuid file at a directory
4848
4849Synopsis
4850
4851#include <fontconfig/fontconfig.h>
4852
4853   FcBool FcDirCacheCreateUUID(FcChar8 *dir, FcBoolforce, FcConfig
4854   *config);
4855
4856Description
4857
4858   This function is deprecated. it doesn't take any effects.
4859
4860Since
4861
4862   version 2.12.92
4863
4864FcDirCacheDeleteUUID
4865
4866Name
4867
4868   FcDirCacheDeleteUUID -- Delete .uuid file
4869
4870Synopsis
4871
4872#include <fontconfig/fontconfig.h>
4873
4874   FcBool FcDirCacheDeleteUUID(const FcChar8 *dir, FcConfig
4875   *config);
4876
4877Description
4878
4879   This is to delete .uuid file containing an UUID at a font
4880   directory of dir.
4881
4882Since
4883
4884   version 2.13.1
4885     __________________________________________________________
4886
4887FcStrSet and FcStrList
4888
4889   Table of Contents
4890   FcStrSetCreate -- create a string set
4891   FcStrSetMember -- check set for membership
4892   FcStrSetEqual -- check sets for equality
4893   FcStrSetAdd -- add to a string set
4894   FcStrSetAddFilename -- add a filename to a string set
4895   FcStrSetDel -- delete from a string set
4896   FcStrSetDestroy -- destroy a string set
4897   FcStrListCreate -- create a string iterator
4898   FcStrListFirst -- get first string in iteration
4899   FcStrListNext -- get next string in iteration
4900   FcStrListDone -- destroy a string iterator
4901
4902   A data structure for enumerating strings, used to list
4903   directories while scanning the configuration as directories are
4904   added while scanning.
4905
4906FcStrSetCreate
4907
4908Name
4909
4910   FcStrSetCreate -- create a string set
4911
4912Synopsis
4913
4914#include <fontconfig/fontconfig.h>
4915
4916   FcStrSet * FcStrSetCreate(void);
4917
4918Description
4919
4920   Create an empty set.
4921
4922FcStrSetMember
4923
4924Name
4925
4926   FcStrSetMember -- check set for membership
4927
4928Synopsis
4929
4930#include <fontconfig/fontconfig.h>
4931
4932   FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s);
4933
4934Description
4935
4936   Returns whether s is a member of set.
4937
4938FcStrSetEqual
4939
4940Name
4941
4942   FcStrSetEqual -- check sets for equality
4943
4944Synopsis
4945
4946#include <fontconfig/fontconfig.h>
4947
4948   FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b);
4949
4950Description
4951
4952   Returns whether set_a contains precisely the same strings as
4953   set_b. Ordering of strings within the two sets is not
4954   considered.
4955
4956FcStrSetAdd
4957
4958Name
4959
4960   FcStrSetAdd -- add to a string set
4961
4962Synopsis
4963
4964#include <fontconfig/fontconfig.h>
4965
4966   FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s);
4967
4968Description
4969
4970   Adds a copy of s to set.
4971
4972FcStrSetAddFilename
4973
4974Name
4975
4976   FcStrSetAddFilename -- add a filename to a string set
4977
4978Synopsis
4979
4980#include <fontconfig/fontconfig.h>
4981
4982   FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s);
4983
4984Description
4985
4986   Adds a copy s to set, The copy is created with
4987   FcStrCopyFilename so that leading '~' values are replaced with
4988   the value of the HOME environment variable.
4989
4990FcStrSetDel
4991
4992Name
4993
4994   FcStrSetDel -- delete from a string set
4995
4996Synopsis
4997
4998#include <fontconfig/fontconfig.h>
4999
5000   FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s);
5001
5002Description
5003
5004   Removes s from set, returning FcTrue if s was a member else
5005   FcFalse.
5006
5007FcStrSetDestroy
5008
5009Name
5010
5011   FcStrSetDestroy -- destroy a string set
5012
5013Synopsis
5014
5015#include <fontconfig/fontconfig.h>
5016
5017   void FcStrSetDestroy(FcStrSet *set);
5018
5019Description
5020
5021   Destroys set.
5022
5023FcStrListCreate
5024
5025Name
5026
5027   FcStrListCreate -- create a string iterator
5028
5029Synopsis
5030
5031#include <fontconfig/fontconfig.h>
5032
5033   FcStrList * FcStrListCreate(FcStrSet *set);
5034
5035Description
5036
5037   Creates an iterator to list the strings in set.
5038
5039FcStrListFirst
5040
5041Name
5042
5043   FcStrListFirst -- get first string in iteration
5044
5045Synopsis
5046
5047#include <fontconfig/fontconfig.h>
5048
5049   void FcStrListFirst(FcStrList *list);
5050
5051Description
5052
5053   Returns the first string in list.
5054
5055Since
5056
5057   version 2.11.0
5058
5059FcStrListNext
5060
5061Name
5062
5063   FcStrListNext -- get next string in iteration
5064
5065Synopsis
5066
5067#include <fontconfig/fontconfig.h>
5068
5069   FcChar8 * FcStrListNext(FcStrList *list);
5070
5071Description
5072
5073   Returns the next string in list.
5074
5075FcStrListDone
5076
5077Name
5078
5079   FcStrListDone -- destroy a string iterator
5080
5081Synopsis
5082
5083#include <fontconfig/fontconfig.h>
5084
5085   void FcStrListDone(FcStrList *list);
5086
5087Description
5088
5089   Destroys the enumerator list.
5090     __________________________________________________________
5091
5092String utilities
5093
5094   Table of Contents
5095   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
5096   FcUcs4ToUtf8 -- convert UCS4 to UTF-8
5097   FcUtf8Len -- count UTF-8 encoded chars
5098   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
5099   FcUtf16Len -- count UTF-16 encoded chars
5100   FcIsLower -- check for lower case ASCII character
5101   FcIsUpper -- check for upper case ASCII character
5102   FcToLower -- convert upper case ASCII to lower case
5103   FcStrCopy -- duplicate a string
5104   FcStrDowncase -- create a lower case translation of a string
5105   FcStrCopyFilename -- create a complete path from a filename
5106   FcStrCmp -- compare UTF-8 strings
5107   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
5108   FcStrStr -- locate UTF-8 substring
5109   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring case
5110   FcStrPlus -- concatenate two strings
5111   FcStrFree -- free a string
5112   FcStrBuildFilename -- Concatenate strings as a file path
5113   FcStrDirname -- directory part of filename
5114   FcStrBasename -- last component of filename
5115
5116   Fontconfig manipulates many UTF-8 strings represented with the
5117   FcChar8 type. These functions are exposed to help applications
5118   deal with these UTF-8 strings in a locale-insensitive manner.
5119
5120FcUtf8ToUcs4
5121
5122Name
5123
5124   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
5125
5126Synopsis
5127
5128#include <fontconfig/fontconfig.h>
5129
5130   int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len);
5131
5132Description
5133
5134   Converts the next Unicode char from src into dst and returns
5135   the number of bytes containing the char. src must be at least
5136   len bytes long.
5137
5138FcUcs4ToUtf8
5139
5140Name
5141
5142   FcUcs4ToUtf8 -- convert UCS4 to UTF-8
5143
5144Synopsis
5145
5146#include <fontconfig/fontconfig.h>
5147
5148   int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]);
5149
5150Description
5151
5152   Converts the Unicode char from src into dst and returns the
5153   number of bytes needed to encode the char.
5154
5155FcUtf8Len
5156
5157Name
5158
5159   FcUtf8Len -- count UTF-8 encoded chars
5160
5161Synopsis
5162
5163#include <fontconfig/fontconfig.h>
5164
5165   FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int
5166   *wchar);
5167
5168Description
5169
5170   Counts the number of Unicode chars in len bytes of src. Places
5171   that count in nchar. wchar contains 1, 2 or 4 depending on the
5172   number of bytes needed to hold the largest Unicode char
5173   counted. The return value indicates whether src is a
5174   well-formed UTF8 string.
5175
5176FcUtf16ToUcs4
5177
5178Name
5179
5180   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
5181
5182Synopsis
5183
5184#include <fontconfig/fontconfig.h>
5185
5186   int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst,
5187   int len);
5188
5189Description
5190
5191   Converts the next Unicode char from src into dst and returns
5192   the number of bytes containing the char. src must be at least
5193   len bytes long. Bytes of src are combined into 16-bit units
5194   according to endian.
5195
5196FcUtf16Len
5197
5198Name
5199
5200   FcUtf16Len -- count UTF-16 encoded chars
5201
5202Synopsis
5203
5204#include <fontconfig/fontconfig.h>
5205
5206   FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int
5207   *nchar, int *wchar);
5208
5209Description
5210
5211   Counts the number of Unicode chars in len bytes of src. Bytes
5212   of src are combined into 16-bit units according to endian.
5213   Places that count in nchar. wchar contains 1, 2 or 4 depending
5214   on the number of bytes needed to hold the largest Unicode char
5215   counted. The return value indicates whether string is a
5216   well-formed UTF16 string.
5217
5218FcIsLower
5219
5220Name
5221
5222   FcIsLower -- check for lower case ASCII character
5223
5224Synopsis
5225
5226#include <fontconfig/fontconfig.h>
5227
5228   FcBool FcIsLower(FcChar8c);
5229
5230Description
5231
5232   This macro checks whether c is an lower case ASCII letter.
5233
5234FcIsUpper
5235
5236Name
5237
5238   FcIsUpper -- check for upper case ASCII character
5239
5240Synopsis
5241
5242#include <fontconfig/fontconfig.h>
5243
5244   FcBool FcIsUpper(FcChar8c);
5245
5246Description
5247
5248   This macro checks whether c is a upper case ASCII letter.
5249
5250FcToLower
5251
5252Name
5253
5254   FcToLower -- convert upper case ASCII to lower case
5255
5256Synopsis
5257
5258#include <fontconfig/fontconfig.h>
5259
5260   FcChar8 FcToLower(FcChar8c);
5261
5262Description
5263
5264   This macro converts upper case ASCII c to the equivalent lower
5265   case letter.
5266
5267FcStrCopy
5268
5269Name
5270
5271   FcStrCopy -- duplicate a string
5272
5273Synopsis
5274
5275#include <fontconfig/fontconfig.h>
5276
5277   FcChar8 * FcStrCopy(const FcChar8 *s);
5278
5279Description
5280
5281   Allocates memory, copies s and returns the resulting buffer.
5282   Yes, this is strdup, but that function isn't available on every
5283   platform.
5284
5285FcStrDowncase
5286
5287Name
5288
5289   FcStrDowncase -- create a lower case translation of a string
5290
5291Synopsis
5292
5293#include <fontconfig/fontconfig.h>
5294
5295   FcChar8 * FcStrDowncase(const FcChar8 *s);
5296
5297Description
5298
5299   Allocates memory, copies s, converting upper case letters to
5300   lower case and returns the allocated buffer.
5301
5302FcStrCopyFilename
5303
5304Name
5305
5306   FcStrCopyFilename -- create a complete path from a filename
5307
5308Synopsis
5309
5310#include <fontconfig/fontconfig.h>
5311
5312   FcChar8 * FcStrCopyFilename(const FcChar8 *s);
5313
5314Description
5315
5316   FcStrCopyFilename constructs an absolute pathname from s. It
5317   converts any leading '~' characters in to the value of the HOME
5318   environment variable, and any relative paths are converted to
5319   absolute paths using the current working directory. Sequences
5320   of '/' characters are converted to a single '/', and names
5321   containing the current directory '.' or parent directory '..'
5322   are correctly reconstructed. Returns NULL if '~' is the leading
5323   character and HOME is unset or disabled (see
5324   FcConfigEnableHome).
5325
5326FcStrCmp
5327
5328Name
5329
5330   FcStrCmp -- compare UTF-8 strings
5331
5332Synopsis
5333
5334#include <fontconfig/fontconfig.h>
5335
5336   int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2);
5337
5338Description
5339
5340   Returns the usual <0, 0, >0 result of comparing s1 and s2.
5341
5342FcStrCmpIgnoreCase
5343
5344Name
5345
5346   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
5347
5348Synopsis
5349
5350#include <fontconfig/fontconfig.h>
5351
5352   int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2);
5353
5354Description
5355
5356   Returns the usual <0, 0, >0 result of comparing s1 and s2. This
5357   test is case-insensitive for all proper UTF-8 encoded strings.
5358
5359FcStrStr
5360
5361Name
5362
5363   FcStrStr -- locate UTF-8 substring
5364
5365Synopsis
5366
5367#include <fontconfig/fontconfig.h>
5368
5369   FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2);
5370
5371Description
5372
5373   Returns the location of s2 in s1. Returns NULL if s2 is not
5374   present in s1. This test will operate properly with UTF8
5375   encoded strings.
5376
5377FcStrStrIgnoreCase
5378
5379Name
5380
5381   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring case
5382
5383Synopsis
5384
5385#include <fontconfig/fontconfig.h>
5386
5387   FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8
5388   *s2);
5389
5390Description
5391
5392   Returns the location of s2 in s1, ignoring case. Returns NULL
5393   if s2 is not present in s1. This test is case-insensitive for
5394   all proper UTF-8 encoded strings.
5395
5396FcStrPlus
5397
5398Name
5399
5400   FcStrPlus -- concatenate two strings
5401
5402Synopsis
5403
5404#include <fontconfig/fontconfig.h>
5405
5406   FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2);
5407
5408Description
5409
5410   This function allocates new storage and places the
5411   concatenation of s1 and s2 there, returning the new string.
5412
5413FcStrFree
5414
5415Name
5416
5417   FcStrFree -- free a string
5418
5419Synopsis
5420
5421#include <fontconfig/fontconfig.h>
5422
5423   void FcStrFree(FcChar8 *s);
5424
5425Description
5426
5427   This is just a wrapper around free(3) which helps track memory
5428   usage of strings within the fontconfig library.
5429
5430FcStrBuildFilename
5431
5432Name
5433
5434   FcStrBuildFilename -- Concatenate strings as a file path
5435
5436Synopsis
5437
5438#include <fontconfig/fontconfig.h>
5439
5440   FcChar8 * FcStrBuildFilename(const FcChar8 *path, ...);
5441
5442Description
5443
5444   Creates a filename from the given elements of strings as file
5445   paths and concatenate them with the appropriate file separator.
5446   Arguments must be null-terminated. This returns a
5447   newly-allocated memory which should be freed when no longer
5448   needed.
5449
5450FcStrDirname
5451
5452Name
5453
5454   FcStrDirname -- directory part of filename
5455
5456Synopsis
5457
5458#include <fontconfig/fontconfig.h>
5459
5460   FcChar8 * FcStrDirname(const FcChar8 *file);
5461
5462Description
5463
5464   Returns the directory containing file. This is returned in
5465   newly allocated storage which should be freed when no longer
5466   needed.
5467
5468FcStrBasename
5469
5470Name
5471
5472   FcStrBasename -- last component of filename
5473
5474Synopsis
5475
5476#include <fontconfig/fontconfig.h>
5477
5478   FcChar8 * FcStrBasename(const FcChar8 *file);
5479
5480Description
5481
5482   Returns the filename of file stripped of any leading directory
5483   names. This is returned in newly allocated storage which should
5484   be freed when no longer needed.
5485