]> git.wh0rd.org - fontconfig.git/blame - fontconfig/fontconfig.h
#ifdef out old cache stuff, replace with first version of new mmapping
[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
4afc00ca 42#define FC_MINOR 3
1cb309ad 43#define FC_REVISION 2
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 */
0c009d2b 88#define FC_SOURCE "source" /* String (deprecated) */
24330d27 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 */
46a10637 98#define FC_EMBOLDEN "embolden" /* Bool - true if emboldening needed*/
24330d27 99
f21f40f3
KP
100#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION
101#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION
24330d27
KP
102
103/* Adjust outline rasterizer */
104#define FC_CHAR_WIDTH "charwidth" /* Int */
105#define FC_CHAR_HEIGHT "charheight"/* Int */
106#define FC_MATRIX "matrix" /* FcMatrix */
107
81fa16c3
KP
108#define FC_WEIGHT_THIN 0
109#define FC_WEIGHT_EXTRALIGHT 40
110#define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT
111#define FC_WEIGHT_LIGHT 50
ad293de0 112#define FC_WEIGHT_BOOK 75
81fa16c3
KP
113#define FC_WEIGHT_REGULAR 80
114#define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR
115#define FC_WEIGHT_MEDIUM 100
116#define FC_WEIGHT_DEMIBOLD 180
117#define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD
118#define FC_WEIGHT_BOLD 200
119#define FC_WEIGHT_EXTRABOLD 205
3f7653c2 120#define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD
81fa16c3 121#define FC_WEIGHT_BLACK 210
3f7653c2 122#define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK
81fa16c3
KP
123
124#define FC_SLANT_ROMAN 0
125#define FC_SLANT_ITALIC 100
126#define FC_SLANT_OBLIQUE 110
127
128#define FC_WIDTH_ULTRACONDENSED 50
129#define FC_WIDTH_EXTRACONDENSED 63
130#define FC_WIDTH_CONDENSED 75
131#define FC_WIDTH_SEMICONDENSED 87
132#define FC_WIDTH_NORMAL 100
133#define FC_WIDTH_SEMIEXPANDED 113
134#define FC_WIDTH_EXPANDED 125
135#define FC_WIDTH_EXTRAEXPANDED 150
136#define FC_WIDTH_ULTRAEXPANDED 200
137
138#define FC_PROPORTIONAL 0
a05d257f 139#define FC_DUAL 90
81fa16c3
KP
140#define FC_MONO 100
141#define FC_CHARCELL 110
24330d27
KP
142
143/* sub-pixel order */
1852d490 144#define FC_RGBA_UNKNOWN 0
24330d27
KP
145#define FC_RGBA_RGB 1
146#define FC_RGBA_BGR 2
147#define FC_RGBA_VRGB 3
148#define FC_RGBA_VBGR 4
1852d490 149#define FC_RGBA_NONE 5
24330d27 150
f077d662
OT
151/* hinting style */
152#define FC_HINT_NONE 0
153#define FC_HINT_SLIGHT 1
154#define FC_HINT_MEDIUM 2
155#define FC_HINT_FULL 3
156
24330d27
KP
157typedef enum _FcType {
158 FcTypeVoid,
159 FcTypeInteger,
160 FcTypeDouble,
161 FcTypeString,
162 FcTypeBool,
163 FcTypeMatrix,
be094850 164 FcTypeCharSet,
d8d73958
KP
165 FcTypeFTFace,
166 FcTypeLangSet
24330d27
KP
167} FcType;
168
169typedef struct _FcMatrix {
170 double xx, xy, yx, yy;
171} FcMatrix;
172
173#define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \
174 (m)->xy = (m)->yx = 0)
175
176/*
177 * A data structure to represent the available glyphs in a font.
178 * This is represented as a sparse boolean btree.
179 */
180
181typedef struct _FcCharSet FcCharSet;
182
183typedef struct _FcObjectType {
184 const char *object;
185 FcType type;
186} FcObjectType;
187
188typedef struct _FcConstant {
ccb3e93b 189 const FcChar8 *name;
24330d27
KP
190 const char *object;
191 int value;
192} FcConstant;
193
194typedef enum _FcResult {
ec0c740e 195 FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId,
3d1ea0e5 196 FcResultOutOfMemory
24330d27
KP
197} FcResult;
198
cd2ec1a9
PL
199typedef enum _FcStorage {
200 FcStorageStatic, FcStorageDynamic
201} FcStorage;
202
938bc633
KP
203typedef struct _FcPattern FcPattern;
204
d8d73958
KP
205typedef struct _FcLangSet FcLangSet;
206
cd2ec1a9
PL
207typedef struct _FcMatrixPtr {
208 FcStorage storage;
209 union {
210 int stat;
211 FcMatrix *dyn;
212 } u;
213} FcMatrixPtr;
214
215typedef struct _FcCharSetPtr {
216 FcStorage storage;
217 union {
218 int stat;
219 FcCharSet *dyn;
220 } u;
221} FcCharSetPtr;
222
223typedef struct _FcLangSetPtr {
224 FcStorage storage;
225 union {
226 int stat;
227 FcLangSet *dyn;
228 } u;
229} FcLangSetPtr;
230
0fa680f0 231typedef int FcObjectPtr;
cd2ec1a9 232
24330d27
KP
233typedef struct _FcValue {
234 FcType type;
235 union {
cd2ec1a9 236 FcObjectPtr si;
24330d27
KP
237 int i;
238 FcBool b;
239 double d;
cd2ec1a9
PL
240 FcMatrixPtr mi;
241 FcCharSetPtr ci;
be094850 242 void *f;
938bc633 243 const FcPattern *p;
cd2ec1a9 244 FcLangSetPtr li;
24330d27
KP
245 } u;
246} FcValue;
247
24330d27
KP
248typedef struct _FcFontSet {
249 int nfont;
250 int sfont;
251 FcPattern **fonts;
252} FcFontSet;
253
254typedef struct _FcObjectSet {
255 int nobject;
256 int sobject;
cd2ec1a9 257 FcObjectPtr *objects;
24330d27
KP
258} FcObjectSet;
259
260typedef enum _FcMatchKind {
938bc633 261 FcMatchPattern, FcMatchFont
24330d27
KP
262} FcMatchKind;
263
d8d73958
KP
264typedef enum _FcLangResult {
265 FcLangEqual, FcLangDifferentCountry, FcLangDifferentLang
266} FcLangResult;
267
24330d27
KP
268typedef enum _FcSetName {
269 FcSetSystem = 0,
270 FcSetApplication = 1
271} FcSetName;
272
134f6011
KP
273typedef struct _FcAtomic FcAtomic;
274
24330d27
KP
275#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
276#define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
277#define _FCFUNCPROTOEND }
278#else
279#define _FCFUNCPROTOBEGIN
280#define _FCFUNCPROTOEND
281#endif
282
69937bd9
KP
283typedef enum { FcEndianBig, FcEndianLittle } FcEndian;
284
24330d27
KP
285typedef struct _FcConfig FcConfig;
286
327a7fd4 287typedef struct _FcGlobalCache FcFileCache;
24330d27
KP
288
289typedef struct _FcBlanks FcBlanks;
290
179c3995
KP
291typedef struct _FcStrList FcStrList;
292
293typedef struct _FcStrSet FcStrSet;
294
24330d27
KP
295_FCFUNCPROTOBEGIN
296
c2e9d024
MALF
297FcBool
298FcDirCacheValid (const FcChar8 *cache_file);
299
24330d27
KP
300/* fcblanks.c */
301FcBlanks *
302FcBlanksCreate (void);
303
304void
305FcBlanksDestroy (FcBlanks *b);
306
307FcBool
308FcBlanksAdd (FcBlanks *b, FcChar32 ucs4);
309
310FcBool
311FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
312
313/* fccfg.c */
ff3f1f98
KP
314FcChar8 *
315FcConfigHome (void);
316
317FcBool
318FcConfigEnableHome (FcBool enable);
319
ccb3e93b
KP
320FcChar8 *
321FcConfigFilename (const FcChar8 *url);
24330d27
KP
322
323FcConfig *
324FcConfigCreate (void);
325
326void
327FcConfigDestroy (FcConfig *config);
328
329FcBool
330FcConfigSetCurrent (FcConfig *config);
331
332FcConfig *
333FcConfigGetCurrent (void);
334
179c3995
KP
335FcBool
336FcConfigUptoDate (FcConfig *config);
337
24330d27
KP
338FcBool
339FcConfigBuildFonts (FcConfig *config);
340
179c3995
KP
341FcStrList *
342FcConfigGetFontDirs (FcConfig *config);
343
344FcStrList *
345FcConfigGetConfigDirs (FcConfig *config);
24330d27 346
179c3995 347FcStrList *
24330d27
KP
348FcConfigGetConfigFiles (FcConfig *config);
349
ccb3e93b 350FcChar8 *
24330d27
KP
351FcConfigGetCache (FcConfig *config);
352
353FcBlanks *
354FcConfigGetBlanks (FcConfig *config);
355
179c3995
KP
356int
357FcConfigGetRescanInverval (FcConfig *config);
358
359FcBool
360FcConfigSetRescanInverval (FcConfig *config, int rescanInterval);
361
24330d27
KP
362FcFontSet *
363FcConfigGetFonts (FcConfig *config,
364 FcSetName set);
365
366FcBool
367FcConfigAppFontAddFile (FcConfig *config,
ccb3e93b 368 const FcChar8 *file);
24330d27
KP
369
370FcBool
371FcConfigAppFontAddDir (FcConfig *config,
ccb3e93b 372 const FcChar8 *dir);
24330d27
KP
373
374void
375FcConfigAppFontClear (FcConfig *config);
376
fa244f3d
KP
377FcBool
378FcConfigSubstituteWithPat (FcConfig *config,
379 FcPattern *p,
380 FcPattern *p_pat,
381 FcMatchKind kind);
382
24330d27
KP
383FcBool
384FcConfigSubstitute (FcConfig *config,
385 FcPattern *p,
386 FcMatchKind kind);
387
388/* fccharset.c */
389FcCharSet *
390FcCharSetCreate (void);
391
392void
393FcCharSetDestroy (FcCharSet *fcs);
394
395FcBool
396FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4);
397
398FcCharSet *
399FcCharSetCopy (FcCharSet *src);
400
401FcBool
402FcCharSetEqual (const FcCharSet *a, const FcCharSet *b);
403
404FcCharSet *
405FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b);
406
407FcCharSet *
408FcCharSetUnion (const FcCharSet *a, const FcCharSet *b);
409
410FcCharSet *
411FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b);
412
413FcBool
414FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4);
415
416FcChar32
417FcCharSetCount (const FcCharSet *a);
418
419FcChar32
420FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b);
421
422FcChar32
423FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b);
424
1412a699
KP
425FcBool
426FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b);
427
36732012
KP
428#define FC_CHARSET_MAP_SIZE (256/32)
429#define FC_CHARSET_DONE ((FcChar32) -1)
430
431FcChar32
432FcCharSetFirstPage (const FcCharSet *a,
433 FcChar32 map[FC_CHARSET_MAP_SIZE],
434 FcChar32 *next);
435
aae6f7d4 436FcChar32
36732012
KP
437FcCharSetNextPage (const FcCharSet *a,
438 FcChar32 map[FC_CHARSET_MAP_SIZE],
439 FcChar32 *next);
440
aae6f7d4 441
24330d27 442/* fcdbg.c */
9c8e07f1 443void
938bc633 444FcValuePrint (const FcValue v);
9c8e07f1 445
24330d27 446void
938bc633 447FcPatternPrint (const FcPattern *p);
24330d27 448
9c8e07f1 449void
938bc633 450FcFontSetPrint (const FcFontSet *s);
9c8e07f1 451
24330d27
KP
452/* fcdefault.c */
453void
454FcDefaultSubstitute (FcPattern *pattern);
455
456/* fcdir.c */
457FcBool
ccb3e93b 458FcFileScan (FcFontSet *set,
179c3995 459 FcStrSet *dirs,
ccb3e93b
KP
460 FcFileCache *cache,
461 FcBlanks *blanks,
462 const FcChar8 *file,
463 FcBool force);
24330d27
KP
464
465FcBool
ccb3e93b 466FcDirScan (FcFontSet *set,
179c3995 467 FcStrSet *dirs,
ccb3e93b
KP
468 FcFileCache *cache,
469 FcBlanks *blanks,
470 const FcChar8 *dir,
471 FcBool force);
472
473FcBool
179c3995
KP
474FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
475
24330d27
KP
476/* fcfreetype.c */
477FcPattern *
ccb3e93b 478FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
24330d27
KP
479
480/* fcfs.c */
481
482FcFontSet *
483FcFontSetCreate (void);
484
485void
486FcFontSetDestroy (FcFontSet *s);
487
488FcBool
489FcFontSetAdd (FcFontSet *s, FcPattern *font);
490
491/* fcinit.c */
179c3995
KP
492FcConfig *
493FcInitLoadConfig (void);
494
495FcConfig *
496FcInitLoadConfigAndFonts (void);
497
24330d27 498FcBool
179c3995 499FcInit (void);
24330d27 500
34cd0514
CW
501void
502FcFini (void);
503
48db40f6
KP
504int
505FcGetVersion (void);
506
24330d27 507FcBool
179c3995 508FcInitReinitialize (void);
24330d27
KP
509
510FcBool
179c3995 511FcInitBringUptoDate (void);
24330d27 512
d8d73958
KP
513/* fclang.c */
514FcLangSet *
515FcLangSetCreate (void);
516
517void
518FcLangSetDestroy (FcLangSet *ls);
519
520FcLangSet *
521FcLangSetCopy (const FcLangSet *ls);
522
523FcBool
524FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang);
525
526FcLangResult
527FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang);
528
529FcLangResult
530FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb);
531
4c2967f6
KP
532FcBool
533FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb);
534
d8d73958
KP
535FcBool
536FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb);
537
538FcChar32
539FcLangSetHash (const FcLangSet *ls);
540
24330d27
KP
541/* fclist.c */
542FcObjectSet *
543FcObjectSetCreate (void);
544
545FcBool
546FcObjectSetAdd (FcObjectSet *os, const char *object);
547
548void
549FcObjectSetDestroy (FcObjectSet *os);
550
551FcObjectSet *
552FcObjectSetVaBuild (const char *first, va_list va);
553
554FcObjectSet *
555FcObjectSetBuild (const char *first, ...);
556
80c053b7
KP
557FcFontSet *
558FcFontSetList (FcConfig *config,
559 FcFontSet **sets,
560 int nsets,
561 FcPattern *p,
562 FcObjectSet *os);
563
24330d27
KP
564FcFontSet *
565FcFontList (FcConfig *config,
566 FcPattern *p,
567 FcObjectSet *os);
568
134f6011
KP
569/* fcatomic.c */
570
571FcAtomic *
572FcAtomicCreate (const FcChar8 *file);
573
574FcBool
575FcAtomicLock (FcAtomic *atomic);
576
577FcChar8 *
578FcAtomicNewFile (FcAtomic *atomic);
579
580FcChar8 *
581FcAtomicOrigFile (FcAtomic *atomic);
582
583FcBool
584FcAtomicReplaceOrig (FcAtomic *atomic);
585
586void
587FcAtomicDeleteNew (FcAtomic *atomic);
588
589void
590FcAtomicUnlock (FcAtomic *atomic);
591
592void
593FcAtomicDestroy (FcAtomic *atomic);
594
24330d27 595/* fcmatch.c */
80c053b7
KP
596FcPattern *
597FcFontSetMatch (FcConfig *config,
598 FcFontSet **sets,
599 int nsets,
600 FcPattern *p,
601 FcResult *result);
602
24330d27
KP
603FcPattern *
604FcFontMatch (FcConfig *config,
605 FcPattern *p,
606 FcResult *result);
607
216fac98
KP
608FcPattern *
609FcFontRenderPrepare (FcConfig *config,
610 FcPattern *pat,
611 FcPattern *font);
612
613FcFontSet *
614FcFontSetSort (FcConfig *config,
615 FcFontSet **sets,
616 int nsets,
617 FcPattern *p,
618 FcBool trim,
619 FcCharSet **csp,
620 FcResult *result);
621
20ac65ab
KP
622FcFontSet *
623FcFontSort (FcConfig *config,
624 FcPattern *p,
625 FcBool trim,
626 FcCharSet **csp,
627 FcResult *result);
628
1412a699
KP
629void
630FcFontSetSortDestroy (FcFontSet *fs);
631
24330d27
KP
632/* fcmatrix.c */
633FcMatrix *
634FcMatrixCopy (const FcMatrix *mat);
635
636FcBool
637FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2);
638
639void
640FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b);
641
642void
643FcMatrixRotate (FcMatrix *m, double c, double s);
644
645void
646FcMatrixScale (FcMatrix *m, double sx, double sy);
647
648void
649FcMatrixShear (FcMatrix *m, double sh, double sv);
650
cd2ec1a9
PL
651FcMatrix *
652FcMatrixPtrU (FcMatrixPtr mi);
653
24330d27
KP
654/* fcname.c */
655
656FcBool
657FcNameRegisterObjectTypes (const FcObjectType *types, int ntype);
658
659FcBool
660FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype);
661
662const FcObjectType *
663FcNameGetObjectType (const char *object);
664
665FcBool
666FcNameRegisterConstants (const FcConstant *consts, int nconsts);
667
668FcBool
669FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
670
671const FcConstant *
ccb3e93b 672FcNameGetConstant (FcChar8 *string);
24330d27
KP
673
674FcBool
ccb3e93b 675FcNameConstant (FcChar8 *string, int *result);
24330d27
KP
676
677FcPattern *
ccb3e93b 678FcNameParse (const FcChar8 *name);
24330d27
KP
679
680FcChar8 *
681FcNameUnparse (FcPattern *pat);
682
683/* fcpat.c */
684FcPattern *
685FcPatternCreate (void);
686
687FcPattern *
bff80114 688FcPatternDuplicate (const FcPattern *p);
24330d27 689
6f6563ed
KP
690void
691FcPatternReference (FcPattern *p);
692
24330d27
KP
693void
694FcValueDestroy (FcValue v);
695
0ab36ca8
KP
696FcBool
697FcValueEqual (FcValue va, FcValue vb);
698
24330d27
KP
699FcValue
700FcValueSave (FcValue v);
701
702void
703FcPatternDestroy (FcPattern *p);
704
0ab36ca8 705FcBool
e9be9cd1
KP
706FcPatternEqual (const FcPattern *pa, const FcPattern *pb);
707
708FcBool
709FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os);
0ab36ca8 710
d0f07b8d
KP
711FcChar32
712FcPatternHash (const FcPattern *p);
713
24330d27
KP
714FcBool
715FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append);
716
82f4243f
KP
717FcBool
718FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append);
719
24330d27 720FcResult
bff80114 721FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v);
24330d27
KP
722
723FcBool
724FcPatternDel (FcPattern *p, const char *object);
725
4f27c1c0
KP
726FcBool
727FcPatternRemove (FcPattern *p, const char *object, int id);
728
24330d27
KP
729FcBool
730FcPatternAddInteger (FcPattern *p, const char *object, int i);
731
732FcBool
733FcPatternAddDouble (FcPattern *p, const char *object, double d);
734
735FcBool
ccb3e93b 736FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s);
24330d27
KP
737
738FcBool
739FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s);
740
741FcBool
742FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c);
743
744FcBool
745FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
746
d8d73958
KP
747FcBool
748FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls);
749
24330d27 750FcResult
bff80114 751FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i);
24330d27
KP
752
753FcResult
bff80114 754FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d);
24330d27
KP
755
756FcResult
bff80114 757FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s);
24330d27
KP
758
759FcResult
bff80114 760FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s);
24330d27
KP
761
762FcResult
bff80114 763FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c);
24330d27
KP
764
765FcResult
bff80114 766FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b);
24330d27 767
d8d73958 768FcResult
bff80114 769FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls);
d8d73958 770
24330d27
KP
771FcPattern *
772FcPatternVaBuild (FcPattern *orig, va_list va);
773
774FcPattern *
775FcPatternBuild (FcPattern *orig, ...);
776
777/* fcstr.c */
778
ccb3e93b
KP
779FcChar8 *
780FcStrCopy (const FcChar8 *s);
24330d27 781
179c3995
KP
782FcChar8 *
783FcStrCopyFilename (const FcChar8 *s);
784
479f551f
KP
785/* These are ASCII only, suitable only for pattern element names */
786#define FcIsUpper(c) ((0101 <= (c) && (c) <= 0132))
787#define FcIsLower(c) ((0141 <= (c) && (c) <= 0172))
788#define FcToLower(c) (FcIsUpper(c) ? (c) - 0101 + 0141 : (c))
789
790FcChar8 *
791FcStrDowncase (const FcChar8 *s);
24330d27
KP
792
793int
ccb3e93b 794FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
24330d27 795
179c3995
KP
796int
797FcStrCmp (const FcChar8 *s1, const FcChar8 *s2);
798
d4d1e8bc
JS
799const FcChar8 *
800FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
801
802const FcChar8 *
803FcStrStr (const FcChar8 *s1, const FcChar8 *s2);
804
24330d27 805int
0f9a306e
KP
806FcUtf8ToUcs4 (const FcChar8 *src_orig,
807 FcChar32 *dst,
808 int len);
24330d27
KP
809
810FcBool
0f9a306e
KP
811FcUtf8Len (const FcChar8 *string,
812 int len,
813 int *nchar,
814 int *wchar);
24330d27 815
69937bd9
KP
816#define FC_UTF8_MAX_LEN 6
817
818int
819FcUcs4ToUtf8 (FcChar32 ucs4,
820 FcChar8 dest[FC_UTF8_MAX_LEN]);
821
822int
0f9a306e
KP
823FcUtf16ToUcs4 (const FcChar8 *src_orig,
824 FcEndian endian,
825 FcChar32 *dst,
826 int len); /* in bytes */
69937bd9
KP
827
828FcBool
0f9a306e
KP
829FcUtf16Len (const FcChar8 *string,
830 FcEndian endian,
831 int len, /* in bytes */
832 int *nchar,
833 int *wchar);
69937bd9 834
179c3995
KP
835FcChar8 *
836FcStrDirname (const FcChar8 *file);
837
838FcChar8 *
839FcStrBasename (const FcChar8 *file);
840
841FcStrSet *
842FcStrSetCreate (void);
843
844FcBool
845FcStrSetMember (FcStrSet *set, const FcChar8 *s);
846
d8d73958
KP
847FcBool
848FcStrSetEqual (FcStrSet *sa, FcStrSet *sb);
849
179c3995
KP
850FcBool
851FcStrSetAdd (FcStrSet *set, const FcChar8 *s);
852
853FcBool
854FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s);
855
856FcBool
857FcStrSetDel (FcStrSet *set, const FcChar8 *s);
858
859void
860FcStrSetDestroy (FcStrSet *set);
861
862FcStrList *
863FcStrListCreate (FcStrSet *set);
864
865FcChar8 *
866FcStrListNext (FcStrList *list);
867
868void
869FcStrListDone (FcStrList *list);
870
24330d27
KP
871/* fcxml.c */
872FcBool
ccb3e93b 873FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain);
24330d27
KP
874
875_FCFUNCPROTOEND
876
877#endif /* _FONTCONFIG_H_ */