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