5b661c7c7bc3e80fdb4ba22808aa8ef6f5f47031
[platform/core/uifw/dali-adaptor.git] / dali-windows-backend / ExInclude / fontconfig / fontconfig.h
1 /*
2  * fontconfig/fontconfig/fontconfig.h
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 the author(s) not be used in
11  * advertising or publicity pertaining to distribution of the software without
12  * specific, written prior permission.  The authors make 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  * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18  * EVENT SHALL THE AUTHOR(S) 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 <sys/types.h>
29 #include <sys/stat.h>
30 #include <stdarg.h>
31
32 #if defined(__GNUC__) && (__GNUC__ >= 4)
33 #define FC_ATTRIBUTE_SENTINEL(x) __attribute__((__sentinel__(0)))
34 #else
35 #define FC_ATTRIBUTE_SENTINEL(x)
36 #endif
37
38 #ifndef FcPublic
39 #define FcPublic
40 #endif
41
42 typedef unsigned char   FcChar8;
43 typedef unsigned short  FcChar16;
44 typedef unsigned int    FcChar32;
45 typedef int             FcBool;
46
47 /*
48  * Current Fontconfig version number.  This same number
49  * must appear in the fontconfig configure.in file. Yes,
50  * it'a a pain to synchronize version numbers like this.
51  */
52
53 #define FC_MAJOR        2
54 #define FC_MINOR        12
55 #define FC_REVISION     1
56
57 #define FC_VERSION      ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
58
59 /*
60  * Current font cache file format version
61  * This is appended to the cache files so that multiple
62  * versions of the library will peacefully coexist
63  *
64  * Change this value whenever the disk format for the cache file
65  * changes in any non-compatible way.  Try to avoid such changes as
66  * it means multiple copies of the font information.
67  */
68
69 #define FC_CACHE_VERSION_NUMBER 7
70 #define _FC_STRINGIFY_(s)       #s
71 #define _FC_STRINGIFY(s)        _FC_STRINGIFY_(s)
72 #define FC_CACHE_VERSION        _FC_STRINGIFY(FC_CACHE_VERSION_NUMBER)
73
74 #define FcTrue          1
75 #define FcFalse         0
76
77 #define FC_FAMILY           "family"            /* String */
78 #define FC_STYLE            "style"             /* String */
79 #define FC_SLANT            "slant"             /* Int */
80 #define FC_WEIGHT           "weight"            /* Int */
81 #define FC_SIZE             "size"              /* Range (double) */
82 #define FC_ASPECT           "aspect"            /* Double */
83 #define FC_PIXEL_SIZE       "pixelsize"         /* Double */
84 #define FC_SPACING          "spacing"           /* Int */
85 #define FC_FOUNDRY          "foundry"           /* String */
86 #define FC_ANTIALIAS        "antialias"         /* Bool (depends) */
87 #define FC_HINTING          "hinting"           /* Bool (true) */
88 #define FC_HINT_STYLE       "hintstyle"         /* Int */
89 #define FC_VERTICAL_LAYOUT  "verticallayout"    /* Bool (false) */
90 #define FC_AUTOHINT         "autohint"          /* Bool (false) */
91 /* FC_GLOBAL_ADVANCE is deprecated. this is simply ignored on freetype 2.4.5 or later */
92 #define FC_GLOBAL_ADVANCE   "globaladvance"     /* Bool (true) */
93 #define FC_WIDTH            "width"             /* Int */
94 #define FC_FILE             "file"              /* String */
95 #define FC_INDEX            "index"             /* Int */
96 #define FC_FT_FACE          "ftface"            /* FT_Face */
97 #define FC_RASTERIZER       "rasterizer"        /* String (deprecated) */
98 #define FC_OUTLINE          "outline"           /* Bool */
99 #define FC_SCALABLE         "scalable"          /* Bool */
100 #define FC_COLOR            "color"             /* Bool */
101 #define FC_SCALE            "scale"             /* double (deprecated) */
102 #define FC_SYMBOL           "symbol"            /* Bool */
103 #define FC_DPI              "dpi"               /* double */
104 #define FC_RGBA             "rgba"              /* Int */
105 #define FC_MINSPACE         "minspace"          /* Bool use minimum line spacing */
106 #define FC_SOURCE           "source"            /* String (deprecated) */
107 #define FC_CHARSET          "charset"           /* CharSet */
108 #define FC_LANG             "lang"              /* String RFC 3066 langs */
109 #define FC_FONTVERSION      "fontversion"       /* Int from 'head' table */
110 #define FC_FULLNAME         "fullname"          /* String */
111 #define FC_FAMILYLANG       "familylang"        /* String RFC 3066 langs */
112 #define FC_STYLELANG        "stylelang"         /* String RFC 3066 langs */
113 #define FC_FULLNAMELANG     "fullnamelang"      /* String RFC 3066 langs */
114 #define FC_CAPABILITY       "capability"        /* String */
115 #define FC_FONTFORMAT       "fontformat"        /* String */
116 #define FC_EMBOLDEN         "embolden"          /* Bool - true if emboldening needed*/
117 #define FC_EMBEDDED_BITMAP  "embeddedbitmap"    /* Bool - true to enable embedded bitmaps */
118 #define FC_DECORATIVE       "decorative"        /* Bool - true if style is a decorative variant */
119 #define FC_LCD_FILTER       "lcdfilter"         /* Int */
120 #define FC_FONT_FEATURES    "fontfeatures"      /* String */
121 #define FC_NAMELANG         "namelang"          /* String RFC 3866 langs */
122 #define FC_PRGNAME          "prgname"           /* String */
123 #define FC_HASH             "hash"              /* String (deprecated) */
124 #define FC_POSTSCRIPT_NAME  "postscriptname"    /* String */
125
126 #define FC_CACHE_SUFFIX             ".cache-" FC_CACHE_VERSION
127 #define FC_DIR_CACHE_FILE           "fonts.cache-" FC_CACHE_VERSION
128 #define FC_USER_CACHE_FILE          ".fonts.cache-" FC_CACHE_VERSION
129
130 /* Adjust outline rasterizer */
131 #define FC_CHAR_WIDTH       "charwidth" /* Int */
132 #define FC_CHAR_HEIGHT      "charheight"/* Int */
133 #define FC_MATRIX           "matrix"    /* FcMatrix */
134
135 #define FC_WEIGHT_THIN              0
136 #define FC_WEIGHT_EXTRALIGHT        40
137 #define FC_WEIGHT_ULTRALIGHT        FC_WEIGHT_EXTRALIGHT
138 #define FC_WEIGHT_LIGHT             50
139 #define FC_WEIGHT_DEMILIGHT         55
140 #define FC_WEIGHT_SEMILIGHT         FC_WEIGHT_DEMILIGHT
141 #define FC_WEIGHT_BOOK              75
142 #define FC_WEIGHT_REGULAR           80
143 #define FC_WEIGHT_NORMAL            FC_WEIGHT_REGULAR
144 #define FC_WEIGHT_MEDIUM            100
145 #define FC_WEIGHT_DEMIBOLD          180
146 #define FC_WEIGHT_SEMIBOLD          FC_WEIGHT_DEMIBOLD
147 #define FC_WEIGHT_BOLD              200
148 #define FC_WEIGHT_EXTRABOLD         205
149 #define FC_WEIGHT_ULTRABOLD         FC_WEIGHT_EXTRABOLD
150 #define FC_WEIGHT_BLACK             210
151 #define FC_WEIGHT_HEAVY             FC_WEIGHT_BLACK
152 #define FC_WEIGHT_EXTRABLACK        215
153 #define FC_WEIGHT_ULTRABLACK        FC_WEIGHT_EXTRABLACK
154
155 #define FC_SLANT_ROMAN              0
156 #define FC_SLANT_ITALIC             100
157 #define FC_SLANT_OBLIQUE            110
158
159 #define FC_WIDTH_ULTRACONDENSED     50
160 #define FC_WIDTH_EXTRACONDENSED     63
161 #define FC_WIDTH_CONDENSED          75
162 #define FC_WIDTH_SEMICONDENSED      87
163 #define FC_WIDTH_NORMAL             100
164 #define FC_WIDTH_SEMIEXPANDED       113
165 #define FC_WIDTH_EXPANDED           125
166 #define FC_WIDTH_EXTRAEXPANDED      150
167 #define FC_WIDTH_ULTRAEXPANDED      200
168
169 #define FC_PROPORTIONAL             0
170 #define FC_DUAL                     90
171 #define FC_MONO                     100
172 #define FC_CHARCELL                 110
173
174 /* sub-pixel order */
175 #define FC_RGBA_UNKNOWN     0
176 #define FC_RGBA_RGB         1
177 #define FC_RGBA_BGR         2
178 #define FC_RGBA_VRGB        3
179 #define FC_RGBA_VBGR        4
180 #define FC_RGBA_NONE        5
181
182 /* hinting style */
183 #define FC_HINT_NONE        0
184 #define FC_HINT_SLIGHT      1
185 #define FC_HINT_MEDIUM      2
186 #define FC_HINT_FULL        3
187
188 /* LCD filter */
189 #define FC_LCD_NONE         0
190 #define FC_LCD_DEFAULT      1
191 #define FC_LCD_LIGHT        2
192 #define FC_LCD_LEGACY       3
193
194 #define  SIZEOF_VOID_P 4
195
196 typedef enum _FcType {
197     FcTypeUnknown = -1,
198     FcTypeVoid,
199     FcTypeInteger,
200     FcTypeDouble,
201     FcTypeString,
202     FcTypeBool,
203     FcTypeMatrix,
204     FcTypeCharSet,
205     FcTypeFTFace,
206     FcTypeLangSet,
207     FcTypeRange
208 } FcType;
209
210 typedef struct _FcMatrix {
211     double xx, xy, yx, yy;
212 } FcMatrix;
213
214 #define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \
215                          (m)->xy = (m)->yx = 0)
216
217 /*
218  * A data structure to represent the available glyphs in a font.
219  * This is represented as a sparse boolean btree.
220  */
221
222 typedef struct _FcCharSet FcCharSet;
223
224 typedef struct _FcObjectType {
225     char        *object;
226     FcType      type;
227 } FcObjectType;
228
229 typedef struct _FcConstant {
230     const FcChar8  *name;
231     const char  *object;
232     int         value;
233 } FcConstant;
234
235 typedef enum _FcResult {
236     FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId,
237     FcResultOutOfMemory
238 } FcResult;
239
240 typedef struct _FcPattern   FcPattern;
241
242 typedef struct _FcLangSet   FcLangSet;
243
244 typedef struct _FcRange     FcRange;
245
246 typedef struct _FcValue {
247     FcType      type;
248     union {
249         const FcChar8   *s;
250         int             i;
251         FcBool          b;
252         double          d;
253         const FcMatrix  *m;
254         const FcCharSet *c;
255         void            *f;
256         const FcLangSet *l;
257         const FcRange   *r;
258     } u;
259 } FcValue;
260
261 typedef struct _FcFontSet {
262     int         nfont;
263     int         sfont;
264     FcPattern   **fonts;
265 } FcFontSet;
266
267 typedef struct _FcObjectSet {
268     int         nobject;
269     int         sobject;
270     const char  **objects;
271 } FcObjectSet;
272     
273 typedef enum _FcMatchKind {
274     FcMatchPattern, FcMatchFont, FcMatchScan
275 } FcMatchKind;
276
277 typedef enum _FcLangResult {
278     FcLangEqual = 0,
279     FcLangDifferentCountry = 1,
280     FcLangDifferentTerritory = 1,
281     FcLangDifferentLang = 2
282 } FcLangResult;
283
284 typedef enum _FcSetName {
285     FcSetSystem = 0,
286     FcSetApplication = 1
287 } FcSetName;
288
289 typedef struct _FcAtomic FcAtomic;
290
291 #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
292 #define _FCFUNCPROTOBEGIN extern "C" {  /* do not leave open across includes */
293 #define _FCFUNCPROTOEND }
294 #else
295 #define _FCFUNCPROTOBEGIN
296 #define _FCFUNCPROTOEND
297 #endif
298
299 typedef enum { FcEndianBig, FcEndianLittle } FcEndian;
300
301 typedef struct _FcConfig    FcConfig;
302
303 typedef struct _FcGlobalCache   FcFileCache;
304
305 typedef struct _FcBlanks    FcBlanks;
306
307 typedef struct _FcStrList   FcStrList;
308
309 typedef struct _FcStrSet    FcStrSet;
310
311 typedef struct _FcCache     FcCache;
312
313 _FCFUNCPROTOBEGIN
314
315 /* fcblanks.c */
316 FcPublic FcBlanks *
317 FcBlanksCreate (void);
318
319 FcPublic void
320 FcBlanksDestroy (FcBlanks *b);
321
322 FcPublic FcBool
323 FcBlanksAdd (FcBlanks *b, FcChar32 ucs4);
324
325 FcPublic FcBool
326 FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
327
328 /* fccache.c */
329
330 FcPublic const FcChar8 *
331 FcCacheDir(const FcCache *c);
332
333 FcPublic FcFontSet *
334 FcCacheCopySet(const FcCache *c);
335
336 FcPublic const FcChar8 *
337 FcCacheSubdir (const FcCache *c, int i);
338
339 FcPublic int
340 FcCacheNumSubdir (const FcCache *c);
341
342 FcPublic int
343 FcCacheNumFont (const FcCache *c);
344
345 FcPublic FcBool
346 FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config);
347
348 FcPublic FcBool
349 FcDirCacheValid (const FcChar8 *cache_file);
350
351 FcPublic FcBool
352 FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose);
353
354 FcPublic void
355 FcCacheCreateTagFile (const FcConfig *config);
356
357 /* fccfg.c */
358 FcPublic FcChar8 *
359 FcConfigHome (void);
360
361 FcPublic FcBool
362 FcConfigEnableHome (FcBool enable);
363
364 FcPublic FcChar8 *
365 FcConfigFilename (const FcChar8 *url);
366     
367 FcPublic FcConfig *
368 FcConfigCreate (void);
369
370 FcPublic FcConfig *
371 FcConfigReference (FcConfig *config);
372
373 FcPublic void
374 FcConfigDestroy (FcConfig *config);
375
376 FcPublic FcBool
377 FcConfigSetCurrent (FcConfig *config);
378
379 FcPublic FcConfig *
380 FcConfigGetCurrent (void);
381
382 FcPublic FcBool
383 FcConfigUptoDate (FcConfig *config);
384     
385 FcPublic FcBool
386 FcConfigBuildFonts (FcConfig *config);
387
388 FcPublic FcStrList *
389 FcConfigGetFontDirs (FcConfig   *config);
390
391 FcPublic FcStrList *
392 FcConfigGetConfigDirs (FcConfig   *config);
393
394 FcPublic FcStrList *
395 FcConfigGetConfigFiles (FcConfig    *config);
396
397 FcPublic FcChar8 *
398 FcConfigGetCache (FcConfig  *config);
399
400 FcPublic FcBlanks *
401 FcConfigGetBlanks (FcConfig *config);
402
403 FcPublic FcStrList *
404 FcConfigGetCacheDirs (const FcConfig    *config);
405
406 FcPublic int
407 FcConfigGetRescanInterval (FcConfig *config);
408
409 FcPublic FcBool
410 FcConfigSetRescanInterval (FcConfig *config, int rescanInterval);
411
412 FcPublic FcFontSet *
413 FcConfigGetFonts (FcConfig      *config,
414                   FcSetName     set);
415
416 FcPublic FcBool
417 FcConfigAppFontAddFile (FcConfig    *config,
418                         const FcChar8  *file);
419
420 FcPublic FcBool
421 FcConfigAppFontAddDir (FcConfig     *config,
422                        const FcChar8   *dir);
423
424 FcPublic void
425 FcConfigAppFontClear (FcConfig      *config);
426
427 FcPublic FcBool
428 FcConfigSubstituteWithPat (FcConfig     *config,
429                            FcPattern    *p,
430                            FcPattern    *p_pat,
431                            FcMatchKind  kind);
432
433 FcPublic FcBool
434 FcConfigSubstitute (FcConfig    *config,
435                     FcPattern   *p,
436                     FcMatchKind kind);
437
438 FcPublic const FcChar8 *
439 FcConfigGetSysRoot (const FcConfig *config);
440
441 FcPublic void
442 FcConfigSetSysRoot (FcConfig      *config,
443                     const FcChar8 *sysroot);
444
445 /* fccharset.c */
446 FcPublic FcCharSet*
447 FcCharSetCreate (void);
448
449 /* deprecated alias for FcCharSetCreate */
450 FcPublic FcCharSet *
451 FcCharSetNew (void);
452
453 FcPublic void
454 FcCharSetDestroy (FcCharSet *fcs);
455
456 FcPublic FcBool
457 FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4);
458
459 FcPublic FcBool
460 FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4);
461
462 FcPublic FcCharSet*
463 FcCharSetCopy (FcCharSet *src);
464
465 FcPublic FcBool
466 FcCharSetEqual (const FcCharSet *a, const FcCharSet *b);
467
468 FcPublic FcCharSet*
469 FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b);
470
471 FcPublic FcCharSet*
472 FcCharSetUnion (const FcCharSet *a, const FcCharSet *b);
473
474 FcPublic FcCharSet*
475 FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b);
476
477 FcPublic FcBool
478 FcCharSetMerge (FcCharSet *a, const FcCharSet *b, FcBool *changed);
479
480 FcPublic FcBool
481 FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4);
482
483 FcPublic FcChar32
484 FcCharSetCount (const FcCharSet *a);
485
486 FcPublic FcChar32
487 FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b);
488
489 FcPublic FcChar32
490 FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b);
491
492 FcPublic FcBool
493 FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b);
494
495 #define FC_CHARSET_MAP_SIZE (256/32)
496 #define FC_CHARSET_DONE ((FcChar32) -1)
497
498 FcPublic FcChar32
499 FcCharSetFirstPage (const FcCharSet *a, 
500                     FcChar32        map[FC_CHARSET_MAP_SIZE],
501                     FcChar32        *next);
502
503 FcPublic FcChar32
504 FcCharSetNextPage (const FcCharSet  *a, 
505                    FcChar32         map[FC_CHARSET_MAP_SIZE],
506                    FcChar32         *next);
507
508 /*
509  * old coverage API, rather hard to use correctly
510  */
511
512 FcPublic FcChar32
513 FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result);
514
515 /* fcdbg.c */
516 FcPublic void
517 FcValuePrint (const FcValue v);
518
519 FcPublic void
520 FcPatternPrint (const FcPattern *p);
521
522 FcPublic void
523 FcFontSetPrint (const FcFontSet *s);
524
525 /* fcdefault.c */
526 FcPublic FcStrSet *
527 FcGetDefaultLangs (void);
528
529 FcPublic void
530 FcDefaultSubstitute (FcPattern *pattern);
531
532 /* fcdir.c */
533 FcPublic FcBool
534 FcFileIsDir (const FcChar8 *file);
535
536 FcPublic FcBool
537 FcFileScan (FcFontSet       *set,
538             FcStrSet        *dirs,
539             FcFileCache     *cache,
540             FcBlanks        *blanks,
541             const FcChar8   *file,
542             FcBool          force);
543
544 FcPublic FcBool
545 FcDirScan (FcFontSet        *set,
546            FcStrSet         *dirs,
547            FcFileCache      *cache,
548            FcBlanks         *blanks,
549            const FcChar8    *dir,
550            FcBool           force);
551
552 FcPublic FcBool
553 FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
554
555 FcPublic FcCache *
556 FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file);
557
558 FcPublic FcCache *
559 FcDirCacheRescan (const FcChar8 *dir, FcConfig *config);
560     
561 FcPublic FcCache *
562 FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config);
563
564 FcPublic FcCache *
565 FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat);
566
567 FcPublic void
568 FcDirCacheUnload (FcCache *cache);
569
570 /* fcfreetype.c */
571 FcPublic FcPattern *
572 FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
573
574 /* fcfs.c */
575
576 FcPublic FcFontSet *
577 FcFontSetCreate (void);
578
579 FcPublic void
580 FcFontSetDestroy (FcFontSet *s);
581
582 FcPublic FcBool
583 FcFontSetAdd (FcFontSet *s, FcPattern *font);
584
585 /* fcinit.c */
586 FcPublic FcConfig *
587 FcInitLoadConfig (void);
588
589 FcPublic FcConfig *
590 FcInitLoadConfigAndFonts (void);
591
592 FcPublic FcBool
593 FcInit (void);
594
595 FcPublic void
596 FcFini (void);
597
598 FcPublic int
599 FcGetVersion (void);
600
601 FcPublic FcBool
602 FcInitReinitialize (void);
603
604 FcPublic FcBool
605 FcInitBringUptoDate (void);
606
607 /* fclang.c */
608 FcPublic FcStrSet *
609 FcGetLangs (void);
610
611 FcPublic FcChar8 *
612 FcLangNormalize (const FcChar8 *lang);
613
614 FcPublic const FcCharSet *
615 FcLangGetCharSet (const FcChar8 *lang);
616
617 FcPublic FcLangSet*
618 FcLangSetCreate (void);
619
620 FcPublic void
621 FcLangSetDestroy (FcLangSet *ls);
622
623 FcPublic FcLangSet*
624 FcLangSetCopy (const FcLangSet *ls);
625
626 FcPublic FcBool
627 FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang);
628
629 FcPublic FcBool
630 FcLangSetDel (FcLangSet *ls, const FcChar8 *lang);
631
632 FcPublic FcLangResult
633 FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang);
634
635 FcPublic FcLangResult
636 FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb);
637
638 FcPublic FcBool
639 FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb);
640
641 FcPublic FcBool
642 FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb);
643
644 FcPublic FcChar32
645 FcLangSetHash (const FcLangSet *ls);
646
647 FcPublic FcStrSet *
648 FcLangSetGetLangs (const FcLangSet *ls);
649
650 FcPublic FcLangSet *
651 FcLangSetUnion (const FcLangSet *a, const FcLangSet *b);
652
653 FcPublic FcLangSet *
654 FcLangSetSubtract (const FcLangSet *a, const FcLangSet *b);
655
656 /* fclist.c */
657 FcPublic FcObjectSet *
658 FcObjectSetCreate (void);
659
660 FcPublic FcBool
661 FcObjectSetAdd (FcObjectSet *os, const char *object);
662
663 FcPublic void
664 FcObjectSetDestroy (FcObjectSet *os);
665
666 FcPublic FcObjectSet *
667 FcObjectSetVaBuild (const char *first, va_list va);
668
669 FcPublic FcObjectSet *
670 FcObjectSetBuild (const char *first, ...) FC_ATTRIBUTE_SENTINEL(0);
671
672 FcPublic FcFontSet *
673 FcFontSetList (FcConfig     *config,
674                FcFontSet    **sets,
675                int          nsets,
676                FcPattern    *p,
677                FcObjectSet  *os);
678
679 FcPublic FcFontSet *
680 FcFontList (FcConfig    *config,
681             FcPattern   *p,
682             FcObjectSet *os);
683
684 /* fcatomic.c */
685
686 FcPublic FcAtomic *
687 FcAtomicCreate (const FcChar8   *file);
688
689 FcPublic FcBool
690 FcAtomicLock (FcAtomic *atomic);
691
692 FcPublic FcChar8 *
693 FcAtomicNewFile (FcAtomic *atomic);
694
695 FcPublic FcChar8 *
696 FcAtomicOrigFile (FcAtomic *atomic);
697
698 FcPublic FcBool
699 FcAtomicReplaceOrig (FcAtomic *atomic);
700
701 FcPublic void
702 FcAtomicDeleteNew (FcAtomic *atomic);
703
704 FcPublic void
705 FcAtomicUnlock (FcAtomic *atomic);
706
707 FcPublic void
708 FcAtomicDestroy (FcAtomic *atomic);
709
710 /* fcmatch.c */
711 FcPublic FcPattern *
712 FcFontSetMatch (FcConfig    *config,
713                 FcFontSet   **sets,
714                 int         nsets,
715                 FcPattern   *p,
716                 FcResult    *result);
717
718 FcPublic FcPattern *
719 FcFontMatch (FcConfig   *config,
720              FcPattern  *p, 
721              FcResult   *result);
722
723 FcPublic FcPattern *
724 FcFontRenderPrepare (FcConfig       *config,
725                      FcPattern      *pat,
726                      FcPattern      *font);
727
728 FcPublic FcFontSet *
729 FcFontSetSort (FcConfig     *config,
730                FcFontSet    **sets,
731                int          nsets,
732                FcPattern    *p,
733                FcBool       trim,
734                FcCharSet    **csp,
735                FcResult     *result);
736
737 FcPublic FcFontSet *
738 FcFontSort (FcConfig     *config,
739             FcPattern    *p,
740             FcBool       trim,
741             FcCharSet    **csp,
742             FcResult     *result);
743
744 FcPublic void
745 FcFontSetSortDestroy (FcFontSet *fs);
746
747 /* fcmatrix.c */
748 FcPublic FcMatrix *
749 FcMatrixCopy (const FcMatrix *mat);
750
751 FcPublic FcBool
752 FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2);
753
754 FcPublic void
755 FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b);
756
757 FcPublic void
758 FcMatrixRotate (FcMatrix *m, double c, double s);
759
760 FcPublic void
761 FcMatrixScale (FcMatrix *m, double sx, double sy);
762
763 FcPublic void
764 FcMatrixShear (FcMatrix *m, double sh, double sv);
765
766 /* fcname.c */
767
768 /* Deprecated.  Does nothing.  Returns FcFalse. */
769 FcPublic FcBool
770 FcNameRegisterObjectTypes (const FcObjectType *types, int ntype);
771
772 /* Deprecated.  Does nothing.  Returns FcFalse. */
773 FcPublic FcBool
774 FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype);
775
776 FcPublic const FcObjectType *
777 FcNameGetObjectType (const char *object);
778
779 /* Deprecated.  Does nothing.  Returns FcFalse. */
780 FcPublic FcBool
781 FcNameRegisterConstants (const FcConstant *consts, int nconsts);
782
783 /* Deprecated.  Does nothing.  Returns FcFalse. */
784 FcPublic FcBool
785 FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
786
787 FcPublic const FcConstant *
788 FcNameGetConstant (const FcChar8 *string);
789
790 FcPublic FcBool
791 FcNameConstant (const FcChar8 *string, int *result);
792
793 FcPublic FcPattern *
794 FcNameParse (const FcChar8 *name);
795
796 FcPublic FcChar8 *
797 FcNameUnparse (FcPattern *pat);
798
799 /* fcpat.c */
800 FcPublic FcPattern *
801 FcPatternCreate (void);
802
803 FcPublic FcPattern *
804 FcPatternDuplicate (const FcPattern *p);
805
806 FcPublic void
807 FcPatternReference (FcPattern *p);
808
809 FcPublic FcPattern *
810 FcPatternFilter (FcPattern *p, const FcObjectSet *os);
811
812 FcPublic void
813 FcValueDestroy (FcValue v);
814
815 FcPublic FcBool
816 FcValueEqual (FcValue va, FcValue vb);
817
818 FcPublic FcValue
819 FcValueSave (FcValue v);
820
821 FcPublic void
822 FcPatternDestroy (FcPattern *p);
823
824 FcPublic FcBool
825 FcPatternEqual (const FcPattern *pa, const FcPattern *pb);
826
827 FcPublic FcBool
828 FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os);
829
830 FcPublic FcChar32
831 FcPatternHash (const FcPattern *p);
832
833 FcPublic FcBool
834 FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append);
835     
836 FcPublic FcBool
837 FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append);
838     
839 FcPublic FcResult
840 FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v);
841     
842 FcPublic FcBool
843 FcPatternDel (FcPattern *p, const char *object);
844
845 FcPublic FcBool
846 FcPatternRemove (FcPattern *p, const char *object, int id);
847
848 FcPublic FcBool
849 FcPatternAddInteger (FcPattern *p, const char *object, int i);
850
851 FcPublic FcBool
852 FcPatternAddDouble (FcPattern *p, const char *object, double d);
853
854 FcPublic FcBool
855 FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s);
856
857 FcPublic FcBool
858 FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s);
859
860 FcPublic FcBool
861 FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c);
862
863 FcPublic FcBool
864 FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
865
866 FcPublic FcBool
867 FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls);
868
869 FcPublic FcBool
870 FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r);
871
872 FcPublic FcResult
873 FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i);
874
875 FcPublic FcResult
876 FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d);
877
878 FcPublic FcResult
879 FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s);
880
881 FcPublic FcResult
882 FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s);
883
884 FcPublic FcResult
885 FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c);
886
887 FcPublic FcResult
888 FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b);
889
890 FcPublic FcResult
891 FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls);
892
893 FcPublic FcResult
894 FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r);
895
896 FcPublic FcPattern *
897 FcPatternVaBuild (FcPattern *p, va_list va);
898     
899 FcPublic FcPattern *
900 FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0);
901
902 FcPublic FcChar8 *
903 FcPatternFormat (FcPattern *pat, const FcChar8 *format);
904
905 /* fcrange.c */
906 FcPublic FcRange *
907 FcRangeCreateDouble (double begin, double end);
908
909 FcPublic FcRange *
910 FcRangeCreateInteger (FcChar32 begin, FcChar32 end);
911
912 FcPublic void
913 FcRangeDestroy (FcRange *range);
914
915 FcPublic FcRange *
916 FcRangeCopy (const FcRange *r);
917
918 FcPublic FcBool
919 FcRangeGetDouble(const FcRange *range, double *begin, double *end);
920
921 /* fcweight.c */
922
923 FcPublic int
924 FcWeightFromOpenType (int ot_weight);
925
926 FcPublic int
927 FcWeightToOpenType (int fc_weight);
928
929 /* fcstr.c */
930
931 FcPublic FcChar8 *
932 FcStrCopy (const FcChar8 *s);
933
934 FcPublic FcChar8 *
935 FcStrCopyFilename (const FcChar8 *s);
936     
937 FcPublic FcChar8 *
938 FcStrPlus (const FcChar8 *s1, const FcChar8 *s2);
939     
940 FcPublic void
941 FcStrFree (FcChar8 *s);
942
943 /* These are ASCII only, suitable only for pattern element names */
944 #define FcIsUpper(c)    ((0101 <= (c) && (c) <= 0132))
945 #define FcIsLower(c)    ((0141 <= (c) && (c) <= 0172))
946 #define FcToLower(c)    (FcIsUpper(c) ? (c) - 0101 + 0141 : (c))
947
948 FcPublic FcChar8 *
949 FcStrDowncase (const FcChar8 *s);
950
951 FcPublic int
952 FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
953
954 FcPublic int
955 FcStrCmp (const FcChar8 *s1, const FcChar8 *s2);
956
957 FcPublic const FcChar8 *
958 FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
959
960 FcPublic const FcChar8 *
961 FcStrStr (const FcChar8 *s1, const FcChar8 *s2);
962
963 FcPublic int
964 FcUtf8ToUcs4 (const FcChar8 *src_orig,
965               FcChar32      *dst,
966               int           len);
967
968 FcPublic FcBool
969 FcUtf8Len (const FcChar8    *string,
970            int              len,
971            int              *nchar,
972            int              *wchar);
973
974 #define FC_UTF8_MAX_LEN 6
975
976 FcPublic int
977 FcUcs4ToUtf8 (FcChar32  ucs4,
978               FcChar8   dest[FC_UTF8_MAX_LEN]);
979
980 FcPublic int
981 FcUtf16ToUcs4 (const FcChar8    *src_orig,
982                FcEndian         endian,
983                FcChar32         *dst,
984                int              len);       /* in bytes */
985
986 FcPublic FcBool
987 FcUtf16Len (const FcChar8   *string,
988             FcEndian        endian,
989             int             len,            /* in bytes */
990             int             *nchar,
991             int             *wchar);
992
993 FcPublic FcChar8 *
994 FcStrDirname (const FcChar8 *file);
995
996 FcPublic FcChar8 *
997 FcStrBasename (const FcChar8 *file);
998
999 FcPublic FcStrSet *
1000 FcStrSetCreate (void);
1001
1002 FcPublic FcBool
1003 FcStrSetMember (FcStrSet *set, const FcChar8 *s);
1004
1005 FcPublic FcBool
1006 FcStrSetEqual (FcStrSet *sa, FcStrSet *sb);
1007
1008 FcPublic FcBool
1009 FcStrSetAdd (FcStrSet *set, const FcChar8 *s);
1010
1011 FcPublic FcBool
1012 FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s);
1013
1014 FcPublic FcBool
1015 FcStrSetDel (FcStrSet *set, const FcChar8 *s);
1016
1017 FcPublic void
1018 FcStrSetDestroy (FcStrSet *set);
1019
1020 FcPublic FcStrList *
1021 FcStrListCreate (FcStrSet *set);
1022
1023 FcPublic void
1024 FcStrListFirst (FcStrList *list);
1025
1026 FcPublic FcChar8 *
1027 FcStrListNext (FcStrList *list);
1028
1029 FcPublic void
1030 FcStrListDone (FcStrList *list);
1031
1032 /* fcxml.c */
1033 FcPublic FcBool
1034 FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain);
1035
1036 _FCFUNCPROTOEND
1037
1038 #undef FC_ATTRIBUTE_SENTINEL
1039
1040
1041 #ifndef _FCINT_H_
1042
1043 /*
1044  * Deprecated functions are placed here to help users fix their code without
1045  * digging through documentation
1046  */
1047  
1048 #define FcConfigGetRescanInverval   FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval
1049 #define FcConfigSetRescanInverval   FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval
1050
1051 #endif
1052
1053 #endif /* _FONTCONFIG_H_ */