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 11 |
55 | #define FC_REVISION 95 |
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 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 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 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 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 | typedef enum _FcType { |
195 | FcTypeUnknown = -1, |
196 | FcTypeVoid, |
197 | FcTypeInteger, |
198 | FcTypeDouble, |
199 | FcTypeString, |
200 | FcTypeBool, |
201 | FcTypeMatrix, |
202 | FcTypeCharSet, |
203 | FcTypeFTFace, |
204 | FcTypeLangSet, |
205 | FcTypeRange |
206 | } FcType; |
207 | |
208 | typedef struct _FcMatrix { |
209 | double xx, xy, yx, yy; |
210 | } FcMatrix; |
211 | |
212 | #define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \ |
213 | (m)->xy = (m)->yx = 0) |
214 | |
215 | /* |
216 | * A data structure to represent the available glyphs in a font. |
217 | * This is represented as a sparse boolean btree. |
218 | */ |
219 | |
220 | typedef struct _FcCharSet FcCharSet; |
221 | |
222 | typedef struct _FcObjectType { |
223 | char *object; |
224 | FcType type; |
225 | } FcObjectType; |
226 | |
227 | typedef struct _FcConstant { |
228 | const FcChar8 *name; |
229 | const char *object; |
230 | int value; |
231 | } FcConstant; |
232 | |
233 | typedef enum _FcResult { |
234 | FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId, |
235 | FcResultOutOfMemory |
236 | } FcResult; |
237 | |
238 | typedef struct _FcPattern FcPattern; |
239 | |
240 | typedef struct _FcLangSet FcLangSet; |
241 | |
242 | typedef struct _FcRange FcRange; |
243 | |
244 | typedef struct _FcValue { |
245 | FcType type; |
246 | union { |
247 | const FcChar8 *s; |
248 | int i; |
249 | FcBool b; |
250 | double d; |
251 | const FcMatrix *m; |
252 | const FcCharSet *c; |
253 | void *f; |
254 | const FcLangSet *l; |
255 | const FcRange *r; |
256 | } u; |
257 | } FcValue; |
258 | |
259 | typedef struct _FcFontSet { |
260 | int nfont; |
261 | int sfont; |
262 | FcPattern **fonts; |
263 | } FcFontSet; |
264 | |
265 | typedef struct _FcObjectSet { |
266 | int nobject; |
267 | int sobject; |
268 | const char **objects; |
269 | } FcObjectSet; |
270 | |
271 | typedef enum _FcMatchKind { |
272 | FcMatchPattern, FcMatchFont, FcMatchScan |
273 | } FcMatchKind; |
274 | |
275 | typedef enum _FcLangResult { |
276 | FcLangEqual = 0, |
277 | FcLangDifferentCountry = 1, |
278 | FcLangDifferentTerritory = 1, |
279 | FcLangDifferentLang = 2 |
280 | } FcLangResult; |
281 | |
282 | typedef enum _FcSetName { |
283 | FcSetSystem = 0, |
284 | FcSetApplication = 1 |
285 | } FcSetName; |
286 | |
287 | typedef struct _FcAtomic FcAtomic; |
288 | |
289 | #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ |
290 | #define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ |
291 | #define _FCFUNCPROTOEND } |
292 | #else |
293 | #define _FCFUNCPROTOBEGIN |
294 | #define _FCFUNCPROTOEND |
295 | #endif |
296 | |
297 | typedef enum { FcEndianBig, FcEndianLittle } FcEndian; |
298 | |
299 | typedef struct _FcConfig FcConfig; |
300 | |
301 | typedef struct _FcGlobalCache FcFileCache; |
302 | |
303 | typedef struct _FcBlanks FcBlanks; |
304 | |
305 | typedef struct _FcStrList FcStrList; |
306 | |
307 | typedef struct _FcStrSet FcStrSet; |
308 | |
309 | typedef struct _FcCache FcCache; |
310 | |
311 | _FCFUNCPROTOBEGIN |
312 | |
313 | /* fcblanks.c */ |
314 | FcPublic FcBlanks * |
315 | FcBlanksCreate (void); |
316 | |
317 | FcPublic void |
318 | FcBlanksDestroy (FcBlanks *b); |
319 | |
320 | FcPublic FcBool |
321 | FcBlanksAdd (FcBlanks *b, FcChar32 ucs4); |
322 | |
323 | FcPublic FcBool |
324 | FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4); |
325 | |
326 | /* fccache.c */ |
327 | |
328 | FcPublic const FcChar8 * |
329 | FcCacheDir(const FcCache *c); |
330 | |
331 | FcPublic FcFontSet * |
332 | FcCacheCopySet(const FcCache *c); |
333 | |
334 | FcPublic const FcChar8 * |
335 | FcCacheSubdir (const FcCache *c, int i); |
336 | |
337 | FcPublic int |
338 | FcCacheNumSubdir (const FcCache *c); |
339 | |
340 | FcPublic int |
341 | FcCacheNumFont (const FcCache *c); |
342 | |
343 | FcPublic FcBool |
344 | FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config); |
345 | |
346 | FcPublic FcBool |
347 | FcDirCacheValid (const FcChar8 *cache_file); |
348 | |
349 | FcPublic FcBool |
350 | FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose); |
351 | |
352 | FcPublic void |
353 | FcCacheCreateTagFile (const FcConfig *config); |
354 | |
355 | /* fccfg.c */ |
356 | FcPublic FcChar8 * |
357 | FcConfigHome (void); |
358 | |
359 | FcPublic FcBool |
360 | FcConfigEnableHome (FcBool enable); |
361 | |
362 | FcPublic FcChar8 * |
363 | FcConfigFilename (const FcChar8 *url); |
364 | |
365 | FcPublic FcConfig * |
366 | FcConfigCreate (void); |
367 | |
368 | FcPublic FcConfig * |
369 | FcConfigReference (FcConfig *config); |
370 | |
371 | FcPublic void |
372 | FcConfigDestroy (FcConfig *config); |
373 | |
374 | FcPublic FcBool |
375 | FcConfigSetCurrent (FcConfig *config); |
376 | |
377 | FcPublic FcConfig * |
378 | FcConfigGetCurrent (void); |
379 | |
380 | FcPublic FcBool |
381 | FcConfigUptoDate (FcConfig *config); |
382 | |
383 | FcPublic FcBool |
384 | FcConfigBuildFonts (FcConfig *config); |
385 | |
386 | FcPublic FcStrList * |
387 | FcConfigGetFontDirs (FcConfig *config); |
388 | |
389 | FcPublic FcStrList * |
390 | FcConfigGetConfigDirs (FcConfig *config); |
391 | |
392 | FcPublic FcStrList * |
393 | FcConfigGetConfigFiles (FcConfig *config); |
394 | |
395 | FcPublic FcChar8 * |
396 | FcConfigGetCache (FcConfig *config); |
397 | |
398 | FcPublic FcBlanks * |
399 | FcConfigGetBlanks (FcConfig *config); |
400 | |
401 | FcPublic FcStrList * |
402 | FcConfigGetCacheDirs (const FcConfig *config); |
403 | |
404 | FcPublic int |
405 | FcConfigGetRescanInterval (FcConfig *config); |
406 | |
407 | FcPublic FcBool |
408 | FcConfigSetRescanInterval (FcConfig *config, int rescanInterval); |
409 | |
410 | FcPublic FcFontSet * |
411 | FcConfigGetFonts (FcConfig *config, |
412 | FcSetName set); |
413 | |
414 | FcPublic FcBool |
415 | FcConfigAppFontAddFile (FcConfig *config, |
416 | const FcChar8 *file); |
417 | |
418 | FcPublic FcBool |
419 | FcConfigAppFontAddDir (FcConfig *config, |
420 | const FcChar8 *dir); |
421 | |
422 | FcPublic void |
423 | FcConfigAppFontClear (FcConfig *config); |
424 | |
425 | FcPublic FcBool |
426 | FcConfigSubstituteWithPat (FcConfig *config, |
427 | FcPattern *p, |
428 | FcPattern *p_pat, |
429 | FcMatchKind kind); |
430 | |
431 | FcPublic FcBool |
432 | FcConfigSubstitute (FcConfig *config, |
433 | FcPattern *p, |
434 | FcMatchKind kind); |
435 | |
436 | FcPublic const FcChar8 * |
437 | FcConfigGetSysRoot (const FcConfig *config); |
438 | |
439 | FcPublic void |
440 | FcConfigSetSysRoot (FcConfig *config, |
441 | const FcChar8 *sysroot); |
442 | |
443 | /* fccharset.c */ |
444 | FcPublic FcCharSet* |
445 | FcCharSetCreate (void); |
446 | |
447 | /* deprecated alias for FcCharSetCreate */ |
448 | FcPublic FcCharSet * |
449 | FcCharSetNew (void); |
450 | |
451 | FcPublic void |
452 | FcCharSetDestroy (FcCharSet *fcs); |
453 | |
454 | FcPublic FcBool |
455 | FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4); |
456 | |
457 | FcPublic FcBool |
458 | FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4); |
459 | |
460 | FcPublic FcCharSet* |
461 | FcCharSetCopy (FcCharSet *src); |
462 | |
463 | FcPublic FcBool |
464 | FcCharSetEqual (const FcCharSet *a, const FcCharSet *b); |
465 | |
466 | FcPublic FcCharSet* |
467 | FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b); |
468 | |
469 | FcPublic FcCharSet* |
470 | FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); |
471 | |
472 | FcPublic FcCharSet* |
473 | FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b); |
474 | |
475 | FcPublic FcBool |
476 | FcCharSetMerge (FcCharSet *a, const FcCharSet *b, FcBool *changed); |
477 | |
478 | FcPublic FcBool |
479 | FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4); |
480 | |
481 | FcPublic FcChar32 |
482 | FcCharSetCount (const FcCharSet *a); |
483 | |
484 | FcPublic FcChar32 |
485 | FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b); |
486 | |
487 | FcPublic FcChar32 |
488 | FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b); |
489 | |
490 | FcPublic FcBool |
491 | FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); |
492 | |
493 | #define FC_CHARSET_MAP_SIZE (256/32) |
494 | #define FC_CHARSET_DONE ((FcChar32) -1) |
495 | |
496 | FcPublic FcChar32 |
497 | FcCharSetFirstPage (const FcCharSet *a, |
498 | FcChar32 map[FC_CHARSET_MAP_SIZE], |
499 | FcChar32 *next); |
500 | |
501 | FcPublic FcChar32 |
502 | FcCharSetNextPage (const FcCharSet *a, |
503 | FcChar32 map[FC_CHARSET_MAP_SIZE], |
504 | FcChar32 *next); |
505 | |
506 | /* |
507 | * old coverage API, rather hard to use correctly |
508 | */ |
509 | |
510 | FcPublic FcChar32 |
511 | FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result); |
512 | |
513 | /* fcdbg.c */ |
514 | FcPublic void |
515 | FcValuePrint (const FcValue v); |
516 | |
517 | FcPublic void |
518 | FcPatternPrint (const FcPattern *p); |
519 | |
520 | FcPublic void |
521 | FcFontSetPrint (const FcFontSet *s); |
522 | |
523 | /* fcdefault.c */ |
524 | FcPublic FcStrSet * |
525 | FcGetDefaultLangs (void); |
526 | |
527 | FcPublic void |
528 | FcDefaultSubstitute (FcPattern *pattern); |
529 | |
530 | /* fcdir.c */ |
531 | FcPublic FcBool |
532 | FcFileIsDir (const FcChar8 *file); |
533 | |
534 | FcPublic FcBool |
535 | FcFileScan (FcFontSet *set, |
536 | FcStrSet *dirs, |
537 | FcFileCache *cache, |
538 | FcBlanks *blanks, |
539 | const FcChar8 *file, |
540 | FcBool force); |
541 | |
542 | FcPublic FcBool |
543 | FcDirScan (FcFontSet *set, |
544 | FcStrSet *dirs, |
545 | FcFileCache *cache, |
546 | FcBlanks *blanks, |
547 | const FcChar8 *dir, |
548 | FcBool force); |
549 | |
550 | FcPublic FcBool |
551 | FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); |
552 | |
553 | FcPublic FcCache * |
554 | FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); |
555 | |
556 | FcPublic FcCache * |
557 | FcDirCacheRescan (const FcChar8 *dir, FcConfig *config); |
558 | |
559 | FcPublic FcCache * |
560 | FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config); |
561 | |
562 | FcPublic FcCache * |
563 | FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat); |
564 | |
565 | FcPublic void |
566 | FcDirCacheUnload (FcCache *cache); |
567 | |
568 | /* fcfreetype.c */ |
569 | FcPublic FcPattern * |
570 | FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count); |
571 | |
572 | /* fcfs.c */ |
573 | |
574 | FcPublic FcFontSet * |
575 | FcFontSetCreate (void); |
576 | |
577 | FcPublic void |
578 | FcFontSetDestroy (FcFontSet *s); |
579 | |
580 | FcPublic FcBool |
581 | FcFontSetAdd (FcFontSet *s, FcPattern *font); |
582 | |
583 | /* fcinit.c */ |
584 | FcPublic FcConfig * |
585 | FcInitLoadConfig (void); |
586 | |
587 | FcPublic FcConfig * |
588 | FcInitLoadConfigAndFonts (void); |
589 | |
590 | FcPublic FcBool |
591 | FcInit (void); |
592 | |
593 | FcPublic void |
594 | FcFini (void); |
595 | |
596 | FcPublic int |
597 | FcGetVersion (void); |
598 | |
599 | FcPublic FcBool |
600 | FcInitReinitialize (void); |
601 | |
602 | FcPublic FcBool |
603 | FcInitBringUptoDate (void); |
604 | |
605 | /* fclang.c */ |
606 | FcPublic FcStrSet * |
607 | FcGetLangs (void); |
608 | |
609 | FcPublic FcChar8 * |
610 | FcLangNormalize (const FcChar8 *lang); |
611 | |
612 | FcPublic const FcCharSet * |
613 | FcLangGetCharSet (const FcChar8 *lang); |
614 | |
615 | FcPublic FcLangSet* |
616 | FcLangSetCreate (void); |
617 | |
618 | FcPublic void |
619 | FcLangSetDestroy (FcLangSet *ls); |
620 | |
621 | FcPublic FcLangSet* |
622 | FcLangSetCopy (const FcLangSet *ls); |
623 | |
624 | FcPublic FcBool |
625 | FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang); |
626 | |
627 | FcPublic FcBool |
628 | FcLangSetDel (FcLangSet *ls, const FcChar8 *lang); |
629 | |
630 | FcPublic FcLangResult |
631 | FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang); |
632 | |
633 | FcPublic FcLangResult |
634 | FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb); |
635 | |
636 | FcPublic FcBool |
637 | FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb); |
638 | |
639 | FcPublic FcBool |
640 | FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb); |
641 | |
642 | FcPublic FcChar32 |
643 | FcLangSetHash (const FcLangSet *ls); |
644 | |
645 | FcPublic FcStrSet * |
646 | FcLangSetGetLangs (const FcLangSet *ls); |
647 | |
648 | FcPublic FcLangSet * |
649 | FcLangSetUnion (const FcLangSet *a, const FcLangSet *b); |
650 | |
651 | FcPublic FcLangSet * |
652 | FcLangSetSubtract (const FcLangSet *a, const FcLangSet *b); |
653 | |
654 | /* fclist.c */ |
655 | FcPublic FcObjectSet * |
656 | FcObjectSetCreate (void); |
657 | |
658 | FcPublic FcBool |
659 | FcObjectSetAdd (FcObjectSet *os, const char *object); |
660 | |
661 | FcPublic void |
662 | FcObjectSetDestroy (FcObjectSet *os); |
663 | |
664 | FcPublic FcObjectSet * |
665 | FcObjectSetVaBuild (const char *first, va_list va); |
666 | |
667 | FcPublic FcObjectSet * |
668 | FcObjectSetBuild (const char *first, ...) FC_ATTRIBUTE_SENTINEL(0); |
669 | |
670 | FcPublic FcFontSet * |
671 | FcFontSetList (FcConfig *config, |
672 | FcFontSet **sets, |
673 | int nsets, |
674 | FcPattern *p, |
675 | FcObjectSet *os); |
676 | |
677 | FcPublic FcFontSet * |
678 | FcFontList (FcConfig *config, |
679 | FcPattern *p, |
680 | FcObjectSet *os); |
681 | |
682 | /* fcatomic.c */ |
683 | |
684 | FcPublic FcAtomic * |
685 | FcAtomicCreate (const FcChar8 *file); |
686 | |
687 | FcPublic FcBool |
688 | FcAtomicLock (FcAtomic *atomic); |
689 | |
690 | FcPublic FcChar8 * |
691 | FcAtomicNewFile (FcAtomic *atomic); |
692 | |
693 | FcPublic FcChar8 * |
694 | FcAtomicOrigFile (FcAtomic *atomic); |
695 | |
696 | FcPublic FcBool |
697 | FcAtomicReplaceOrig (FcAtomic *atomic); |
698 | |
699 | FcPublic void |
700 | FcAtomicDeleteNew (FcAtomic *atomic); |
701 | |
702 | FcPublic void |
703 | FcAtomicUnlock (FcAtomic *atomic); |
704 | |
705 | FcPublic void |
706 | FcAtomicDestroy (FcAtomic *atomic); |
707 | |
708 | /* fcmatch.c */ |
709 | FcPublic FcPattern * |
710 | FcFontSetMatch (FcConfig *config, |
711 | FcFontSet **sets, |
712 | int nsets, |
713 | FcPattern *p, |
714 | FcResult *result); |
715 | |
716 | FcPublic FcPattern * |
717 | FcFontMatch (FcConfig *config, |
718 | FcPattern *p, |
719 | FcResult *result); |
720 | |
721 | FcPublic FcPattern * |
722 | FcFontRenderPrepare (FcConfig *config, |
723 | FcPattern *pat, |
724 | FcPattern *font); |
725 | |
726 | FcPublic FcFontSet * |
727 | FcFontSetSort (FcConfig *config, |
728 | FcFontSet **sets, |
729 | int nsets, |
730 | FcPattern *p, |
731 | FcBool trim, |
732 | FcCharSet **csp, |
733 | FcResult *result); |
734 | |
735 | FcPublic FcFontSet * |
736 | FcFontSort (FcConfig *config, |
737 | FcPattern *p, |
738 | FcBool trim, |
739 | FcCharSet **csp, |
740 | FcResult *result); |
741 | |
742 | FcPublic void |
743 | FcFontSetSortDestroy (FcFontSet *fs); |
744 | |
745 | /* fcmatrix.c */ |
746 | FcPublic FcMatrix * |
747 | FcMatrixCopy (const FcMatrix *mat); |
748 | |
749 | FcPublic FcBool |
750 | FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2); |
751 | |
752 | FcPublic void |
753 | FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b); |
754 | |
755 | FcPublic void |
756 | FcMatrixRotate (FcMatrix *m, double c, double s); |
757 | |
758 | FcPublic void |
759 | FcMatrixScale (FcMatrix *m, double sx, double sy); |
760 | |
761 | FcPublic void |
762 | FcMatrixShear (FcMatrix *m, double sh, double sv); |
763 | |
764 | /* fcname.c */ |
765 | |
766 | /* Deprecated. Does nothing. Returns FcFalse. */ |
767 | FcPublic FcBool |
768 | FcNameRegisterObjectTypes (const FcObjectType *types, int ntype); |
769 | |
770 | /* Deprecated. Does nothing. Returns FcFalse. */ |
771 | FcPublic FcBool |
772 | FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype); |
773 | |
774 | FcPublic const FcObjectType * |
775 | FcNameGetObjectType (const char *object); |
776 | |
777 | /* Deprecated. Does nothing. Returns FcFalse. */ |
778 | FcPublic FcBool |
779 | FcNameRegisterConstants (const FcConstant *consts, int nconsts); |
780 | |
781 | /* Deprecated. Does nothing. Returns FcFalse. */ |
782 | FcPublic FcBool |
783 | FcNameUnregisterConstants (const FcConstant *consts, int nconsts); |
784 | |
785 | FcPublic const FcConstant * |
786 | FcNameGetConstant (const FcChar8 *string); |
787 | |
788 | FcPublic FcBool |
789 | FcNameConstant (const FcChar8 *string, int *result); |
790 | |
791 | FcPublic FcPattern * |
792 | FcNameParse (const FcChar8 *name); |
793 | |
794 | FcPublic FcChar8 * |
795 | FcNameUnparse (FcPattern *pat); |
796 | |
797 | /* fcpat.c */ |
798 | FcPublic FcPattern * |
799 | FcPatternCreate (void); |
800 | |
801 | FcPublic FcPattern * |
802 | FcPatternDuplicate (const FcPattern *p); |
803 | |
804 | FcPublic void |
805 | FcPatternReference (FcPattern *p); |
806 | |
807 | FcPublic FcPattern * |
808 | FcPatternFilter (FcPattern *p, const FcObjectSet *os); |
809 | |
810 | FcPublic void |
811 | FcValueDestroy (FcValue v); |
812 | |
813 | FcPublic FcBool |
814 | FcValueEqual (FcValue va, FcValue vb); |
815 | |
816 | FcPublic FcValue |
817 | FcValueSave (FcValue v); |
818 | |
819 | FcPublic void |
820 | FcPatternDestroy (FcPattern *p); |
821 | |
822 | FcPublic FcBool |
823 | FcPatternEqual (const FcPattern *pa, const FcPattern *pb); |
824 | |
825 | FcPublic FcBool |
826 | FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os); |
827 | |
828 | FcPublic FcChar32 |
829 | FcPatternHash (const FcPattern *p); |
830 | |
831 | FcPublic FcBool |
832 | FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); |
833 | |
834 | FcPublic FcBool |
835 | FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); |
836 | |
837 | FcPublic FcResult |
838 | FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); |
839 | |
840 | FcPublic FcBool |
841 | FcPatternDel (FcPattern *p, const char *object); |
842 | |
843 | FcPublic FcBool |
844 | FcPatternRemove (FcPattern *p, const char *object, int id); |
845 | |
846 | FcPublic FcBool |
847 | FcPatternAddInteger (FcPattern *p, const char *object, int i); |
848 | |
849 | FcPublic FcBool |
850 | FcPatternAddDouble (FcPattern *p, const char *object, double d); |
851 | |
852 | FcPublic FcBool |
853 | FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s); |
854 | |
855 | FcPublic FcBool |
856 | FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s); |
857 | |
858 | FcPublic FcBool |
859 | FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c); |
860 | |
861 | FcPublic FcBool |
862 | FcPatternAddBool (FcPattern *p, const char *object, FcBool b); |
863 | |
864 | FcPublic FcBool |
865 | FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls); |
866 | |
867 | FcPublic FcBool |
868 | FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r); |
869 | |
870 | FcPublic FcResult |
871 | FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i); |
872 | |
873 | FcPublic FcResult |
874 | FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d); |
875 | |
876 | FcPublic FcResult |
877 | FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s); |
878 | |
879 | FcPublic FcResult |
880 | FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s); |
881 | |
882 | FcPublic FcResult |
883 | FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c); |
884 | |
885 | FcPublic FcResult |
886 | FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b); |
887 | |
888 | FcPublic FcResult |
889 | FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls); |
890 | |
891 | FcPublic FcResult |
892 | FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r); |
893 | |
894 | FcPublic FcPattern * |
895 | FcPatternVaBuild (FcPattern *p, va_list va); |
896 | |
897 | FcPublic FcPattern * |
898 | FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0); |
899 | |
900 | FcPublic FcChar8 * |
901 | FcPatternFormat (FcPattern *pat, const FcChar8 *format); |
902 | |
903 | /* fcrange.c */ |
904 | FcPublic FcRange * |
905 | FcRangeCreateDouble (double begin, double end); |
906 | |
907 | FcPublic FcRange * |
908 | FcRangeCreateInteger (FcChar32 begin, FcChar32 end); |
909 | |
910 | FcPublic void |
911 | FcRangeDestroy (FcRange *range); |
912 | |
913 | FcPublic FcRange * |
914 | FcRangeCopy (const FcRange *r); |
915 | |
916 | FcPublic FcBool |
917 | FcRangeGetDouble(const FcRange *range, double *begin, double *end); |
918 | |
919 | /* fcweight.c */ |
920 | |
921 | FcPublic int |
922 | FcWeightFromOpenType (int ot_weight); |
923 | |
924 | FcPublic int |
925 | FcWeightToOpenType (int fc_weight); |
926 | |
927 | /* fcstr.c */ |
928 | |
929 | FcPublic FcChar8 * |
930 | FcStrCopy (const FcChar8 *s); |
931 | |
932 | FcPublic FcChar8 * |
933 | FcStrCopyFilename (const FcChar8 *s); |
934 | |
935 | FcPublic FcChar8 * |
936 | FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); |
937 | |
938 | FcPublic void |
939 | FcStrFree (FcChar8 *s); |
940 | |
941 | /* These are ASCII only, suitable only for pattern element names */ |
942 | #define FcIsUpper(c) ((0101 <= (c) && (c) <= 0132)) |
943 | #define FcIsLower(c) ((0141 <= (c) && (c) <= 0172)) |
944 | #define FcToLower(c) (FcIsUpper(c) ? (c) - 0101 + 0141 : (c)) |
945 | |
946 | FcPublic FcChar8 * |
947 | FcStrDowncase (const FcChar8 *s); |
948 | |
949 | FcPublic int |
950 | FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); |
951 | |
952 | FcPublic int |
953 | FcStrCmp (const FcChar8 *s1, const FcChar8 *s2); |
954 | |
955 | FcPublic const FcChar8 * |
956 | FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); |
957 | |
958 | FcPublic const FcChar8 * |
959 | FcStrStr (const FcChar8 *s1, const FcChar8 *s2); |
960 | |
961 | FcPublic int |
962 | FcUtf8ToUcs4 (const FcChar8 *src_orig, |
963 | FcChar32 *dst, |
964 | int len); |
965 | |
966 | FcPublic FcBool |
967 | FcUtf8Len (const FcChar8 *string, |
968 | int len, |
969 | int *nchar, |
970 | int *wchar); |
971 | |
972 | #define FC_UTF8_MAX_LEN 6 |
973 | |
974 | FcPublic int |
975 | FcUcs4ToUtf8 (FcChar32 ucs4, |
976 | FcChar8 dest[FC_UTF8_MAX_LEN]); |
977 | |
978 | FcPublic int |
979 | FcUtf16ToUcs4 (const FcChar8 *src_orig, |
980 | FcEndian endian, |
981 | FcChar32 *dst, |
982 | int len); /* in bytes */ |
983 | |
984 | FcPublic FcBool |
985 | FcUtf16Len (const FcChar8 *string, |
986 | FcEndian endian, |
987 | int len, /* in bytes */ |
988 | int *nchar, |
989 | int *wchar); |
990 | |
991 | FcPublic FcChar8 * |
992 | FcStrDirname (const FcChar8 *file); |
993 | |
994 | FcPublic FcChar8 * |
995 | FcStrBasename (const FcChar8 *file); |
996 | |
997 | FcPublic FcStrSet * |
998 | FcStrSetCreate (void); |
999 | |
1000 | FcPublic FcBool |
1001 | FcStrSetMember (FcStrSet *set, const FcChar8 *s); |
1002 | |
1003 | FcPublic FcBool |
1004 | FcStrSetEqual (FcStrSet *sa, FcStrSet *sb); |
1005 | |
1006 | FcPublic FcBool |
1007 | FcStrSetAdd (FcStrSet *set, const FcChar8 *s); |
1008 | |
1009 | FcPublic FcBool |
1010 | FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s); |
1011 | |
1012 | FcPublic FcBool |
1013 | FcStrSetDel (FcStrSet *set, const FcChar8 *s); |
1014 | |
1015 | FcPublic void |
1016 | FcStrSetDestroy (FcStrSet *set); |
1017 | |
1018 | FcPublic FcStrList * |
1019 | FcStrListCreate (FcStrSet *set); |
1020 | |
1021 | FcPublic void |
1022 | FcStrListFirst (FcStrList *list); |
1023 | |
1024 | FcPublic FcChar8 * |
1025 | FcStrListNext (FcStrList *list); |
1026 | |
1027 | FcPublic void |
1028 | FcStrListDone (FcStrList *list); |
1029 | |
1030 | /* fcxml.c */ |
1031 | FcPublic FcBool |
1032 | FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain); |
1033 | |
1034 | _FCFUNCPROTOEND |
1035 | |
1036 | #undef FC_ATTRIBUTE_SENTINEL |
1037 | |
1038 | |
1039 | #ifndef _FCINT_H_ |
1040 | |
1041 | /* |
1042 | * Deprecated functions are placed here to help users fix their code without |
1043 | * digging through documentation |
1044 | */ |
1045 | |
1046 | #define FcConfigGetRescanInverval FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval |
1047 | #define FcConfigSetRescanInverval FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval |
1048 | |
1049 | #endif |
1050 | |
1051 | #endif /* _FONTCONFIG_H_ */ |
1052 | |