1// Copyright 2013 The Servo Project Developers. See the LICENSE
2// file at the top-level directory of this distribution.
3//
4// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7// option. This file may not be copied, modified, or distributed
8// except according to those terms.
9
10#![allow(non_upper_case_globals)]
11#![allow(non_camel_case_types)]
12#![allow(non_snake_case)]
13
14#[macro_use]
15extern crate const_cstr;
16
17use std::os::raw::{c_char, c_double, c_int, c_uchar, c_uint, c_ushort, c_void};
18
19pub use dlib::ffi_dispatch;
20
21#[cfg(feature = "dlopen")]
22pub mod statics {
23 use super::Fc;
24 use once_cell::sync::Lazy;
25
26 static SONAME: &str = if cfg!(windows) {
27 "libfontconfig.dll"
28 } else if cfg!(target_vendor = "apple") {
29 "libfontconfig.dylib.1"
30 } else {
31 "libfontconfig.so.1"
32 };
33
34 pub static LIB_RESULT: Lazy<Result<Fc, dlib::DlError>> =
35 Lazy::new(|| unsafe { Fc::open(name:SONAME) });
36
37 pub static LIB: Lazy<&'static Fc> = Lazy::new(|| LIB_RESULT.as_ref().unwrap());
38}
39
40pub type FcChar8 = c_uchar;
41pub type FcChar16 = c_ushort;
42pub type FcChar32 = c_uint;
43pub type FcBool = c_int;
44
45pub type enum__FcType = c_uint;
46pub const FcTypeVoid: u32 = 0_u32;
47pub const FcTypeInteger: u32 = 1_u32;
48pub const FcTypeDouble: u32 = 2_u32;
49pub const FcTypeString: u32 = 3_u32;
50pub const FcTypeBool: u32 = 4_u32;
51pub const FcTypeMatrix: u32 = 5_u32;
52pub const FcTypeCharSet: u32 = 6_u32;
53pub const FcTypeFTFace: u32 = 7_u32;
54pub const FcTypeLangSet: u32 = 8_u32;
55
56pub type FcType = enum__FcType;
57
58pub mod constants {
59 use super::c_int;
60
61 pub const FC_WEIGHT_THIN: c_int = 0;
62 pub const FC_WEIGHT_EXTRALIGHT: c_int = 40;
63 pub const FC_WEIGHT_ULTRALIGHT: c_int = FC_WEIGHT_EXTRALIGHT;
64 pub const FC_WEIGHT_LIGHT: c_int = 50;
65 pub const FC_WEIGHT_BOOK: c_int = 75;
66 pub const FC_WEIGHT_REGULAR: c_int = 80;
67 pub const FC_WEIGHT_NORMAL: c_int = FC_WEIGHT_REGULAR;
68 pub const FC_WEIGHT_MEDIUM: c_int = 100;
69 pub const FC_WEIGHT_DEMIBOLD: c_int = 180;
70 pub const FC_WEIGHT_SEMIBOLD: c_int = FC_WEIGHT_DEMIBOLD;
71 pub const FC_WEIGHT_BOLD: c_int = 200;
72 pub const FC_WEIGHT_EXTRABOLD: c_int = 205;
73 pub const FC_WEIGHT_ULTRABOLD: c_int = FC_WEIGHT_EXTRABOLD;
74 pub const FC_WEIGHT_BLACK: c_int = 210;
75 pub const FC_WEIGHT_HEAVY: c_int = FC_WEIGHT_BLACK;
76 pub const FC_WEIGHT_EXTRABLACK: c_int = 215;
77 pub const FC_WEIGHT_ULTRABLACK: c_int = FC_WEIGHT_EXTRABLACK;
78
79 pub const FC_SLANT_ROMAN: c_int = 0;
80 pub const FC_SLANT_ITALIC: c_int = 100;
81 pub const FC_SLANT_OBLIQUE: c_int = 110;
82
83 pub const FC_WIDTH_ULTRACONDENSED: c_int = 50;
84 pub const FC_WIDTH_EXTRACONDENSED: c_int = 63;
85 pub const FC_WIDTH_CONDENSED: c_int = 75;
86 pub const FC_WIDTH_SEMICONDENSED: c_int = 87;
87 pub const FC_WIDTH_NORMAL: c_int = 100;
88 pub const FC_WIDTH_SEMIEXPANDED: c_int = 113;
89 pub const FC_WIDTH_EXPANDED: c_int = 125;
90 pub const FC_WIDTH_EXTRAEXPANDED: c_int = 150;
91 pub const FC_WIDTH_ULTRAEXPANDED: c_int = 200;
92
93 pub const FC_PROPORTIONAL: c_int = 0;
94 pub const FC_DUAL: c_int = 90;
95 pub const FC_MONO: c_int = 100;
96 pub const FC_CHARCELL: c_int = 110;
97
98 pub const FC_RGBA_UNKNOWN: c_int = 0;
99 pub const FC_RGBA_RGB: c_int = 1;
100 pub const FC_RGBA_BGR: c_int = 2;
101 pub const FC_RGBA_VRGB: c_int = 3;
102 pub const FC_RGBA_VBGR: c_int = 4;
103 pub const FC_RGBA_NONE: c_int = 5;
104
105 pub const FC_HINT_NONE: c_int = 0;
106 pub const FC_HINT_SLIGHT: c_int = 1;
107 pub const FC_HINT_MEDIUM: c_int = 2;
108 pub const FC_HINT_FULL: c_int = 3;
109
110 pub const FC_LCD_NONE: c_int = 0;
111 pub const FC_LCD_DEFAULT: c_int = 1;
112 pub const FC_LCD_LIGHT: c_int = 2;
113 pub const FC_LCD_LEGACY: c_int = 3;
114
115 pub const FC_CHARSET_MAP_SIZE: c_int = 8;
116 pub const FC_CHARSET_DONE: u32 = u32::MAX;
117 pub const FC_UTF8_MAX_LEN: c_int = 6;
118
119 const_cstr! {
120 pub FC_FAMILY = "family";
121 pub FC_STYLE = "style";
122 pub FC_SLANT = "slant";
123 pub FC_WEIGHT = "weight";
124 pub FC_SIZE = "size";
125 pub FC_ASPECT = "aspect";
126 pub FC_PIXEL_SIZE = "pixelsize";
127 pub FC_SPACING = "spacing";
128 pub FC_FOUNDRY = "foundry";
129 pub FC_ANTIALIAS = "antialias";
130 pub FC_HINTING = "hinting";
131 pub FC_HINT_STYLE = "hintstyle";
132 pub FC_VERTICAL_LAYOUT = "verticallayout";
133 pub FC_AUTOHINT = "autohint";
134 pub FC_GLOBAL_ADVANCE = "globaladvance";
135 pub FC_WIDTH = "width";
136 pub FC_FILE = "file";
137 pub FC_INDEX = "index";
138 pub FC_FT_FACE = "ftface";
139 pub FC_RASTERIZER = "rasterizer";
140 pub FC_OUTLINE = "outline";
141 pub FC_SCALABLE = "scalable";
142 pub FC_COLOR = "color";
143 pub FC_VARIABLE = "variable";
144 pub FC_SCALE = "scale";
145 pub FC_SYMBOL = "symbol";
146 pub FC_DPI = "dpi";
147 pub FC_RGBA = "rgba";
148 pub FC_MINSPACE = "minspace";
149 pub FC_SOURCE = "source";
150 pub FC_CHARSET = "charset";
151 pub FC_LANG = "lang";
152 pub FC_FONTVERSION = "fontversion";
153 pub FC_FULLNAME = "fullname";
154 pub FC_FAMILYLANG = "familylang";
155 pub FC_STYLELANG = "stylelang";
156 pub FC_FULLNAMELANG = "fullnamelang";
157 pub FC_CAPABILITY = "capability";
158 pub FC_FONTFORMAT = "fontformat";
159 pub FC_EMBOLDEN = "embolden";
160 pub FC_EMBEDDED_BITMAP = "embeddedbitmap";
161 pub FC_DECORATIVE = "decorative";
162 pub FC_LCD_FILTER = "lcdfilter";
163 pub FC_FONT_FEATURES = "fontfeatures";
164 pub FC_FONT_VARIATIONS = "fontvariations";
165 pub FC_NAMELANG = "namelang";
166 pub FC_PRGNAME = "prgname";
167 pub FC_HASH = "hash";
168 pub FC_POSTSCRIPT_NAME = "postscriptname";
169 pub FC_FONT_HAS_HINT = "fonthashint";
170 pub FC_CACHE_SUFFIX = ".cache-";
171 pub FC_DIR_CACHE_FILE = "fonts.cache-";
172 pub FC_USER_CACHE_FILE = ".fonts.cache-";
173 pub FC_CHARWIDTH = "charwidth";
174 pub FC_CHAR_WIDTH = "charwidth";
175 pub FC_CHAR_HEIGHT = "charheight";
176 pub FC_MATRIX = "matrix";
177 pub FC_ORDER = "order";
178 }
179}
180
181#[repr(C)]
182#[derive(Copy, Clone)]
183pub struct struct__FcMatrix {
184 pub xx: c_double,
185 pub xy: c_double,
186 pub yx: c_double,
187 pub yy: c_double,
188}
189
190pub type FcMatrix = struct__FcMatrix;
191
192pub type struct__FcCharSet = c_void;
193
194pub type FcCharSet = struct__FcCharSet;
195
196#[repr(C)]
197#[allow(missing_copy_implementations)]
198pub struct struct__FcObjectType {
199 pub object: *mut c_char,
200 pub _type: FcType,
201}
202
203pub type FcObjectType = struct__FcObjectType;
204
205#[repr(C)]
206#[allow(missing_copy_implementations)]
207pub struct struct__FcConstant {
208 pub name: *mut FcChar8,
209 pub object: *mut c_char,
210 pub value: c_int,
211}
212
213pub type FcConstant = struct__FcConstant;
214
215pub type enum__FcResult = c_uint;
216pub const FcResultMatch: u32 = 0_u32;
217pub const FcResultNoMatch: u32 = 1_u32;
218pub const FcResultTypeMismatch: u32 = 2_u32;
219pub const FcResultNoId: u32 = 3_u32;
220pub const FcResultOutOfMemory: u32 = 4_u32;
221
222pub type FcResult = enum__FcResult;
223
224pub type struct__FcPattern = c_void;
225
226pub type FcPattern = struct__FcPattern;
227
228pub type struct__FcLangSet = c_void;
229
230pub type FcLangSet = struct__FcLangSet;
231
232#[repr(C)]
233#[allow(missing_copy_implementations)]
234pub struct struct__FcValue {
235 pub _type: FcType,
236 pub u: union_unnamed1,
237}
238
239pub type FcValue = struct__FcValue;
240
241#[repr(C)]
242#[allow(missing_copy_implementations)]
243pub struct struct__FcFontSet {
244 pub nfont: c_int,
245 pub sfont: c_int,
246 pub fonts: *mut *mut FcPattern,
247}
248
249pub type FcFontSet = struct__FcFontSet;
250
251#[repr(C)]
252#[allow(missing_copy_implementations)]
253pub struct struct__FcObjectSet {
254 pub nobject: c_int,
255 pub sobject: c_int,
256 pub objects: *mut *mut c_char,
257}
258
259pub type FcObjectSet = struct__FcObjectSet;
260
261pub type enum__FcMatchKind = c_uint;
262pub const FcMatchPattern: u32 = 0_u32;
263pub const FcMatchFont: u32 = 1_u32;
264pub const FcMatchScan: u32 = 2_u32;
265
266pub type FcMatchKind = enum__FcMatchKind;
267
268pub type enum__FcLangResult = c_uint;
269pub const FcLangEqual: u32 = 0_u32;
270pub const FcLangDifferentCountry: u32 = 1_u32;
271pub const FcLangDifferentTerritory: u32 = 1_u32;
272pub const FcLangDifferentLang: u32 = 2_u32;
273
274pub type FcLangResult = enum__FcLangResult;
275
276pub type enum__FcSetName = c_uint;
277pub const FcSetSystem: u32 = 0_u32;
278pub const FcSetApplication: u32 = 1_u32;
279
280pub type FcSetName = enum__FcSetName;
281
282pub type struct__FcAtomic = c_void;
283
284pub type FcAtomic = struct__FcAtomic;
285
286pub type FcEndian = c_uint;
287pub const FcEndianBig: u32 = 0_u32;
288pub const FcEndianLittle: u32 = 1_u32;
289
290pub type struct__FcConfig = c_void;
291
292pub type FcConfig = struct__FcConfig;
293
294pub type struct__FcGlobalCache = c_void;
295
296pub type FcFileCache = struct__FcGlobalCache;
297
298pub type struct__FcBlanks = c_void;
299
300pub type FcBlanks = struct__FcBlanks;
301
302pub type struct__FcStrList = c_void;
303
304pub type FcStrList = struct__FcStrList;
305
306pub type struct__FcStrSet = c_void;
307
308pub type FcStrSet = struct__FcStrSet;
309
310pub type struct__FcCache = c_void;
311
312pub type FcCache = struct__FcCache;
313
314pub type union_unnamed1 = c_void;
315
316dlib::external_library!(Fc, "fontconfig",
317 functions:
318 fn FcBlanksCreate() -> *mut FcBlanks,
319
320 fn FcBlanksDestroy(*mut FcBlanks) -> (),
321
322 fn FcBlanksAdd(*mut FcBlanks, FcChar32) -> FcBool,
323
324 fn FcBlanksIsMember(*mut FcBlanks, FcChar32) -> FcBool,
325
326 fn FcCacheDir(*mut FcCache) -> *const FcChar8,
327
328 fn FcCacheCopySet(*const FcCache) -> *mut FcFontSet,
329
330 fn FcCacheSubdir(*const FcCache, c_int) -> *const FcChar8,
331
332 fn FcCacheNumSubdir(*const FcCache) -> c_int,
333
334 fn FcCacheNumFont(*const FcCache) -> c_int,
335
336 fn FcDirCacheUnlink(*const FcChar8, *mut FcConfig) -> FcBool,
337
338 fn FcDirCacheValid(*const FcChar8) -> FcBool,
339
340 fn FcConfigHome() -> *mut FcChar8,
341
342 fn FcConfigEnableHome(FcBool) -> FcBool,
343
344 fn FcConfigFilename(*const FcChar8) -> *mut FcChar8,
345
346 fn FcConfigCreate() -> *mut FcConfig,
347
348 fn FcConfigReference(*mut FcConfig) -> *mut FcConfig,
349
350 fn FcConfigDestroy(*mut FcConfig) -> (),
351
352 fn FcConfigSetCurrent(*mut FcConfig) -> FcBool,
353
354 fn FcConfigGetCurrent() -> *mut FcConfig,
355
356 fn FcConfigUptoDate(*mut FcConfig) -> FcBool,
357
358 fn FcConfigBuildFonts(*mut FcConfig) -> FcBool,
359
360 fn FcConfigGetFontDirs(*mut FcConfig) -> *mut FcStrList,
361
362 fn FcConfigGetConfigDirs(*mut FcConfig) -> *mut FcStrList,
363
364 fn FcConfigGetConfigFiles(*mut FcConfig) -> *mut FcStrList,
365
366 fn FcConfigGetCache(*mut FcConfig) -> *mut FcChar8,
367
368 fn FcConfigGetBlanks(*mut FcConfig) -> *mut FcBlanks,
369
370 fn FcConfigGetCacheDirs(*const FcConfig) -> *mut FcStrList,
371
372 fn FcConfigGetRescanInterval(*mut FcConfig) -> c_int,
373
374 fn FcConfigSetRescanInterval(*mut FcConfig, c_int) -> FcBool,
375
376 fn FcConfigGetFonts(*mut FcConfig, FcSetName) -> *mut FcFontSet,
377
378 fn FcConfigAppFontAddFile(*mut FcConfig, *const FcChar8) -> FcBool,
379
380 fn FcConfigAppFontAddDir(*mut FcConfig, *const FcChar8) -> FcBool,
381
382 fn FcConfigAppFontClear(*mut FcConfig) -> (),
383
384 fn FcConfigSubstituteWithPat(
385 *mut FcConfig,
386 *mut FcPattern,
387 *mut FcPattern,
388 FcMatchKind
389 ) -> FcBool,
390
391 fn FcConfigSubstitute(
392 *mut FcConfig,
393 *mut FcPattern,
394 FcMatchKind
395 ) -> FcBool,
396
397 fn FcCharSetCreate() -> *mut FcCharSet,
398
399 fn FcCharSetNew() -> *mut FcCharSet,
400
401 fn FcCharSetDestroy(*mut FcCharSet) -> (),
402
403 fn FcCharSetAddChar(*mut FcCharSet, FcChar32) -> FcBool,
404
405 fn FcCharSetDelChar(*mut FcCharSet, FcChar32) -> FcBool,
406
407 fn FcCharSetCopy(*mut FcCharSet) -> *mut FcCharSet,
408
409 fn FcCharSetEqual(*const FcCharSet, *const FcCharSet) -> FcBool,
410
411 fn FcCharSetIntersect(*const FcCharSet, *const FcCharSet) -> *mut FcCharSet,
412
413 fn FcCharSetUnion(*const FcCharSet, *const FcCharSet) -> *mut FcCharSet,
414
415 fn FcCharSetSubtract(*const FcCharSet, *const FcCharSet) -> *mut FcCharSet,
416
417 fn FcCharSetMerge(*mut FcCharSet, *const FcCharSet, *mut FcBool) -> FcBool,
418
419 fn FcCharSetHasChar(*const FcCharSet, FcChar32) -> FcBool,
420
421 fn FcCharSetCount(*const FcCharSet) -> FcChar32,
422
423 fn FcCharSetIntersectCount(*const FcCharSet, *const FcCharSet) -> FcChar32,
424
425 fn FcCharSetSubtractCount(*const FcCharSet, *const FcCharSet) -> FcChar32,
426
427 fn FcCharSetIsSubset(*const FcCharSet, *const FcCharSet) -> FcBool,
428
429 fn FcCharSetFirstPage(
430 *const FcCharSet,
431 *mut FcChar32,
432 *mut FcChar32
433 ) -> FcChar32,
434
435 fn FcCharSetNextPage(
436 *const FcCharSet,
437 *mut FcChar32,
438 *mut FcChar32
439 ) -> FcChar32,
440
441 fn FcCharSetCoverage(
442 *const FcCharSet,
443 FcChar32,
444 *mut FcChar32
445 ) -> FcChar32,
446
447 fn FcValuePrint(FcValue) -> (),
448
449 fn FcPatternPrint(*const FcPattern) -> (),
450
451 fn FcFontSetPrint(*mut FcFontSet) -> (),
452
453 fn FcDefaultSubstitute(*mut FcPattern) -> (),
454
455 fn FcFileIsDir(*const FcChar8) -> FcBool,
456
457 fn FcFileScan(
458 *mut FcFontSet,
459 *mut FcStrSet,
460 *mut FcFileCache,
461 *mut FcBlanks,
462 *const FcChar8,
463 FcBool
464 ) -> FcBool,
465
466 fn FcDirScan(
467 *mut FcFontSet,
468 *mut FcStrSet,
469 *mut FcFileCache,
470 *mut FcBlanks,
471 *const FcChar8,
472 FcBool
473 ) -> FcBool,
474
475 fn FcDirSave(*mut FcFontSet, *const FcStrSet, *mut FcChar8) -> FcBool,
476
477 fn FcDirCacheLoad(
478 *const FcChar8,
479 *mut FcConfig,
480 *mut *mut FcChar8
481 ) -> *mut FcCache,
482
483 fn FcDirCacheRead(
484 *const FcChar8,
485 FcBool,
486 *mut FcConfig
487 ) -> *mut FcCache,
488
489 // fn FcDirCacheLoadFile(*mut FcChar8, *mut struct_stat) -> *mut FcCache,
490
491 fn FcDirCacheUnload(*mut FcCache) -> (),
492
493 fn FcFreeTypeQuery(
494 *const FcChar8,
495 c_int,
496 *mut FcBlanks,
497 *mut c_int
498 ) -> *mut FcPattern,
499
500 fn FcFontSetCreate() -> *mut FcFontSet,
501
502 fn FcFontSetDestroy(*mut FcFontSet) -> (),
503
504 fn FcFontSetAdd(*mut FcFontSet, *mut FcPattern) -> FcBool,
505
506 fn FcInitLoadConfig() -> *mut FcConfig,
507
508 fn FcInitLoadConfigAndFonts() -> *mut FcConfig,
509
510 fn FcInit() -> FcBool,
511
512 fn FcFini() -> (),
513
514 fn FcGetVersion() -> c_int,
515
516 fn FcInitReinitialize() -> FcBool,
517
518 fn FcInitBringUptoDate() -> FcBool,
519
520 fn FcGetLangs() -> *mut FcStrSet,
521
522 fn FcLangGetCharSet(*const FcChar8) -> *mut FcCharSet,
523
524 fn FcLangSetCreate() -> *mut FcLangSet,
525
526 fn FcLangSetDestroy(*mut FcLangSet) -> (),
527
528 fn FcLangSetCopy(*const FcLangSet) -> *mut FcLangSet,
529
530 fn FcLangSetAdd(*mut FcLangSet, *const FcChar8) -> FcBool,
531
532 fn FcLangSetHasLang(*const FcLangSet, *const FcChar8) -> FcLangResult,
533
534 fn FcLangSetCompare(*const FcLangSet, *const FcLangSet) -> FcLangResult,
535
536 fn FcLangSetContains(*const FcLangSet, *const FcLangSet) -> FcBool,
537
538 fn FcLangSetEqual(*const FcLangSet, *const FcLangSet) -> FcBool,
539
540 fn FcLangSetHash(*const FcLangSet) -> FcChar32,
541
542 fn FcLangSetGetLangs(*const FcLangSet) -> *mut FcStrSet,
543
544 fn FcObjectSetCreate() -> *mut FcObjectSet,
545
546 fn FcObjectSetAdd(*mut FcObjectSet, *const c_char) -> FcBool,
547
548 fn FcObjectSetDestroy(*mut FcObjectSet) -> (),
549
550 // fn FcObjectSetVaBuild(*mut c_char, *mut __va_list_tag) -> *mut FcObjectSet,
551
552 fn FcFontSetList(
553 *mut FcConfig,
554 *mut *mut FcFontSet,
555 c_int,
556 *mut FcPattern,
557 *mut FcObjectSet
558 ) -> *mut FcFontSet,
559
560 fn FcFontList(
561 *mut FcConfig,
562 *mut FcPattern,
563 *mut FcObjectSet
564 ) -> *mut FcFontSet,
565
566 fn FcAtomicCreate(*const FcChar8) -> *mut FcAtomic,
567
568 fn FcAtomicLock(*mut FcAtomic) -> FcBool,
569
570 fn FcAtomicNewFile(*mut FcAtomic) -> *mut FcChar8,
571
572 fn FcAtomicOrigFile(*mut FcAtomic) -> *mut FcChar8,
573
574 fn FcAtomicReplaceOrig(*mut FcAtomic) -> FcBool,
575
576 fn FcAtomicDeleteNew(*mut FcAtomic) -> (),
577
578 fn FcAtomicUnlock(*mut FcAtomic) -> (),
579
580 fn FcAtomicDestroy(*mut FcAtomic) -> (),
581
582 fn FcFontSetMatch(
583 *mut FcConfig,
584 *mut *mut FcFontSet,
585 c_int,
586 *mut FcPattern,
587 *mut FcResult
588 ) -> *mut FcPattern,
589
590 fn FcFontMatch(
591 *mut FcConfig,
592 *mut FcPattern,
593 *mut FcResult
594 ) -> *mut FcPattern,
595
596 fn FcFontRenderPrepare(
597 *mut FcConfig,
598 *mut FcPattern,
599 *mut FcPattern
600 ) -> *mut FcPattern,
601
602 fn FcFontSetSort(
603 *mut FcConfig,
604 *mut *mut FcFontSet,
605 c_int,
606 *mut FcPattern,
607 FcBool,
608 *mut *mut FcCharSet,
609 *mut FcResult
610 ) -> *mut FcFontSet,
611
612 fn FcFontSort(
613 *mut FcConfig,
614 *mut FcPattern,
615 FcBool,
616 *mut *mut FcCharSet,
617 *mut FcResult
618 ) -> *mut FcFontSet,
619
620 fn FcFontSetSortDestroy(*mut FcFontSet) -> (),
621
622 fn FcMatrixCopy(*const FcMatrix) -> *mut FcMatrix,
623
624 fn FcMatrixEqual(*const FcMatrix, *const FcMatrix) -> FcBool,
625
626 fn FcMatrixMultiply(*mut FcMatrix, *const FcMatrix, *const FcMatrix) -> (),
627
628 fn FcMatrixRotate(*mut FcMatrix, c_double, c_double) -> (),
629
630 fn FcMatrixScale(*mut FcMatrix, c_double, c_double) -> (),
631
632 fn FcMatrixShear(*mut FcMatrix, c_double, c_double) -> (),
633
634 fn FcNameRegisterObjectTypes(*const FcObjectType, c_int) -> FcBool,
635
636 fn FcNameUnregisterObjectTypes(*const FcObjectType, c_int) -> FcBool,
637
638 fn FcNameGetObjectType(*const c_char) -> *const FcObjectType,
639
640 fn FcNameRegisterConstants(*const FcConstant, c_int) -> FcBool,
641
642 fn FcNameUnregisterConstants(*const FcConstant, c_int) -> FcBool,
643
644 fn FcNameGetConstant(*mut FcChar8) -> *const FcConstant,
645
646 fn FcNameConstant(*mut FcChar8, *mut c_int) -> FcBool,
647
648 fn FcNameParse(*const FcChar8) -> *mut FcPattern,
649
650 fn FcNameUnparse(*mut FcPattern) -> *mut FcChar8,
651
652 fn FcPatternCreate() -> *mut FcPattern,
653
654 fn FcPatternDuplicate(*const FcPattern) -> *mut FcPattern,
655
656 fn FcPatternReference(*mut FcPattern) -> (),
657
658 fn FcPatternFilter(*mut FcPattern, *const FcObjectSet) -> *mut FcPattern,
659
660 fn FcValueDestroy(FcValue) -> (),
661
662 fn FcValueEqual(FcValue, FcValue) -> FcBool,
663
664 fn FcValueSave(FcValue) -> FcValue,
665
666 fn FcPatternDestroy(*mut FcPattern) -> (),
667
668 fn FcPatternEqual(*const FcPattern, *const FcPattern) -> FcBool,
669
670 fn FcPatternEqualSubset(
671 *const FcPattern,
672 *const FcPattern,
673 *const FcObjectSet
674 ) -> FcBool,
675
676 fn FcPatternHash(*const FcPattern) -> FcChar32,
677
678 fn FcPatternAdd(
679 *mut FcPattern,
680 *const c_char,
681 FcValue,
682 FcBool
683 ) -> FcBool,
684
685 fn FcPatternAddWeak(
686 *mut FcPattern,
687 *const c_char,
688 FcValue,
689 FcBool
690 ) -> FcBool,
691
692 fn FcPatternGet(
693 *mut FcPattern,
694 *const c_char,
695 c_int,
696 *mut FcValue
697 ) -> FcResult,
698
699 fn FcPatternDel(*mut FcPattern, *const c_char) -> FcBool,
700
701 fn FcPatternRemove(*mut FcPattern, *const c_char, c_int) -> FcBool,
702
703 fn FcPatternAddInteger(*mut FcPattern, *const c_char, c_int) -> FcBool,
704
705 fn FcPatternAddDouble(*mut FcPattern, *const c_char, c_double) -> FcBool,
706
707 fn FcPatternAddString(
708 *mut FcPattern,
709 *const c_char,
710 *const FcChar8
711 ) -> FcBool,
712
713 fn FcPatternAddMatrix(
714 *mut FcPattern,
715 *const c_char,
716 *const FcMatrix
717 ) -> FcBool,
718
719 fn FcPatternAddCharSet(
720 *mut FcPattern,
721 *const c_char,
722 *const FcCharSet
723 ) -> FcBool,
724
725 fn FcPatternAddBool(*mut FcPattern, *const c_char, FcBool) -> FcBool,
726
727 fn FcPatternAddLangSet(
728 *mut FcPattern,
729 *const c_char,
730 *const FcLangSet
731 ) -> FcBool,
732
733 fn FcPatternGetInteger(
734 *mut FcPattern,
735 *const c_char,
736 c_int,
737 *mut c_int
738 ) -> FcResult,
739
740 fn FcPatternGetDouble(
741 *mut FcPattern,
742 *const c_char,
743 c_int,
744 *mut c_double
745 ) -> FcResult,
746
747 fn FcPatternGetString(
748 *mut FcPattern,
749 *const c_char,
750 c_int,
751 *mut *mut FcChar8
752 ) -> FcResult,
753
754 fn FcPatternGetMatrix(
755 *mut FcPattern,
756 *const c_char,
757 c_int,
758 *mut *mut FcMatrix
759 ) -> FcResult,
760
761 fn FcPatternGetCharSet(
762 *mut FcPattern,
763 *const c_char,
764 c_int,
765 *mut *mut FcCharSet
766 ) -> FcResult,
767
768 fn FcPatternGetBool(
769 *mut FcPattern,
770 *const c_char,
771 c_int,
772 *mut FcBool
773 ) -> FcResult,
774
775 fn FcPatternGetLangSet(
776 *mut FcPattern,
777 *const c_char,
778 c_int,
779 *mut *mut FcLangSet
780 ) -> FcResult,
781
782 // The last argument is a pointer to a FreeType Face object (`FT_Face *`)
783 //
784 // <https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_face>
785 fn FcPatternGetFTFace(*mut FcPattern, *const c_char, c_int, *mut *mut c_void) -> FcResult,
786
787 // fn FcPatternVaBuild(*mut FcPattern, *mut __va_list_tag) -> *mut FcPattern,
788
789 fn FcPatternFormat(*mut FcPattern, *const FcChar8) -> *mut FcChar8,
790
791 fn FcStrCopy(*const FcChar8) -> *mut FcChar8,
792
793 fn FcStrCopyFilename(*const FcChar8) -> *mut FcChar8,
794
795 fn FcStrPlus(*const FcChar8, *const FcChar8) -> *mut FcChar8,
796
797 fn FcStrFree(*mut FcChar8) -> (),
798
799 fn FcStrDowncase(*const FcChar8) -> *mut FcChar8,
800
801 fn FcStrCmpIgnoreCase(*const FcChar8, *const FcChar8) -> c_int,
802
803 fn FcStrCmp(*const FcChar8, *const FcChar8) -> c_int,
804
805 fn FcStrStrIgnoreCase(*const FcChar8, *const FcChar8) -> *mut FcChar8,
806
807 fn FcStrStr(*const FcChar8, *const FcChar8) -> *mut FcChar8,
808
809 fn FcUtf8ToUcs4(*mut FcChar8, *mut FcChar32, c_int) -> c_int,
810
811 fn FcUtf8Len(
812 *mut FcChar8,
813 c_int,
814 *mut c_int,
815 *mut c_int
816 ) -> FcBool,
817
818 fn FcUcs4ToUtf8(FcChar32, *mut FcChar8) -> c_int,
819
820 fn FcUtf16ToUcs4(
821 *mut FcChar8,
822 FcEndian,
823 *mut FcChar32,
824 c_int
825 ) -> c_int,
826
827 fn FcUtf16Len(
828 *mut FcChar8,
829 FcEndian,
830 c_int,
831 *mut c_int,
832 *mut c_int
833 ) -> FcBool,
834
835 fn FcStrDirname(*const FcChar8) -> *mut FcChar8,
836
837 fn FcStrBasename(*const FcChar8) -> *mut FcChar8,
838
839 fn FcStrSetCreate() -> *mut FcStrSet,
840
841 fn FcStrSetMember(*mut FcStrSet, *const FcChar8) -> FcBool,
842
843 fn FcStrSetEqual(*mut FcStrSet, *mut FcStrSet) -> FcBool,
844
845 fn FcStrSetAdd(*mut FcStrSet, *const FcChar8) -> FcBool,
846
847 fn FcStrSetAddFilename(*mut FcStrSet, *const FcChar8) -> FcBool,
848
849 fn FcStrSetDel(*mut FcStrSet, *const FcChar8) -> FcBool,
850
851 fn FcStrSetDestroy(*mut FcStrSet) -> (),
852
853 fn FcStrListCreate(*mut FcStrSet) -> *mut FcStrList,
854
855 fn FcStrListNext(*mut FcStrList) -> *mut FcChar8,
856
857 fn FcStrListDone(*mut FcStrList) -> (),
858
859 fn FcConfigParseAndLoad(
860 *mut FcConfig,
861 *const FcChar8,
862 FcBool
863 ) -> FcBool,
864
865 varargs:
866 fn FcPatternBuild(*mut FcPattern) -> *mut FcPattern,
867 fn FcObjectSetBuild(*mut c_char) -> *mut FcObjectSet,
868);
869