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