]>
Commit | Line | Data |
---|---|---|
24330d27 | 1 | /* |
793e946c | 2 | * $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $ |
24330d27 | 3 | * |
46b51147 | 4 | * Copyright © 2000 Keith Packard |
24330d27 KP |
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 _FCINT_H_ | |
26 | #define _FCINT_H_ | |
27 | ||
91fe51b4 PL |
28 | #ifdef HAVE_CONFIG_H |
29 | #include <config.h> | |
30 | #endif | |
31 | ||
24330d27 KP |
32 | #include <stdlib.h> |
33 | #include <stdio.h> | |
dc70c15a PL |
34 | #ifdef HAVE_INTTYPES_H |
35 | #include <inttypes.h> | |
91fe51b4 | 36 | #elif defined(HAVE_STDINT_H) |
7fd7221e | 37 | #include <stdint.h> |
91fe51b4 PL |
38 | #else |
39 | #error missing C99 integer data types | |
dc70c15a | 40 | #endif |
24330d27 KP |
41 | #include <string.h> |
42 | #include <ctype.h> | |
43 | #include <errno.h> | |
44 | #include <unistd.h> | |
45 | #include <sys/types.h> | |
46 | #include <sys/stat.h> | |
179c3995 | 47 | #include <time.h> |
24330d27 KP |
48 | #include <fontconfig/fontconfig.h> |
49 | #include <fontconfig/fcprivate.h> | |
be094850 | 50 | #include <fontconfig/fcfreetype.h> |
24330d27 | 51 | |
24330d27 KP |
52 | #ifndef FC_CONFIG_PATH |
53 | #define FC_CONFIG_PATH "fonts.conf" | |
54 | #endif | |
55 | ||
179c3995 KP |
56 | #define FC_FONT_FILE_INVALID ((FcChar8 *) ".") |
57 | #define FC_FONT_FILE_DIR ((FcChar8 *) ".dir") | |
58 | ||
daeed6e0 TL |
59 | #ifdef _WIN32 |
60 | #define FC_SEARCH_PATH_SEPARATOR ';' | |
61 | #else | |
62 | #define FC_SEARCH_PATH_SEPARATOR ':' | |
63 | #endif | |
64 | ||
24330d27 KP |
65 | #define FC_DBG_MATCH 1 |
66 | #define FC_DBG_MATCHV 2 | |
67 | #define FC_DBG_EDIT 4 | |
68 | #define FC_DBG_FONTSET 8 | |
69 | #define FC_DBG_CACHE 16 | |
70 | #define FC_DBG_CACHEV 32 | |
71 | #define FC_DBG_PARSE 64 | |
72 | #define FC_DBG_SCAN 128 | |
4c003605 | 73 | #define FC_DBG_SCANV 256 |
24330d27 | 74 | #define FC_DBG_MEMORY 512 |
2d9c79c0 | 75 | #define FC_DBG_CONFIG 1024 |
7ce19673 | 76 | #define FC_DBG_LANGSET 2048 |
bc5e487f | 77 | #define FC_DBG_OBJTYPES 4096 |
24330d27 KP |
78 | |
79 | #define FC_MEM_CHARSET 0 | |
d8d73958 | 80 | #define FC_MEM_CHARLEAF 1 |
24330d27 KP |
81 | #define FC_MEM_FONTSET 2 |
82 | #define FC_MEM_FONTPTR 3 | |
83 | #define FC_MEM_OBJECTSET 4 | |
84 | #define FC_MEM_OBJECTPTR 5 | |
85 | #define FC_MEM_MATRIX 6 | |
86 | #define FC_MEM_PATTERN 7 | |
87 | #define FC_MEM_PATELT 8 | |
88 | #define FC_MEM_VALLIST 9 | |
89 | #define FC_MEM_SUBSTATE 10 | |
90 | #define FC_MEM_STRING 11 | |
91 | #define FC_MEM_LISTBUCK 12 | |
d8d73958 KP |
92 | #define FC_MEM_STRSET 13 |
93 | #define FC_MEM_STRLIST 14 | |
94 | #define FC_MEM_CONFIG 15 | |
95 | #define FC_MEM_LANGSET 16 | |
9dac3c59 KP |
96 | #define FC_MEM_ATOMIC 17 |
97 | #define FC_MEM_BLANKS 18 | |
98 | #define FC_MEM_CACHE 19 | |
99 | #define FC_MEM_STRBUF 20 | |
100 | #define FC_MEM_SUBST 21 | |
101 | #define FC_MEM_OBJECTTYPE 22 | |
102 | #define FC_MEM_CONSTANT 23 | |
103 | #define FC_MEM_TEST 24 | |
104 | #define FC_MEM_EXPR 25 | |
105 | #define FC_MEM_VSTACK 26 | |
106 | #define FC_MEM_ATTR 27 | |
107 | #define FC_MEM_PSTACK 28 | |
1c52c0f0 | 108 | #define FC_MEM_STATICSTR 29 |
d8d73958 | 109 | |
1c52c0f0 | 110 | #define FC_MEM_NUM 30 |
24330d27 | 111 | |
1c9fdcca PL |
112 | #define FC_BANK_DYNAMIC 0 |
113 | #define FC_BANK_FIRST 1 | |
82f35f8b PL |
114 | #define FC_BANK_LANGS 0xfcfcfcfc |
115 | ||
4c003605 | 116 | typedef enum _FcValueBinding { |
dda7794f | 117 | FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame |
4c003605 KP |
118 | } FcValueBinding; |
119 | ||
7ce19673 KP |
120 | /* |
121 | * Serialized data structures use only offsets instead of pointers | |
122 | * A low bit of 1 indicates an offset. | |
123 | */ | |
124 | ||
125 | /* Is the provided pointer actually an offset? */ | |
126 | #define FcIsEncodedOffset(p) ((((intptr_t) (p)) & 1) != 0) | |
cd2ec1a9 | 127 | |
7ce19673 KP |
128 | /* Encode offset in a pointer of type t */ |
129 | #define FcOffsetEncode(o,t) ((t *) ((o) | 1)) | |
130 | ||
131 | /* Decode a pointer into an offset */ | |
132 | #define FcOffsetDecode(p) (((intptr_t) (p)) & ~1) | |
133 | ||
134 | /* Compute pointer offset */ | |
135 | #define FcPtrToOffset(b,p) ((intptr_t) (p) - (intptr_t) (b)) | |
136 | ||
137 | /* Given base address, offset and type, return a pointer */ | |
138 | #define FcOffsetToPtr(b,o,t) ((t *) ((intptr_t) (b) + (o))) | |
139 | ||
140 | /* Given base address, encoded offset and type, return a pointer */ | |
141 | #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t) | |
cd2ec1a9 | 142 | |
7ce19673 KP |
143 | /* Given base address, pointer and type, return an encoded offset */ |
144 | #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t) | |
145 | ||
146 | /* Given a structure, offset member and type, return pointer */ | |
147 | #define FcOffsetMember(s,m,t) FcOffsetToPtr(s,(s)->m,t) | |
148 | ||
149 | /* Given a structure, encoded offset member and type, return pointer to member */ | |
150 | #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t) | |
151 | ||
152 | /* Given a structure, member and type, convert the member to a pointer */ | |
153 | #define FcPointerMember(s,m,t) (FcIsEncodedOffset((s)->m) ? \ | |
154 | FcEncodedOffsetMember (s,m,t) : \ | |
155 | (s)->m) | |
156 | ||
157 | /* | |
158 | * Serialized values may hold strings, charsets and langsets as pointers, | |
159 | * unfortunately FcValue is an exposed type so we can't just always use | |
160 | * offsets | |
161 | */ | |
162 | #define FcValueString(v) FcPointerMember(v,u.s,FcChar8) | |
163 | #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet) | |
164 | #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet) | |
165 | ||
166 | typedef struct _FcValueList *FcValueListPtr; | |
167 | ||
168 | typedef struct _FcValueList { | |
169 | struct _FcValueList *next; | |
170 | FcValue value; | |
171 | FcValueBinding binding; | |
24330d27 KP |
172 | } FcValueList; |
173 | ||
7ce19673 KP |
174 | #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList) |
175 | ||
176 | typedef int FcObject; | |
4262e0b3 | 177 | |
7ce19673 | 178 | typedef struct _FcPatternElt *FcPatternEltPtr; |
cd2ec1a9 | 179 | |
7ce19673 KP |
180 | /* |
181 | * Pattern elts are stuck in a structure connected to the pattern, | |
182 | * so they get moved around when the pattern is resized. Hence, the | |
183 | * values field must be a pointer/offset instead of just an offset | |
184 | */ | |
24330d27 | 185 | typedef struct _FcPatternElt { |
7ce19673 KP |
186 | FcObject object; |
187 | FcValueList *values; | |
24330d27 KP |
188 | } FcPatternElt; |
189 | ||
7ce19673 KP |
190 | #define FcPatternEltValues(pe) FcPointerMember(pe,values,FcValueList) |
191 | ||
24330d27 KP |
192 | struct _FcPattern { |
193 | int num; | |
194 | int size; | |
7ce19673 | 195 | intptr_t elts_offset; |
e709ddfa | 196 | int ref; |
24330d27 KP |
197 | }; |
198 | ||
7ce19673 KP |
199 | #define FcPatternElts(p) FcOffsetMember(p,elts_offset,FcPatternElt) |
200 | ||
201 | #define FcFontSetFonts(fs) FcPointerMember(fs,fonts,FcPattern *) | |
c0288648 | 202 | |
7ce19673 | 203 | #define FcFontSetFont(fs,i) (FcIsEncodedOffset((fs)->fonts) ? \ |
09bd9ae2 | 204 | FcEncodedOffsetToPtr(fs, \ |
c0288648 KP |
205 | FcFontSetFonts(fs)[i], \ |
206 | FcPattern) : \ | |
207 | fs->fonts[i]) | |
7ce19673 | 208 | |
24330d27 KP |
209 | typedef enum _FcOp { |
210 | FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet, | |
211 | FcOpNil, | |
212 | FcOpField, FcOpConst, | |
213 | FcOpAssign, FcOpAssignReplace, | |
214 | FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast, | |
215 | FcOpQuest, | |
74a623e0 KP |
216 | FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual, |
217 | FcOpContains, FcOpListing, FcOpNotContains, | |
24330d27 KP |
218 | FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual, |
219 | FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide, | |
3f7653c2 KP |
220 | FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc, |
221 | FcOpInvalid | |
24330d27 KP |
222 | } FcOp; |
223 | ||
224 | typedef struct _FcExpr { | |
225 | FcOp op; | |
226 | union { | |
227 | int ival; | |
228 | double dval; | |
ccb3e93b | 229 | FcChar8 *sval; |
24330d27 KP |
230 | FcMatrix *mval; |
231 | FcBool bval; | |
232 | FcCharSet *cval; | |
7ce19673 | 233 | FcObject object; |
ccb3e93b | 234 | FcChar8 *constant; |
24330d27 KP |
235 | struct { |
236 | struct _FcExpr *left, *right; | |
237 | } tree; | |
238 | } u; | |
239 | } FcExpr; | |
240 | ||
241 | typedef enum _FcQual { | |
6f6563ed | 242 | FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst |
24330d27 KP |
243 | } FcQual; |
244 | ||
938bc633 KP |
245 | #define FcMatchDefault ((FcMatchKind) -1) |
246 | ||
24330d27 KP |
247 | typedef struct _FcTest { |
248 | struct _FcTest *next; | |
938bc633 | 249 | FcMatchKind kind; |
24330d27 | 250 | FcQual qual; |
7ce19673 | 251 | FcObject object; |
24330d27 KP |
252 | FcOp op; |
253 | FcExpr *expr; | |
254 | } FcTest; | |
255 | ||
256 | typedef struct _FcEdit { | |
257 | struct _FcEdit *next; | |
7ce19673 | 258 | FcObject object; |
24330d27 KP |
259 | FcOp op; |
260 | FcExpr *expr; | |
6fff2cda | 261 | FcValueBinding binding; |
24330d27 KP |
262 | } FcEdit; |
263 | ||
264 | typedef struct _FcSubst { | |
265 | struct _FcSubst *next; | |
266 | FcTest *test; | |
267 | FcEdit *edit; | |
268 | } FcSubst; | |
269 | ||
20ac65ab | 270 | typedef struct _FcCharLeaf { |
24330d27 | 271 | FcChar32 map[256/32]; |
20ac65ab | 272 | } FcCharLeaf; |
24330d27 | 273 | |
d8d73958 | 274 | #define FC_REF_CONSTANT -1 |
82f4243f | 275 | |
24330d27 | 276 | struct _FcCharSet { |
24330d27 | 277 | int ref; /* reference count */ |
20ac65ab | 278 | int num; /* size of leaves and numbers arrays */ |
7ce19673 KP |
279 | intptr_t leaves_offset; |
280 | intptr_t numbers_offset; | |
24330d27 KP |
281 | }; |
282 | ||
7ce19673 KP |
283 | #define FcCharSetLeaves(c) FcOffsetMember(c,leaves_offset,intptr_t) |
284 | #define FcCharSetLeaf(c,i) (FcOffsetToPtr(FcCharSetLeaves(c), \ | |
285 | FcCharSetLeaves(c)[i], \ | |
286 | FcCharLeaf)) | |
287 | #define FcCharSetNumbers(c) FcOffsetMember(c,numbers_offset,FcChar16) | |
288 | ||
179c3995 KP |
289 | struct _FcStrSet { |
290 | int ref; /* reference count */ | |
291 | int num; | |
292 | int size; | |
4262e0b3 | 293 | FcChar8 **strs; |
179c3995 KP |
294 | }; |
295 | ||
296 | struct _FcStrList { | |
297 | FcStrSet *set; | |
298 | int n; | |
299 | }; | |
300 | ||
c2e7c611 | 301 | typedef struct _FcStrBuf { |
24330d27 KP |
302 | FcChar8 *buf; |
303 | FcBool allocated; | |
304 | FcBool failed; | |
305 | int len; | |
306 | int size; | |
c2e7c611 | 307 | } FcStrBuf; |
24330d27 | 308 | |
212c9f43 | 309 | typedef struct _FcCache { |
bc5e487f KP |
310 | int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */ |
311 | int version; /* FC_CACHE_CONTENT_VERSION */ | |
c50ea916 | 312 | intptr_t size; /* size of file */ |
7ce19673 KP |
313 | intptr_t dir; /* offset to dir name */ |
314 | intptr_t dirs; /* offset to subdirs */ | |
315 | int dirs_count; /* number of subdir strings */ | |
316 | intptr_t set; /* offset to font set */ | |
212c9f43 PL |
317 | } FcCache; |
318 | ||
7ce19673 KP |
319 | #define FcCacheDir(c) FcOffsetMember(c,dir,FcChar8) |
320 | #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t) | |
321 | #define FcCacheSet(c) FcOffsetMember(c,set,FcFontSet) | |
bc5e487f KP |
322 | #define FcCacheSubdir(c,i) FcOffsetToPtr (FcCacheDirs(cache),\ |
323 | FcCacheDirs(cache)[i], \ | |
324 | FcChar8) | |
7ce19673 KP |
325 | |
326 | /* | |
327 | * Used while constructing a directory cache object | |
328 | */ | |
329 | ||
330 | #define FC_SERIALIZE_HASH_SIZE 8191 | |
331 | ||
332 | typedef struct _FcSerializeBucket { | |
333 | struct _FcSerializeBucket *next; | |
334 | const void *object; | |
335 | intptr_t offset; | |
336 | } FcSerializeBucket; | |
337 | ||
bc5e487f KP |
338 | typedef struct _FcCharSetFreezer FcCharSetFreezer; |
339 | ||
7ce19673 KP |
340 | typedef struct _FcSerialize { |
341 | intptr_t size; | |
bc5e487f | 342 | FcCharSetFreezer *cs_freezer; |
7ce19673 KP |
343 | void *linear; |
344 | FcSerializeBucket *buckets[FC_SERIALIZE_HASH_SIZE]; | |
345 | } FcSerialize; | |
346 | ||
7769c321 KP |
347 | /* |
348 | * To map adobe glyph names to unicode values, a precomputed hash | |
349 | * table is used | |
350 | */ | |
351 | ||
352 | typedef struct _FcGlyphName { | |
353 | FcChar32 ucs; /* unicode value */ | |
354 | FcChar8 name[1]; /* name extends beyond struct */ | |
355 | } FcGlyphName; | |
356 | ||
192296d8 KP |
357 | /* |
358 | * To perform case-insensitive string comparisons, a table | |
359 | * is used which holds three different kinds of folding data. | |
360 | * | |
361 | * The first is a range of upper case values mapping to a range | |
362 | * of their lower case equivalents. Within each range, the offset | |
363 | * between upper and lower case is constant. | |
364 | * | |
365 | * The second is a range of upper case values which are interleaved | |
366 | * with their lower case equivalents. | |
367 | * | |
368 | * The third is a set of raw unicode values mapping to a list | |
369 | * of unicode values for comparison purposes. This allows conversion | |
370 | * of ß to "ss" so that SS, ss and ß all match. A separate array | |
371 | * holds the list of unicode values for each entry. | |
372 | * | |
373 | * These are packed into a single table. Using a binary search, | |
374 | * the appropriate entry can be located. | |
375 | */ | |
376 | ||
377 | #define FC_CASE_FOLD_RANGE 0 | |
378 | #define FC_CASE_FOLD_EVEN_ODD 1 | |
379 | #define FC_CASE_FOLD_FULL 2 | |
380 | ||
381 | typedef struct _FcCaseFold { | |
382 | FcChar32 upper; | |
383 | FcChar16 method : 2; | |
384 | FcChar16 count : 14; | |
385 | short offset; /* lower - upper for RANGE, table id for FULL */ | |
386 | } FcCaseFold; | |
387 | ||
2d9c79c0 KP |
388 | #define FC_MAX_FILE_LEN 4096 |
389 | ||
7ce19673 KP |
390 | /* XXX remove these when we're ready */ |
391 | ||
392 | #define fc_value_string(v) FcValueString(v) | |
393 | #define fc_value_charset(v) FcValueCharSet(v) | |
394 | #define fc_value_langset(v) FcValueLangSet(v) | |
395 | #define fc_storage_type(v) ((v)->type) | |
4262e0b3 | 396 | |
44415a07 PL |
397 | #define fc_alignof(type) offsetof (struct { char c; type member; }, member) |
398 | ||
bc5e487f KP |
399 | #define FC_CACHE_MAGIC_MMAP 0xFC02FC04 |
400 | #define FC_CACHE_MAGIC_ALLOC 0xFC02FC05 | |
401 | #define FC_CACHE_CONTENT_VERSION 1 | |
327a7fd4 | 402 | |
134f6011 KP |
403 | struct _FcAtomic { |
404 | FcChar8 *file; /* original file name */ | |
405 | FcChar8 *new; /* temp file name -- write data here */ | |
406 | FcChar8 *lck; /* lockfile name (used for locking) */ | |
407 | FcChar8 *tmp; /* tmpfile name (used for locking) */ | |
408 | }; | |
409 | ||
24330d27 KP |
410 | struct _FcBlanks { |
411 | int nblank; | |
412 | int sblank; | |
413 | FcChar32 *blanks; | |
414 | }; | |
415 | ||
2d3387fd KP |
416 | typedef struct _FcCacheList { |
417 | struct _FcCacheList *next; | |
418 | FcCache *cache; | |
419 | } FcCacheList; | |
420 | ||
24330d27 KP |
421 | struct _FcConfig { |
422 | /* | |
423 | * File names loaded from the configuration -- saved here as the | |
424 | * cache file must be consulted before the directories are scanned, | |
425 | * and those directives may occur in any order | |
426 | */ | |
179c3995 | 427 | FcStrSet *configDirs; /* directories to scan for fonts */ |
24330d27 KP |
428 | /* |
429 | * Set of allowed blank chars -- used to | |
430 | * trim fonts of bogus glyphs | |
431 | */ | |
432 | FcBlanks *blanks; | |
179c3995 KP |
433 | /* |
434 | * List of directories containing fonts, | |
435 | * built by recursively scanning the set | |
436 | * of configured directories | |
437 | */ | |
438 | FcStrSet *fontDirs; | |
7410e40b PL |
439 | /* |
440 | * List of directories containing cache files. | |
441 | */ | |
442 | FcStrSet *cacheDirs; | |
24330d27 KP |
443 | /* |
444 | * Names of all of the configuration files used | |
445 | * to create this configuration | |
446 | */ | |
179c3995 | 447 | FcStrSet *configFiles; /* config files loaded */ |
24330d27 KP |
448 | /* |
449 | * Substitution instructions for patterns and fonts; | |
450 | * maxObjects is used to allocate appropriate intermediate storage | |
451 | * while performing a whole set of substitutions | |
452 | */ | |
453 | FcSubst *substPattern; /* substitutions for patterns */ | |
454 | FcSubst *substFont; /* substitutions for fonts */ | |
c2c6976d | 455 | FcSubst *substScan; /* substitutions for scanned fonts */ |
24330d27 | 456 | int maxObjects; /* maximum number of tests in all substs */ |
d47c9d6e KP |
457 | /* |
458 | * List of patterns used to control font file selection | |
459 | */ | |
460 | FcStrSet *acceptGlobs; | |
461 | FcStrSet *rejectGlobs; | |
4f27c1c0 KP |
462 | FcFontSet *acceptPatterns; |
463 | FcFontSet *rejectPatterns; | |
24330d27 KP |
464 | /* |
465 | * The set of fonts loaded from the listed directories; the | |
466 | * order within the set does not determine the font selection, | |
467 | * except in the case of identical matches in which case earlier fonts | |
468 | * match preferrentially | |
469 | */ | |
470 | FcFontSet *fonts[FcSetApplication + 1]; | |
2d3387fd KP |
471 | /* |
472 | * Font cache information is mapped from cache files | |
473 | * the configuration is destroyed, the files need to be unmapped | |
474 | */ | |
475 | FcCacheList *caches; | |
179c3995 KP |
476 | /* |
477 | * Fontconfig can periodically rescan the system configuration | |
478 | * and font directories. This rescanning occurs when font | |
479 | * listing requests are made, but no more often than rescanInterval | |
480 | * seconds apart. | |
481 | */ | |
482 | time_t rescanTime; /* last time information was scanned */ | |
483 | int rescanInterval; /* interval between scans */ | |
24330d27 KP |
484 | }; |
485 | ||
6e9fc5de KP |
486 | extern FcConfig *_fcConfig; |
487 | ||
2b25f00c PL |
488 | typedef struct _FcFileTime { |
489 | time_t time; | |
490 | FcBool set; | |
491 | } FcFileTime; | |
492 | ||
69937bd9 KP |
493 | typedef struct _FcCharMap FcCharMap; |
494 | ||
44415a07 PL |
495 | /* watch out; assumes that v is void * -PL */ |
496 | #define ALIGN(v,type) ((void *)(((uintptr_t)(v) + fc_alignof(type) - 1) & ~(fc_alignof(type) - 1))) | |
7fd7221e | 497 | |
24330d27 KP |
498 | /* fcblanks.c */ |
499 | ||
500 | /* fccache.c */ | |
501 | ||
24330d27 | 502 | FcBool |
bc5e487f | 503 | FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config); |
4262e0b3 | 504 | |
c0288648 | 505 | void |
bc5e487f | 506 | FcDirCacheUnload (FcCache *cache); |
c0288648 | 507 | |
76abb77f | 508 | FcCache * |
bc5e487f KP |
509 | FcDirCacheScan (const FcChar8 *dir, FcConfig *config); |
510 | ||
511 | FcCache * | |
512 | FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); | |
d8ab9e6c | 513 | |
bc5e487f KP |
514 | FcCache * |
515 | FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat); | |
516 | ||
f57783d2 | 517 | FcBool |
bc5e487f | 518 | FcDirCacheValid (const FcChar8 *dir); |
f57783d2 | 519 | |
bc5e487f KP |
520 | FcCache * |
521 | FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, FcStrSet *dirs); | |
522 | ||
523 | FcBool | |
524 | FcDirCacheWrite (FcCache *cache, FcConfig *config); | |
525 | ||
24330d27 KP |
526 | /* fccfg.c */ |
527 | ||
179c3995 KP |
528 | FcBool |
529 | FcConfigAddConfigDir (FcConfig *config, | |
530 | const FcChar8 *d); | |
531 | ||
532 | FcBool | |
533 | FcConfigAddFontDir (FcConfig *config, | |
534 | const FcChar8 *d); | |
535 | ||
24330d27 | 536 | FcBool |
ccb3e93b KP |
537 | FcConfigAddDir (FcConfig *config, |
538 | const FcChar8 *d); | |
24330d27 | 539 | |
7410e40b PL |
540 | FcBool |
541 | FcConfigAddCacheDir (FcConfig *config, | |
542 | const FcChar8 *d); | |
543 | ||
544 | FcStrList * | |
545 | FcConfigGetCacheDirs (FcConfig *config); | |
546 | ||
24330d27 | 547 | FcBool |
ccb3e93b KP |
548 | FcConfigAddConfigFile (FcConfig *config, |
549 | const FcChar8 *f); | |
24330d27 | 550 | |
24330d27 KP |
551 | FcBool |
552 | FcConfigAddBlank (FcConfig *config, | |
553 | FcChar32 blank); | |
554 | ||
555 | FcBool | |
556 | FcConfigAddEdit (FcConfig *config, | |
557 | FcTest *test, | |
558 | FcEdit *edit, | |
559 | FcMatchKind kind); | |
560 | ||
561 | void | |
562 | FcConfigSetFonts (FcConfig *config, | |
563 | FcFontSet *fonts, | |
564 | FcSetName set); | |
565 | ||
566 | FcBool | |
4262e0b3 | 567 | FcConfigCompareValue (const FcValue *m, |
24330d27 | 568 | FcOp op, |
4262e0b3 | 569 | const FcValue *v); |
24330d27 | 570 | |
d47c9d6e KP |
571 | FcBool |
572 | FcConfigGlobAdd (FcConfig *config, | |
573 | const FcChar8 *glob, | |
574 | FcBool accept); | |
575 | ||
576 | FcBool | |
577 | FcConfigAcceptFilename (FcConfig *config, | |
578 | const FcChar8 *filename); | |
579 | ||
4f27c1c0 KP |
580 | FcBool |
581 | FcConfigPatternsAdd (FcConfig *config, | |
582 | FcPattern *pattern, | |
583 | FcBool accept); | |
584 | ||
585 | FcBool | |
586 | FcConfigAcceptFont (FcConfig *config, | |
587 | const FcPattern *font); | |
588 | ||
2b25f00c PL |
589 | FcFileTime |
590 | FcConfigModifiedTime (FcConfig *config); | |
591 | ||
2d3387fd KP |
592 | FcBool |
593 | FcConfigAddCache (FcConfig *config, FcCache *cache); | |
594 | ||
595 | /* fcserialize.c */ | |
7ce19673 KP |
596 | intptr_t |
597 | FcAlignSize (intptr_t size); | |
598 | ||
599 | FcSerialize * | |
600 | FcSerializeCreate (void); | |
601 | ||
602 | void | |
603 | FcSerializeDestroy (FcSerialize *serialize); | |
604 | ||
605 | FcBool | |
606 | FcSerializeAlloc (FcSerialize *serialize, const void *object, int size); | |
607 | ||
608 | intptr_t | |
609 | FcSerializeReserve (FcSerialize *serialize, int size); | |
610 | ||
611 | intptr_t | |
612 | FcSerializeOffset (FcSerialize *serialize, const void *object); | |
613 | ||
614 | void * | |
615 | FcSerializePtr (FcSerialize *serialize, const void *object); | |
616 | ||
617 | FcBool | |
618 | FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l); | |
619 | ||
620 | FcLangSet * | |
621 | FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l); | |
622 | ||
24330d27 | 623 | /* fccharset.c */ |
82f35f8b PL |
624 | void |
625 | FcLangCharSetPopulate (void); | |
626 | ||
18b6857c KP |
627 | FcCharSetFreezer * |
628 | FcCharSetFreezerCreate (void); | |
629 | ||
630 | const FcCharSet * | |
631 | FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs); | |
632 | ||
34cd0514 | 633 | void |
bc5e487f | 634 | FcCharSetFreezerDestroy (FcCharSetFreezer *freezer); |
34cd0514 | 635 | |
24330d27 | 636 | FcBool |
c2e7c611 | 637 | FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c); |
24330d27 KP |
638 | |
639 | FcCharSet * | |
640 | FcNameParseCharSet (FcChar8 *string); | |
641 | ||
c647f6f1 KP |
642 | FcCharLeaf * |
643 | FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4); | |
69937bd9 | 644 | |
7ce19673 KP |
645 | FcBool |
646 | FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs); | |
cd2ec1a9 | 647 | |
4262e0b3 | 648 | FcCharSet * |
7ce19673 | 649 | FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs); |
cd2ec1a9 PL |
650 | |
651 | FcChar16 * | |
652 | FcCharSetGetNumbers(const FcCharSet *c); | |
653 | ||
24330d27 | 654 | /* fcdbg.c */ |
24330d27 | 655 | void |
cd2ec1a9 | 656 | FcValueListPrint (const FcValueListPtr l); |
24330d27 | 657 | |
793e946c KP |
658 | void |
659 | FcLangSetPrint (const FcLangSet *ls); | |
660 | ||
24330d27 KP |
661 | void |
662 | FcOpPrint (FcOp op); | |
663 | ||
664 | void | |
938bc633 | 665 | FcTestPrint (const FcTest *test); |
24330d27 KP |
666 | |
667 | void | |
938bc633 | 668 | FcExprPrint (const FcExpr *expr); |
24330d27 KP |
669 | |
670 | void | |
938bc633 | 671 | FcEditPrint (const FcEdit *edit); |
24330d27 KP |
672 | |
673 | void | |
938bc633 | 674 | FcSubstPrint (const FcSubst *subst); |
24330d27 | 675 | |
7ce19673 KP |
676 | void |
677 | FcCharSetPrint (const FcCharSet *c); | |
678 | ||
b97a34b5 PL |
679 | extern int FcDebugVal; |
680 | ||
44415a07 | 681 | static inline int |
b97a34b5 PL |
682 | FcDebug (void) { return FcDebugVal; } |
683 | ||
684 | void | |
685 | FcInitDebug (void); | |
24330d27 | 686 | |
90442681 PL |
687 | /* fcdefault.c */ |
688 | FcChar8 * | |
689 | FcGetDefaultLang (void); | |
690 | ||
24330d27 | 691 | /* fcdir.c */ |
24330d27 | 692 | |
2d9c79c0 KP |
693 | FcBool |
694 | FcFileIsDir (const FcChar8 *file); | |
695 | ||
d47c9d6e KP |
696 | FcBool |
697 | FcFileScanConfig (FcFontSet *set, | |
698 | FcStrSet *dirs, | |
d47c9d6e KP |
699 | FcBlanks *blanks, |
700 | const FcChar8 *file, | |
d47c9d6e KP |
701 | FcConfig *config); |
702 | ||
703 | FcBool | |
704 | FcDirScanConfig (FcFontSet *set, | |
705 | FcStrSet *dirs, | |
d47c9d6e | 706 | FcBlanks *blanks, |
bc5e487f | 707 | const FcChar8 *dir, |
d47c9d6e KP |
708 | FcBool force, |
709 | FcConfig *config); | |
710 | ||
bc5e487f KP |
711 | FcCache * |
712 | FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config); | |
713 | ||
24330d27 KP |
714 | /* fcfont.c */ |
715 | int | |
716 | FcFontDebug (void); | |
717 | ||
82f4243f | 718 | /* fcfreetype.c */ |
e50b9ae7 KP |
719 | FcBool |
720 | FcFreeTypeIsExclusiveLang (const FcChar8 *lang); | |
721 | ||
82f4243f KP |
722 | FcBool |
723 | FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang); | |
724 | ||
c647f6f1 KP |
725 | FcChar32 |
726 | FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map); | |
727 | ||
728 | FcChar32 | |
729 | FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map); | |
730 | ||
731 | const FcCharMap * | |
732 | FcFreeTypeGetPrivateMap (FT_Encoding encoding); | |
733 | ||
24330d27 | 734 | /* fcfs.c */ |
cd2ec1a9 | 735 | |
212c9f43 | 736 | FcBool |
7ce19673 | 737 | FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s); |
212c9f43 | 738 | |
7ce19673 KP |
739 | FcFontSet * |
740 | FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s); | |
741 | ||
24330d27 KP |
742 | /* fcgram.y */ |
743 | int | |
744 | FcConfigparse (void); | |
745 | ||
746 | int | |
747 | FcConfigwrap (void); | |
748 | ||
749 | void | |
750 | FcConfigerror (char *fmt, ...); | |
751 | ||
752 | char * | |
753 | FcConfigSaveField (const char *field); | |
754 | ||
24330d27 KP |
755 | void |
756 | FcTestDestroy (FcTest *test); | |
757 | ||
758 | FcExpr * | |
759 | FcExprCreateInteger (int i); | |
760 | ||
761 | FcExpr * | |
762 | FcExprCreateDouble (double d); | |
763 | ||
764 | FcExpr * | |
ccb3e93b | 765 | FcExprCreateString (const FcChar8 *s); |
24330d27 KP |
766 | |
767 | FcExpr * | |
768 | FcExprCreateMatrix (const FcMatrix *m); | |
769 | ||
770 | FcExpr * | |
771 | FcExprCreateBool (FcBool b); | |
772 | ||
773 | FcExpr * | |
774 | FcExprCreateNil (void); | |
775 | ||
776 | FcExpr * | |
777 | FcExprCreateField (const char *field); | |
778 | ||
779 | FcExpr * | |
ccb3e93b | 780 | FcExprCreateConst (const FcChar8 *constant); |
24330d27 KP |
781 | |
782 | FcExpr * | |
783 | FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right); | |
784 | ||
785 | void | |
786 | FcExprDestroy (FcExpr *e); | |
787 | ||
24330d27 KP |
788 | void |
789 | FcEditDestroy (FcEdit *e); | |
790 | ||
791 | /* fcinit.c */ | |
792 | ||
793 | void | |
794 | FcMemReport (void); | |
795 | ||
796 | void | |
797 | FcMemAlloc (int kind, int size); | |
798 | ||
799 | void | |
800 | FcMemFree (int kind, int size); | |
801 | ||
82f4243f | 802 | /* fclang.c */ |
d8d73958 KP |
803 | FcLangSet * |
804 | FcFreeTypeLangSet (const FcCharSet *charset, | |
e50b9ae7 | 805 | const FcChar8 *exclusiveLang); |
82f4243f KP |
806 | |
807 | FcLangResult | |
808 | FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); | |
809 | ||
810 | const FcCharSet * | |
811 | FcCharSetForLang (const FcChar8 *lang); | |
812 | ||
d8d73958 KP |
813 | FcLangSet * |
814 | FcLangSetPromote (const FcChar8 *lang); | |
815 | ||
816 | FcLangSet * | |
817 | FcNameParseLangSet (const FcChar8 *string); | |
818 | ||
819 | FcBool | |
820 | FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); | |
821 | ||
f57783d2 KP |
822 | FcChar8 * |
823 | FcNameUnparseEscaped (FcPattern *pat, FcBool escape); | |
824 | ||
24330d27 KP |
825 | /* fclist.c */ |
826 | ||
4f27c1c0 KP |
827 | FcBool |
828 | FcListPatternMatchAny (const FcPattern *p, | |
829 | const FcPattern *font); | |
830 | ||
24330d27 KP |
831 | /* fcmatch.c */ |
832 | ||
833 | /* fcname.c */ | |
24330d27 | 834 | |
7ce19673 KP |
835 | /* |
836 | * NOTE -- this ordering is part of the cache file format. | |
837 | * It must also match the ordering in fcname.c | |
838 | */ | |
4262e0b3 | 839 | |
7ce19673 KP |
840 | #define FC_FAMILY_OBJECT 1 |
841 | #define FC_FAMILYLANG_OBJECT 2 | |
842 | #define FC_STYLE_OBJECT 3 | |
843 | #define FC_STYLELANG_OBJECT 4 | |
844 | #define FC_FULLNAME_OBJECT 5 | |
845 | #define FC_FULLNAMELANG_OBJECT 6 | |
846 | #define FC_SLANT_OBJECT 7 | |
847 | #define FC_WEIGHT_OBJECT 8 | |
848 | #define FC_WIDTH_OBJECT 9 | |
849 | #define FC_SIZE_OBJECT 10 | |
850 | #define FC_ASPECT_OBJECT 11 | |
851 | #define FC_PIXEL_SIZE_OBJECT 12 | |
852 | #define FC_SPACING_OBJECT 13 | |
853 | #define FC_FOUNDRY_OBJECT 14 | |
854 | #define FC_ANTIALIAS_OBJECT 15 | |
855 | #define FC_HINT_STYLE_OBJECT 16 | |
856 | #define FC_HINTING_OBJECT 17 | |
857 | #define FC_VERTICAL_LAYOUT_OBJECT 18 | |
858 | #define FC_AUTOHINT_OBJECT 19 | |
859 | #define FC_GLOBAL_ADVANCE_OBJECT 20 | |
860 | #define FC_FILE_OBJECT 21 | |
861 | #define FC_INDEX_OBJECT 22 | |
862 | #define FC_RASTERIZER_OBJECT 23 | |
863 | #define FC_OUTLINE_OBJECT 24 | |
864 | #define FC_SCALABLE_OBJECT 25 | |
865 | #define FC_DPI_OBJECT 26 | |
866 | #define FC_RGBA_OBJECT 27 | |
867 | #define FC_SCALE_OBJECT 28 | |
868 | #define FC_MINSPACE_OBJECT 29 | |
869 | #define FC_CHAR_WIDTH_OBJECT 30 | |
870 | #define FC_CHAR_HEIGHT_OBJECT 31 | |
871 | #define FC_MATRIX_OBJECT 32 | |
872 | #define FC_CHARSET_OBJECT 33 | |
873 | #define FC_LANG_OBJECT 34 | |
874 | #define FC_FONTVERSION_OBJECT 35 | |
875 | #define FC_CAPABILITY_OBJECT 36 | |
876 | #define FC_FONTFORMAT_OBJECT 37 | |
877 | #define FC_EMBOLDEN_OBJECT 38 | |
878 | #define FC_EMBEDDED_BITMAP_OBJECT 39 | |
c2c6976d | 879 | #define FC_DECORATIVE_OBJECT 40 |
7f37423d | 880 | |
7ce19673 KP |
881 | FcBool |
882 | FcNameBool (const FcChar8 *v, FcBool *result); | |
7fd7221e | 883 | |
7ce19673 KP |
884 | FcBool |
885 | FcObjectValidType (FcObject object, FcType type); | |
4262e0b3 | 886 | |
7ce19673 KP |
887 | FcObject |
888 | FcObjectFromName (const char * name); | |
4262e0b3 | 889 | |
7f37423d | 890 | const char * |
7ce19673 | 891 | FcObjectName (FcObject object); |
7f37423d | 892 | |
09f9f6f6 KP |
893 | FcBool |
894 | FcObjectInit (void); | |
7f37423d PL |
895 | |
896 | void | |
09f9f6f6 KP |
897 | FcObjectFini (void); |
898 | ||
899 | #define FcObjectCompare(a, b) ((int) a - (int) b) | |
4262e0b3 | 900 | |
24330d27 | 901 | /* fcpat.c */ |
4262e0b3 PL |
902 | |
903 | FcValue | |
904 | FcValueCanonicalize (const FcValue *v); | |
905 | ||
24330d27 | 906 | void |
cd2ec1a9 PL |
907 | FcValueListDestroy (FcValueListPtr l); |
908 | ||
24330d27 | 909 | FcPatternElt * |
7ce19673 | 910 | FcPatternObjectFindElt (const FcPattern *p, FcObject object); |
e9be9cd1 KP |
911 | |
912 | FcPatternElt * | |
7ce19673 | 913 | FcPatternObjectInsertElt (FcPattern *p, FcObject object); |
24330d27 | 914 | |
82f4243f | 915 | FcBool |
7ce19673 KP |
916 | FcPatternObjectAddWithBinding (FcPattern *p, |
917 | FcObject object, | |
918 | FcValue value, | |
919 | FcValueBinding binding, | |
920 | FcBool append); | |
82f4243f | 921 | |
7ce19673 KP |
922 | FcBool |
923 | FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append); | |
924 | ||
925 | FcBool | |
926 | FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append); | |
927 | ||
928 | FcResult | |
929 | FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v); | |
930 | ||
931 | FcBool | |
932 | FcPatternObjectDel (FcPattern *p, FcObject object); | |
34cd0514 | 933 | |
4f27c1c0 | 934 | FcBool |
7ce19673 | 935 | FcPatternObjectRemove (FcPattern *p, FcObject object, int id); |
4f27c1c0 | 936 | |
7ce19673 KP |
937 | FcBool |
938 | FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i); | |
cd2ec1a9 | 939 | |
7ce19673 KP |
940 | FcBool |
941 | FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d); | |
cd2ec1a9 | 942 | |
7ce19673 KP |
943 | FcBool |
944 | FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s); | |
cd2ec1a9 | 945 | |
7ce19673 KP |
946 | FcBool |
947 | FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s); | |
cd2ec1a9 | 948 | |
7ce19673 KP |
949 | FcBool |
950 | FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c); | |
7fd7221e | 951 | |
7ce19673 KP |
952 | FcBool |
953 | FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b); | |
cd2ec1a9 | 954 | |
7ce19673 KP |
955 | FcBool |
956 | FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls); | |
957 | ||
958 | FcResult | |
959 | FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i); | |
960 | ||
961 | FcResult | |
962 | FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d); | |
9ab79bdf | 963 | |
7ce19673 KP |
964 | FcResult |
965 | FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s); | |
9ab79bdf | 966 | |
7ce19673 KP |
967 | FcResult |
968 | FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s); | |
9ab79bdf | 969 | |
7ce19673 KP |
970 | FcResult |
971 | FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c); | |
9ab79bdf | 972 | |
7ce19673 KP |
973 | FcResult |
974 | FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b); | |
cd2ec1a9 | 975 | |
7ce19673 KP |
976 | FcResult |
977 | FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls); | |
978 | ||
979 | void | |
980 | FcPatternFini (void); | |
981 | ||
982 | FcBool | |
983 | FcPatternAppend (FcPattern *p, FcPattern *s); | |
984 | ||
985 | const FcChar8 * | |
986 | FcStrStaticName (const FcChar8 *name); | |
987 | ||
988 | FcChar32 | |
989 | FcStringHash (const FcChar8 *s); | |
990 | ||
991 | FcBool | |
992 | FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat); | |
cd2ec1a9 | 993 | |
cd2ec1a9 | 994 | FcPattern * |
7ce19673 | 995 | FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat); |
212c9f43 | 996 | |
7ce19673 KP |
997 | FcBool |
998 | FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat); | |
999 | ||
1000 | FcValueList * | |
1001 | FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat); | |
212c9f43 | 1002 | |
24330d27 KP |
1003 | /* fcrender.c */ |
1004 | ||
1005 | /* fcmatrix.c */ | |
327a7fd4 | 1006 | |
4262e0b3 | 1007 | extern const FcMatrix FcIdentityMatrix; |
327a7fd4 | 1008 | |
24330d27 KP |
1009 | void |
1010 | FcMatrixFree (FcMatrix *mat); | |
1011 | ||
1012 | /* fcstr.c */ | |
cd2ec1a9 PL |
1013 | void |
1014 | FcStrSetSort (FcStrSet * set); | |
1015 | ||
ccb3e93b KP |
1016 | FcChar8 * |
1017 | FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); | |
24330d27 KP |
1018 | |
1019 | void | |
ccb3e93b | 1020 | FcStrFree (FcChar8 *s); |
24330d27 | 1021 | |
c2e7c611 KP |
1022 | void |
1023 | FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size); | |
1024 | ||
1025 | void | |
1026 | FcStrBufDestroy (FcStrBuf *buf); | |
1027 | ||
1028 | FcChar8 * | |
1029 | FcStrBufDone (FcStrBuf *buf); | |
1030 | ||
1031 | FcBool | |
1032 | FcStrBufChar (FcStrBuf *buf, FcChar8 c); | |
1033 | ||
1034 | FcBool | |
1035 | FcStrBufString (FcStrBuf *buf, const FcChar8 *s); | |
1036 | ||
1037 | FcBool | |
1038 | FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len); | |
1039 | ||
82f4243f KP |
1040 | int |
1041 | FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
1042 | ||
11fec41c KP |
1043 | const FcChar8 * |
1044 | FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
1045 | ||
1046 | const FcChar8 * | |
1047 | FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); | |
1048 | ||
ff3f1f98 KP |
1049 | FcBool |
1050 | FcStrUsesHome (const FcChar8 *s); | |
1051 | ||
daeed6e0 TL |
1052 | FcChar8 * |
1053 | FcStrLastSlash (const FcChar8 *path); | |
1054 | ||
192296d8 KP |
1055 | FcChar32 |
1056 | FcStrHashIgnoreCase (const FcChar8 *s); | |
1057 | ||
0d9e31c8 KP |
1058 | FcChar8 * |
1059 | FcStrCanonFilename (const FcChar8 *s); | |
1060 | ||
7ce19673 KP |
1061 | FcBool |
1062 | FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str); | |
1063 | ||
1064 | FcChar8 * | |
1065 | FcStrSerialize (FcSerialize *serialize, const FcChar8 *str); | |
1066 | ||
24330d27 | 1067 | #endif /* _FC_INT_H_ */ |