]> git.wh0rd.org - fontconfig.git/blame - fontconfig/fontconfig.h
Currently Russian (ru) requires 0406 and 0456 (І and і), but these were
[fontconfig.git] / fontconfig / fontconfig.h
CommitLineData
24330d27 1/*
4c2967f6 2 * $RCSId: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.30 2002/09/26 00:17:27 keithp Exp $
24330d27 3 *
46b51147 4 * Copyright © 2001 Keith Packard
24330d27
KP
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Keith Packard not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Keith Packard makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
23 */
24
25#ifndef _FONTCONFIG_H_
26#define _FONTCONFIG_H_
27
28#include <stdarg.h>
29
30typedef unsigned char FcChar8;
31typedef unsigned short FcChar16;
32typedef unsigned int FcChar32;
33typedef int FcBool;
34
35/*
ff3f1f98
KP
36 * Current Fontconfig version number. This same number
37 * must appear in the fontconfig configure.in file. Yes,
38 * it'a a pain to synchronize version numbers like this.
24330d27 39 */
20fa60c9 40
ff3f1f98 41#define FC_MAJOR 2
781f1048 42#define FC_MINOR 2
308dc9c3 43#define FC_REVISION 97
24330d27
KP
44
45#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
46
f21f40f3
KP
47/*
48 * Current font cache file format version
49 * This is appended to the cache files so that multiple
50 * versions of the library will peacefully coexist
51 *
52 * Change this value whenever the disk format for the cache file
53 * changes in any non-compatible way. Try to avoid such changes as
54 * it means multiple copies of the font information.
55 */
56
57#define FC_CACHE_VERSION "1"
58
24330d27
KP
59#define FcTrue 1
60#define FcFalse 0
61
62#define FC_FAMILY "family" /* String */
63#define FC_STYLE "style" /* String */
64#define FC_SLANT "slant" /* Int */
65#define FC_WEIGHT "weight" /* Int */
66#define FC_SIZE "size" /* Double */
2a41214a 67#define FC_ASPECT "aspect" /* Double */
24330d27
KP
68#define FC_PIXEL_SIZE "pixelsize" /* Double */
69#define FC_SPACING "spacing" /* Int */
70#define FC_FOUNDRY "foundry" /* String */
71#define FC_ANTIALIAS "antialias" /* Bool (depends) */
72#define FC_HINTING "hinting" /* Bool (true) */
f077d662 73#define FC_HINT_STYLE "hintstyle" /* Int */
24330d27
KP
74#define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */
75#define FC_AUTOHINT "autohint" /* Bool (false) */
76#define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */
81fa16c3 77#define FC_WIDTH "width" /* Int */
24330d27
KP
78#define FC_FILE "file" /* String */
79#define FC_INDEX "index" /* Int */
be094850 80#define FC_FT_FACE "ftface" /* FT_Face */
24330d27
KP
81#define FC_RASTERIZER "rasterizer" /* String */
82#define FC_OUTLINE "outline" /* Bool */
83#define FC_SCALABLE "scalable" /* Bool */
84#define FC_SCALE "scale" /* double */
85#define FC_DPI "dpi" /* double */
86#define FC_RGBA "rgba" /* Int */
87#define FC_MINSPACE "minspace" /* Bool use minimum line spacing */
88#define FC_SOURCE "source" /* String (X11, freetype) */
89#define FC_CHARSET "charset" /* CharSet */
a342e87d
KP
90#define FC_LANG "lang" /* String RFC 3066 langs */
91#define FC_FONTVERSION "fontversion" /* Int from 'head' table */
4f27c1c0
KP
92#define FC_FULLNAME "fullname" /* String */
93#define FC_FAMILYLANG "familylang" /* String RFC 3066 langs */
94#define FC_STYLELANG "stylelang" /* String RFC 3066 langs */
95#define FC_FULLNAMELANG "fullnamelang" /* String RFC 3066 langs */
dbf68dd5 96#define FC_CAPABILITY "capability" /* String */
537e3d23 97#define FC_FONTFORMAT "fontformat" /* String */
24330d27 98
f21f40f3
KP
99#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION
100#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION
24330d27
KP
101
102/* Adjust outline rasterizer */
103#define FC_CHAR_WIDTH "charwidth" /* Int */
104#define FC_CHAR_HEIGHT "charheight"/* Int */
105#define FC_MATRIX "matrix" /* FcMatrix */
106
81fa16c3
KP
107#define FC_WEIGHT_THIN 0
108#define FC_WEIGHT_EXTRALIGHT 40
109#define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT
110#define FC_WEIGHT_LIGHT 50
ad293de0 111#define FC_WEIGHT_BOOK 75
81fa16c3
KP
112#define FC_WEIGHT_REGULAR 80
113#define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR
114#define FC_WEIGHT_MEDIUM 100
115#define FC_WEIGHT_DEMIBOLD 180
116#define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD
117#define FC_WEIGHT_BOLD 200
118#define FC_WEIGHT_EXTRABOLD 205
3f7653c2 119#define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD
81fa16c3 120#define FC_WEIGHT_BLACK 210
3f7653c2 121#define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK
81fa16c3
KP
122
123#define FC_SLANT_ROMAN 0
124#define FC_SLANT_ITALIC 100
125#define FC_SLANT_OBLIQUE 110
126
127#define FC_WIDTH_ULTRACONDENSED 50
128#define FC_WIDTH_EXTRACONDENSED 63
129#define FC_WIDTH_CONDENSED 75
130#define FC_WIDTH_SEMICONDENSED 87
131#define FC_WIDTH_NORMAL 100
132#define FC_WIDTH_SEMIEXPANDED 113
133#define FC_WIDTH_EXPANDED 125
134#define FC_WIDTH_EXTRAEXPANDED 150
135#define FC_WIDTH_ULTRAEXPANDED 200
136
137#define FC_PROPORTIONAL 0
a05d257f 138#define FC_DUAL 90
81fa16c3
KP
139#define FC_MONO 100
140#define FC_CHARCELL 110
24330d27
KP
141
142/* sub-pixel order */
1852d490 143#define FC_RGBA_UNKNOWN 0
24330d27
KP
144#define FC_RGBA_RGB 1
145#define FC_RGBA_BGR 2
146#define FC_RGBA_VRGB 3
147#define FC_RGBA_VBGR 4
1852d490 148#define FC_RGBA_NONE 5
24330d27 149
f077d662
OT
150/* hinting style */
151#define FC_HINT_NONE 0
152#define FC_HINT_SLIGHT 1
153#define FC_HINT_MEDIUM 2
154#define FC_HINT_FULL 3
155
24330d27
KP
156typedef enum _FcType {
157 FcTypeVoid,
158 FcTypeInteger,
159 FcTypeDouble,
160 FcTypeString,
161 FcTypeBool,
162 FcTypeMatrix,
be094850 163 FcTypeCharSet,
d8d73958
KP
164 FcTypeFTFace,
165 FcTypeLangSet
24330d27
KP
166} FcType;
167
168typedef struct _FcMatrix {
169 double xx, xy, yx, yy;
170} FcMatrix;
171
172#define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \
173 (m)->xy = (m)->yx = 0)
174
175/*
176 * A data structure to represent the available glyphs in a font.
177 * This is represented as a sparse boolean btree.
178 */
179
180typedef struct _FcCharSet FcCharSet;
181
182typedef struct _FcObjectType {
183 const char *object;
184 FcType type;
185} FcObjectType;
186
187typedef struct _FcConstant {
ccb3e93b 188 const FcChar8 *name;
24330d27
KP
189 const char *object;
190 int value;
191} FcConstant;
192
193typedef enum _FcResult {
ec0c740e 194 FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId,
3d1ea0e5 195 FcResultOutOfMemory
24330d27
KP
196} FcResult;
197
938bc633
KP
198typedef struct _FcPattern FcPattern;
199
d8d73958
KP
200typedef struct _FcLangSet FcLangSet;
201
24330d27
KP
202typedef struct _FcValue {
203 FcType type;
204 union {
205 const FcChar8 *s;
206 int i;
207 FcBool b;
208 double d;
209 const FcMatrix *m;
210 const FcCharSet *c;
be094850 211 void *f;
938bc633 212 const FcPattern *p;
d8d73958 213 const FcLangSet *l;
24330d27
KP
214 } u;
215} FcValue;
216
24330d27
KP
217typedef struct _FcFontSet {
218 int nfont;
219 int sfont;
220 FcPattern **fonts;
221} FcFontSet;
222
223typedef struct _FcObjectSet {
224 int nobject;
225 int sobject;
226 const char **objects;
227} FcObjectSet;
228
229typedef enum _FcMatchKind {
938bc633 230 FcMatchPattern, FcMatchFont
24330d27
KP
231} FcMatchKind;
232
d8d73958
KP
233typedef enum _FcLangResult {
234 FcLangEqual, FcLangDifferentCountry, FcLangDifferentLang
235} FcLangResult;
236
24330d27
KP
237typedef enum _FcSetName {
238 FcSetSystem = 0,
239 FcSetApplication = 1
240} FcSetName;
241
134f6011
KP
242typedef struct _FcAtomic FcAtomic;
243
24330d27
KP
244#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
245#define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
246#define _FCFUNCPROTOEND }
247#else
248#define _FCFUNCPROTOBEGIN
249#define _FCFUNCPROTOEND
250#endif
251
69937bd9
KP
252typedef enum { FcEndianBig, FcEndianLittle } FcEndian;
253
24330d27
KP
254typedef struct _FcConfig FcConfig;
255
327a7fd4 256typedef struct _FcGlobalCache FcFileCache;
24330d27
KP
257
258typedef struct _FcBlanks FcBlanks;
259
179c3995
KP
260typedef struct _FcStrList FcStrList;
261
262typedef struct _FcStrSet FcStrSet;
263
24330d27
KP
264_FCFUNCPROTOBEGIN
265
c2e9d024
MALF
266FcBool
267FcDirCacheValid (const FcChar8 *cache_file);
268
24330d27
KP
269/* fcblanks.c */
270FcBlanks *
271FcBlanksCreate (void);
272
273void
274FcBlanksDestroy (FcBlanks *b);
275
276FcBool
277FcBlanksAdd (FcBlanks *b, FcChar32 ucs4);
278
279FcBool
280FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
281
282/* fccfg.c */
ff3f1f98
KP
283FcChar8 *
284FcConfigHome (void);
285
286FcBool
287FcConfigEnableHome (FcBool enable);
288
ccb3e93b
KP
289FcChar8 *
290FcConfigFilename (const FcChar8 *url);
24330d27
KP
291
292FcConfig *
293FcConfigCreate (void);
294
295void
296FcConfigDestroy (FcConfig *config);
297
298FcBool
299FcConfigSetCurrent (FcConfig *config);
300
301FcConfig *
302FcConfigGetCurrent (void);
303
179c3995
KP
304FcBool
305FcConfigUptoDate (FcConfig *config);
306
24330d27
KP
307FcBool
308FcConfigBuildFonts (FcConfig *config);
309
179c3995
KP
310FcStrList *
311FcConfigGetFontDirs (FcConfig *config);
312
313FcStrList *
314FcConfigGetConfigDirs (FcConfig *config);
24330d27 315
179c3995 316FcStrList *
24330d27
KP
317FcConfigGetConfigFiles (FcConfig *config);
318
ccb3e93b 319FcChar8 *
24330d27
KP
320FcConfigGetCache (FcConfig *config);
321
322FcBlanks *
323FcConfigGetBlanks (FcConfig *config);
324
179c3995
KP
325int
326FcConfigGetRescanInverval (FcConfig *config);
327
328FcBool
329FcConfigSetRescanInverval (FcConfig *config, int rescanInterval);
330
24330d27
KP
331FcFontSet *
332FcConfigGetFonts (FcConfig *config,
333 FcSetName set);
334
335FcBool
336FcConfigAppFontAddFile (FcConfig *config,
ccb3e93b 337 const FcChar8 *file);
24330d27
KP
338
339FcBool
340FcConfigAppFontAddDir (FcConfig *config,
ccb3e93b 341 const FcChar8 *dir);
24330d27
KP
342
343void
344FcConfigAppFontClear (FcConfig *config);
345
fa244f3d
KP
346FcBool
347FcConfigSubstituteWithPat (FcConfig *config,
348 FcPattern *p,
349 FcPattern *p_pat,
350 FcMatchKind kind);
351
24330d27
KP
352FcBool
353FcConfigSubstitute (FcConfig *config,
354 FcPattern *p,
355 FcMatchKind kind);
356
357/* fccharset.c */
358FcCharSet *
359FcCharSetCreate (void);
360
361void
362FcCharSetDestroy (FcCharSet *fcs);
363
364FcBool
365FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4);
366
367FcCharSet *
368FcCharSetCopy (FcCharSet *src);
369
370FcBool
371FcCharSetEqual (const FcCharSet *a, const FcCharSet *b);
372
373FcCharSet *
374FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b);
375
376FcCharSet *
377FcCharSetUnion (const FcCharSet *a, const FcCharSet *b);
378
379FcCharSet *
380FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b);
381
382FcBool
383FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4);
384
385FcChar32
386FcCharSetCount (const FcCharSet *a);
387
388FcChar32
389FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b);
390
391FcChar32
392FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b);
393
1412a699
KP
394FcBool
395FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b);
396
36732012
KP
397#define FC_CHARSET_MAP_SIZE (256/32)
398#define FC_CHARSET_DONE ((FcChar32) -1)
399
400FcChar32
401FcCharSetFirstPage (const FcCharSet *a,
402 FcChar32 map[FC_CHARSET_MAP_SIZE],
403 FcChar32 *next);
404
aae6f7d4 405FcChar32
36732012
KP
406FcCharSetNextPage (const FcCharSet *a,
407 FcChar32 map[FC_CHARSET_MAP_SIZE],
408 FcChar32 *next);
409
aae6f7d4 410
24330d27 411/* fcdbg.c */
9c8e07f1 412void
938bc633 413FcValuePrint (const FcValue v);
9c8e07f1 414
24330d27 415void
938bc633 416FcPatternPrint (const FcPattern *p);
24330d27 417
9c8e07f1 418void
938bc633 419FcFontSetPrint (const FcFontSet *s);
9c8e07f1 420
24330d27
KP
421/* fcdefault.c */
422void
423FcDefaultSubstitute (FcPattern *pattern);
424
425/* fcdir.c */
426FcBool
ccb3e93b 427FcFileScan (FcFontSet *set,
179c3995 428 FcStrSet *dirs,
ccb3e93b
KP
429 FcFileCache *cache,
430 FcBlanks *blanks,
431 const FcChar8 *file,
432 FcBool force);
24330d27
KP
433
434FcBool
ccb3e93b 435FcDirScan (FcFontSet *set,
179c3995 436 FcStrSet *dirs,
ccb3e93b
KP
437 FcFileCache *cache,
438 FcBlanks *blanks,
439 const FcChar8 *dir,
440 FcBool force);
441
442FcBool
179c3995
KP
443FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
444
24330d27
KP
445/* fcfreetype.c */
446FcPattern *
ccb3e93b 447FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
24330d27
KP
448
449/* fcfs.c */
450
451FcFontSet *
452FcFontSetCreate (void);
453
454void
455FcFontSetDestroy (FcFontSet *s);
456
457FcBool
458FcFontSetAdd (FcFontSet *s, FcPattern *font);
459
460/* fcinit.c */
179c3995
KP
461FcConfig *
462FcInitLoadConfig (void);
463
464FcConfig *
465FcInitLoadConfigAndFonts (void);
466
24330d27 467FcBool
179c3995 468FcInit (void);
24330d27 469
34cd0514
CW
470void
471FcFini (void);
472
48db40f6
KP
473int
474FcGetVersion (void);
475
24330d27 476FcBool
179c3995 477FcInitReinitialize (void);
24330d27
KP
478
479FcBool
179c3995 480FcInitBringUptoDate (void);
24330d27 481
d8d73958
KP
482/* fclang.c */
483FcLangSet *
484FcLangSetCreate (void);
485
486void
487FcLangSetDestroy (FcLangSet *ls);
488
489FcLangSet *
490FcLangSetCopy (const FcLangSet *ls);
491
492FcBool
493FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang);
494
495FcLangResult
496FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang);
497
498FcLangResult
499FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb);
500
4c2967f6
KP
501FcBool
502FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb);
503
d8d73958
KP
504FcBool
505FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb);
506
507FcChar32
508FcLangSetHash (const FcLangSet *ls);
509
24330d27
KP
510/* fclist.c */
511FcObjectSet *
512FcObjectSetCreate (void);
513
514FcBool
515FcObjectSetAdd (FcObjectSet *os, const char *object);
516
517void
518FcObjectSetDestroy (FcObjectSet *os);
519
520FcObjectSet *
521FcObjectSetVaBuild (const char *first, va_list va);
522
523FcObjectSet *
524FcObjectSetBuild (const char *first, ...);
525
80c053b7
KP
526FcFontSet *
527FcFontSetList (FcConfig *config,
528 FcFontSet **sets,
529 int nsets,
530 FcPattern *p,
531 FcObjectSet *os);
532
24330d27
KP
533FcFontSet *
534FcFontList (FcConfig *config,
535 FcPattern *p,
536 FcObjectSet *os);
537
134f6011
KP
538/* fcatomic.c */
539
540FcAtomic *
541FcAtomicCreate (const FcChar8 *file);
542
543FcBool
544FcAtomicLock (FcAtomic *atomic);
545
546FcChar8 *
547FcAtomicNewFile (FcAtomic *atomic);
548
549FcChar8 *
550FcAtomicOrigFile (FcAtomic *atomic);
551
552FcBool
553FcAtomicReplaceOrig (FcAtomic *atomic);
554
555void
556FcAtomicDeleteNew (FcAtomic *atomic);
557
558void
559FcAtomicUnlock (FcAtomic *atomic);
560
561void
562FcAtomicDestroy (FcAtomic *atomic);
563
24330d27 564/* fcmatch.c */
80c053b7
KP
565FcPattern *
566FcFontSetMatch (FcConfig *config,
567 FcFontSet **sets,
568 int nsets,
569 FcPattern *p,
570 FcResult *result);
571
24330d27
KP
572FcPattern *
573FcFontMatch (FcConfig *config,
574 FcPattern *p,
575 FcResult *result);
576
216fac98
KP
577FcPattern *
578FcFontRenderPrepare (FcConfig *config,
579 FcPattern *pat,
580 FcPattern *font);
581
582FcFontSet *
583FcFontSetSort (FcConfig *config,
584 FcFontSet **sets,
585 int nsets,
586 FcPattern *p,
587 FcBool trim,
588 FcCharSet **csp,
589 FcResult *result);
590
20ac65ab
KP
591FcFontSet *
592FcFontSort (FcConfig *config,
593 FcPattern *p,
594 FcBool trim,
595 FcCharSet **csp,
596 FcResult *result);
597
1412a699
KP
598void
599FcFontSetSortDestroy (FcFontSet *fs);
600
24330d27
KP
601/* fcmatrix.c */
602FcMatrix *
603FcMatrixCopy (const FcMatrix *mat);
604
605FcBool
606FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2);
607
608void
609FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b);
610
611void
612FcMatrixRotate (FcMatrix *m, double c, double s);
613
614void
615FcMatrixScale (FcMatrix *m, double sx, double sy);
616
617void
618FcMatrixShear (FcMatrix *m, double sh, double sv);
619
620/* fcname.c */
621
622FcBool
623FcNameRegisterObjectTypes (const FcObjectType *types, int ntype);
624
625FcBool
626FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype);
627
628const FcObjectType *
629FcNameGetObjectType (const char *object);
630
631FcBool
632FcNameRegisterConstants (const FcConstant *consts, int nconsts);
633
634FcBool
635FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
636
637const FcConstant *
ccb3e93b 638FcNameGetConstant (FcChar8 *string);
24330d27
KP
639
640FcBool
ccb3e93b 641FcNameConstant (FcChar8 *string, int *result);
24330d27
KP
642
643FcPattern *
ccb3e93b 644FcNameParse (const FcChar8 *name);
24330d27
KP
645
646FcChar8 *
647FcNameUnparse (FcPattern *pat);
648
649/* fcpat.c */
650FcPattern *
651FcPatternCreate (void);
652
653FcPattern *
bff80114 654FcPatternDuplicate (const FcPattern *p);
24330d27 655
6f6563ed
KP
656void
657FcPatternReference (FcPattern *p);
658
24330d27
KP
659void
660FcValueDestroy (FcValue v);
661
0ab36ca8
KP
662FcBool
663FcValueEqual (FcValue va, FcValue vb);
664
24330d27
KP
665FcValue
666FcValueSave (FcValue v);
667
668void
669FcPatternDestroy (FcPattern *p);
670
0ab36ca8 671FcBool
e9be9cd1
KP
672FcPatternEqual (const FcPattern *pa, const FcPattern *pb);
673
674FcBool
675FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os);
0ab36ca8 676
d0f07b8d
KP
677FcChar32
678FcPatternHash (const FcPattern *p);
679
24330d27
KP
680FcBool
681FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append);
682
82f4243f
KP
683FcBool
684FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append);
685
24330d27 686FcResult
bff80114 687FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v);
24330d27
KP
688
689FcBool
690FcPatternDel (FcPattern *p, const char *object);
691
4f27c1c0
KP
692FcBool
693FcPatternRemove (FcPattern *p, const char *object, int id);
694
24330d27
KP
695FcBool
696FcPatternAddInteger (FcPattern *p, const char *object, int i);
697
698FcBool
699FcPatternAddDouble (FcPattern *p, const char *object, double d);
700
701FcBool
ccb3e93b 702FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s);
24330d27
KP
703
704FcBool
705FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s);
706
707FcBool
708FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c);
709
710FcBool
711FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
712
d8d73958
KP
713FcBool
714FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls);
715
24330d27 716FcResult
bff80114 717FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i);
24330d27
KP
718
719FcResult
bff80114 720FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d);
24330d27
KP
721
722FcResult
bff80114 723FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s);
24330d27
KP
724
725FcResult
bff80114 726FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s);
24330d27
KP
727
728FcResult
bff80114 729FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c);
24330d27
KP
730
731FcResult
bff80114 732FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b);
24330d27 733
d8d73958 734FcResult
bff80114 735FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls);
d8d73958 736
24330d27
KP
737FcPattern *
738FcPatternVaBuild (FcPattern *orig, va_list va);
739
740FcPattern *
741FcPatternBuild (FcPattern *orig, ...);
742
743/* fcstr.c */
744
ccb3e93b
KP
745FcChar8 *
746FcStrCopy (const FcChar8 *s);
24330d27 747
179c3995
KP
748FcChar8 *
749FcStrCopyFilename (const FcChar8 *s);
750
4c2967f6
KP
751#define FcIsUpper(c) (('A' <= (c) && (c) <= 'Z'))
752#define FcIsLower(c) (('a' <= (c) && (c) <= 'z'))
753#define FcToLower(c) (FcIsUpper(c) ? (c) - 'A' + 'a' : (c))
24330d27
KP
754
755int
ccb3e93b 756FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
24330d27 757
179c3995
KP
758int
759FcStrCmp (const FcChar8 *s1, const FcChar8 *s2);
760
d4d1e8bc
JS
761const FcChar8 *
762FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
763
764const FcChar8 *
765FcStrStr (const FcChar8 *s1, const FcChar8 *s2);
766
24330d27 767int
0f9a306e
KP
768FcUtf8ToUcs4 (const FcChar8 *src_orig,
769 FcChar32 *dst,
770 int len);
24330d27
KP
771
772FcBool
0f9a306e
KP
773FcUtf8Len (const FcChar8 *string,
774 int len,
775 int *nchar,
776 int *wchar);
24330d27 777
69937bd9
KP
778#define FC_UTF8_MAX_LEN 6
779
780int
781FcUcs4ToUtf8 (FcChar32 ucs4,
782 FcChar8 dest[FC_UTF8_MAX_LEN]);
783
784int
0f9a306e
KP
785FcUtf16ToUcs4 (const FcChar8 *src_orig,
786 FcEndian endian,
787 FcChar32 *dst,
788 int len); /* in bytes */
69937bd9
KP
789
790FcBool
0f9a306e
KP
791FcUtf16Len (const FcChar8 *string,
792 FcEndian endian,
793 int len, /* in bytes */
794 int *nchar,
795 int *wchar);
69937bd9 796
179c3995
KP
797FcChar8 *
798FcStrDirname (const FcChar8 *file);
799
800FcChar8 *
801FcStrBasename (const FcChar8 *file);
802
803FcStrSet *
804FcStrSetCreate (void);
805
806FcBool
807FcStrSetMember (FcStrSet *set, const FcChar8 *s);
808
d8d73958
KP
809FcBool
810FcStrSetEqual (FcStrSet *sa, FcStrSet *sb);
811
179c3995
KP
812FcBool
813FcStrSetAdd (FcStrSet *set, const FcChar8 *s);
814
815FcBool
816FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s);
817
818FcBool
819FcStrSetDel (FcStrSet *set, const FcChar8 *s);
820
821void
822FcStrSetDestroy (FcStrSet *set);
823
824FcStrList *
825FcStrListCreate (FcStrSet *set);
826
827FcChar8 *
828FcStrListNext (FcStrList *list);
829
830void
831FcStrListDone (FcStrList *list);
832
24330d27
KP
833/* fcxml.c */
834FcBool
ccb3e93b 835FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain);
24330d27
KP
836
837_FCFUNCPROTOEND
838
839#endif /* _FONTCONFIG_H_ */