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