-
Notifications
You must be signed in to change notification settings - Fork 71
/
ttfparser.h
733 lines (655 loc) · 20.8 KB
/
ttfparser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
/**
* @file ttfparser.h
*
* A C API for the Rust's ttf-parser library.
*/
#ifndef TTFP_H
#define TTFP_H
#include <stdbool.h>
#include <stdint.h>
#define TTFP_MAJOR_VERSION 0
#define TTFP_MINOR_VERSION 25
#define TTFP_PATCH_VERSION 0
#define TTFP_VERSION "0.25.0"
/**
* @brief A glyph image format.
*/
typedef enum {
/**
* @brief A PNG.
*/
TTFP_RASTER_IMAGE_FORMAT_PNG = 0,
/**
* @brief A monochrome bitmap.
*
* The most significant bit of the first byte corresponds to the top-left pixel, proceeding
* through succeeding bits moving left to right. The data for each row is padded to a byte
* boundary, so the next row begins with the most significant bit of a new byte. 1 corresponds
* to black, and 0 to white.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_MONO = 1,
/**
* @brief A packed monochrome bitmap.
*
* The most significant bit of the first byte corresponds to the top-left pixel, proceeding
* through succeeding bits moving left to right. Data is tightly packed with no padding. 1
* corresponds to black, and 0 to white.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_MONO_PACKED = 2,
/**
* @brief A grayscale bitmap with 2 bits per pixel.
*
* The most significant bits of the first byte corresponds to the top-left pixel, proceeding
* through succeeding bits moving left to right. The data for each row is padded to a byte
* boundary, so the next row begins with the most significant bit of a new byte.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_GRAY_2 = 3,
/**
* @brief A packed grayscale bitmap with 2 bits per pixel.
*
* The most significant bits of the first byte corresponds to the top-left pixel, proceeding
* through succeeding bits moving left to right. Data is tightly packed with no padding.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_GRAY_2_PACKED = 4,
/**
* @brief A grayscale bitmap with 4 bits per pixel.
*
* The most significant bits of the first byte corresponds to the top-left pixel, proceeding
* through succeeding bits moving left to right. The data for each row is padded to a byte
* boundary, so the next row begins with the most significant bit of a new byte.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_GRAY_4 = 5,
/**
* @brief A packed grayscale bitmap with 4 bits per pixel.
*
* The most significant bits of the first byte corresponds to the top-left pixel, proceeding
* through succeeding bits moving left to right. Data is tightly packed with no padding.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_GRAY_4_PACKED = 6,
/**
* @brief A grayscale bitmap with 8 bits per pixel.
*
* The first byte corresponds to the top-left pixel, proceeding through succeeding bytes
* moving left to right.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_GRAY_8 = 7,
/**
* @brief A color bitmap with 32 bits per pixel.
*
* The first group of four bytes corresponds to the top-left pixel, proceeding through
* succeeding pixels moving left to right. Each byte corresponds to a color channel and the
* channels within a pixel are in blue, green, red, alpha order. Color values are
* pre-multiplied by the alpha. For example, the color "full-green with half translucency"
* is encoded as `\x00\x80\x00\x80`, and not `\x00\xFF\x00\x80`.
*/
TTFP_RASTER_IMAGE_FORMAT_BITMAP_PREMUL_BGRA_32 = 8,
} ttfp_raster_image_format;
/**
* @brief An opaque pointer to the font face structure.
*/
typedef struct ttfp_face ttfp_face;
/**
* @brief A name record.
*
* https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-records
*/
typedef struct {
uint16_t platform_id;
uint16_t encoding_id;
uint16_t language_id;
uint16_t name_id;
uint16_t name_size;
} ttfp_name_record;
/**
* @brief A line metrics.
*
* Used for underline and strikeout.
*/
typedef struct {
int16_t position;
int16_t thickness;
} ttfp_line_metrics;
/**
* @brief A script metrics used by subscript and superscript.
*/
typedef struct {
int16_t x_size;
int16_t y_size;
int16_t x_offset;
int16_t y_offset;
} ttfp_script_metrics;
/**
* @brief An outline building interface.
*/
typedef struct {
void (*move_to)(float x, float y, void *data);
void (*line_to)(float x, float y, void *data);
void (*quad_to)(float x1, float y1, float x, float y, void *data);
void (*curve_to)(float x1, float y1, float x2, float y2, float x, float y, void *data);
void (*close_path)(void *data);
} ttfp_outline_builder;
/**
* @brief A rectangle.
*/
typedef struct {
int16_t x_min;
int16_t y_min;
int16_t x_max;
int16_t y_max;
} ttfp_rect;
/**
* @brief A glyph image.
*
* An image offset and size isn't defined in all tables, so `x`, `y`, `width` and `height`
* can be set to 0.
*/
typedef struct {
/**
* Horizontal offset.
*/
int16_t x;
/**
* Vertical offset.
*/
int16_t y;
/**
* Image width.
*
* It doesn't guarantee that this value is the same as set in the `data`.
*/
uint16_t width;
/**
* Image height.
*
* It doesn't guarantee that this value is the same as set in the `data`.
*/
uint16_t height;
/**
* A pixels per em of the selected strike.
*/
uint16_t pixels_per_em;
/**
* An image format.
*/
ttfp_raster_image_format format;
/**
* A raw image data as is. It's up to the caller to decode PNG, JPEG, etc.
*/
const char *data;
/**
* A raw image data size.
*/
uint32_t len;
} ttfp_glyph_raster_image;
/**
* A 4-byte tag.
*/
typedef uint32_t ttfp_tag;
#define TTFP_TAG(c1,c2,c3,c4) \
((ttfp_tag)((((uint32_t)(c1)&0xFF)<<24)| \
(((uint32_t)(c2)&0xFF)<<16)| \
(((uint32_t)(c3)&0xFF)<<8)| \
((uint32_t)(c4)&0xFF)))
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief A variation axis.
*/
typedef struct {
ttfp_tag tag;
float min_value;
float def_value;
float max_value;
/**< An axis name in the `name` table. */
uint16_t name_id;
bool hidden;
} ttfp_variation_axis;
#endif
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/**
* @brief Returns the number of fonts stored in a TrueType font collection.
*
* @param data The font data.
* @param len The size of the font data.
* @return Number of fonts or -1 when provided data is not a TrueType font collection
* or when number of fonts is larger than INT_MAX.
*/
int32_t ttfp_fonts_in_collection(const char *data, uintptr_t len);
/**
* @brief Creates a new font face parser.
*
* Since #ttfp_face is an opaque pointer, a caller should allocate it manually
* using #ttfp_face_size_of.
* Deallocation is also handled by a caller.
* #ttfp_face doesn't use heap internally, so we can simply `free()` it without
* a dedicated `ttfp_face_deinit` function.
*
* @param data A font binary data. Must outlive the #ttfp_face.
* @param len Size of the font data.
* @param index The font face index in a collection (typically *.ttc). 0 should be used for basic fonts.
* @param face A pointer to a #ttfp_face object.
* @return `true` on success.
*/
bool ttfp_face_init(const char *data, uintptr_t len, uint32_t index, void *face);
/**
* @brief Returns the size of `ttfp_face`.
*/
uintptr_t ttfp_face_size_of(void);
/**
* @brief Returns the number of name records in the face.
*/
uint16_t ttfp_get_name_records_count(const ttfp_face *face);
/**
* @brief Returns a name record.
*
* @param Record's index. The total amount can be obtained via #ttfp_get_name_records_count.
* @return `false` when `index` is out of range or `platform_id` is invalid.
*/
bool ttfp_get_name_record(const ttfp_face *face, uint16_t index, ttfp_name_record *record);
/**
* @brief Returns a name record's string.
*
* @param index Record's index.
* @param name A string buffer that will be filled with the record's name.
* Remember that a name will use encoding specified in `ttfp_name_record.encoding_id`
* Because of that, the name will not be null-terminated.
* @param len The size of a string buffer. Must be equal to `ttfp_name_record.name_size`.
* @return `false` when `index` is out of range or string buffer is not equal
* `ttfp_name_record.name_size`.
*/
bool ttfp_get_name_record_string(const ttfp_face *face, uint16_t index, char *name, uintptr_t len);
/**
* @brief Checks that face is marked as *Regular*.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_is_regular(const ttfp_face *face);
/**
* @brief Checks that face is marked as *Italic*.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_is_italic(const ttfp_face *face);
/**
* @brief Checks that face is marked as *Bold*.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_is_bold(const ttfp_face *face);
/**
* @brief Checks that face is marked as *Oblique*.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_is_oblique(const ttfp_face *face);
/**
* @brief Checks that face is marked as *Monospaced*.
*
* @return `false` when `post` table is not present.
*/
bool ttfp_is_monospaced(const ttfp_face *face);
/**
* @brief Checks that face is variable.
*
* Simply checks the presence of a `fvar` table.
*/
bool ttfp_is_variable(const ttfp_face *face);
/**
* @brief Returns face's weight.
*
* @return Face's weight or `400` when OS/2 table is not present.
*/
uint16_t ttfp_get_weight(const ttfp_face *face);
/**
* @brief Returns face's width.
*
* @return Face's width in a 1..9 range or `5` when OS/2 table is not present
* or when value is invalid.
*/
uint16_t ttfp_get_width(const ttfp_face *face);
/**
* @brief Returns face's italic angle.
*
* @return Face's italic angle or `0.0` when `post` table is not present.
*/
float ttfp_get_italic_angle(const ttfp_face *face);
/**
* @brief Returns a horizontal face ascender.
*
* This function is affected by variation axes.
*/
int16_t ttfp_get_ascender(const ttfp_face *face);
/**
* @brief Returns a horizontal face descender.
*
* This function is affected by variation axes.
*/
int16_t ttfp_get_descender(const ttfp_face *face);
/**
* @brief Returns a horizontal face height.
*
* This function is affected by variation axes.
*/
int16_t ttfp_get_height(const ttfp_face *face);
/**
* @brief Returns a horizontal face line gap.
*
* This function is affected by variation axes.
*/
int16_t ttfp_get_line_gap(const ttfp_face *face);
/**
* @brief Returns a horizontal typographic face ascender.
*
* Prefer `ttfp_get_ascender` unless you explicitly want this. This is a more
* low-level alternative.
*
* This function is affected by variation axes.
*
* @return `0` when OS/2 table is not present.
*/
int16_t ttfp_get_typographic_ascender(const ttfp_face *face);
/**
* @brief Returns a horizontal typographic face descender.
*
* Prefer `ttfp_get_descender` unless you explicitly want this. This is a more
* low-level alternative.
*
* This function is affected by variation axes.
*
* @return `0` when OS/2 table is not present.
*/
int16_t ttfp_get_typographic_descender(const ttfp_face *face);
/**
* @brief Returns a horizontal typographic face line gap.
*
* Prefer `ttfp_get_line_gap` unless you explicitly want this. This is a more
* low-level alternative.
*
* This function is affected by variation axes.
*
* @return `0` when OS/2 table is not present.
*/
int16_t ttfp_get_typographic_line_gap(const ttfp_face *face);
/**
* @brief Returns a vertical face ascender.
*
* This function is affected by variation axes.
*
* @return `0` when `vhea` table is not present.
*/
int16_t ttfp_get_vertical_ascender(const ttfp_face *face);
/**
* @brief Returns a vertical face descender.
*
* This function is affected by variation axes.
*
* @return `0` when `vhea` table is not present.
*/
int16_t ttfp_get_vertical_descender(const ttfp_face *face);
/**
* @brief Returns a vertical face height.
*
* This function is affected by variation axes.
*
* @return `0` when `vhea` table is not present.
*/
int16_t ttfp_get_vertical_height(const ttfp_face *face);
/**
* @brief Returns a vertical face line gap.
*
* This function is affected by variation axes.
*
* @return `0` when `vhea` table is not present.
*/
int16_t ttfp_get_vertical_line_gap(const ttfp_face *face);
/**
* @brief Returns face's units per EM.
*
* @return Units in a 16..16384 range or `0` otherwise.
*/
uint16_t ttfp_get_units_per_em(const ttfp_face *face);
/**
* @brief Returns face's x height.
*
* This function is affected by variation axes.
*
* @return x height or 0 when OS/2 table is not present or when its version is < 2.
*/
int16_t ttfp_get_x_height(const ttfp_face *face);
/**
* @brief Returns face's capital height.
*
* This function is affected by variation axes.
*
* @return capital height or 0 when OS/2 table is not present or when its version is < 2.
*/
int16_t ttfp_get_capital_height(const ttfp_face *face);
/**
* @brief Returns face's underline metrics.
*
* This function is affected by variation axes.
*
* @return `false` when `post` table is not present.
*/
bool ttfp_get_underline_metrics(const ttfp_face *face, ttfp_line_metrics *metrics);
/**
* @brief Returns face's strikeout metrics.
*
* This function is affected by variation axes.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_get_strikeout_metrics(const ttfp_face *face, ttfp_line_metrics *metrics);
/**
* @brief Returns font's subscript metrics.
*
* This function is affected by variation axes.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_get_subscript_metrics(const ttfp_face *face, ttfp_script_metrics *metrics);
/**
* @brief Returns face's superscript metrics.
*
* This function is affected by variation axes.
*
* @return `false` when OS/2 table is not present.
*/
bool ttfp_get_superscript_metrics(const ttfp_face *face, ttfp_script_metrics *metrics);
/**
* @brief Returns a total number of glyphs in the face.
*
* @return The number of glyphs which is never zero.
*/
uint16_t ttfp_get_number_of_glyphs(const ttfp_face *face);
/**
* @brief Resolves a Glyph ID for a code point.
*
* All subtable formats except Mixed Coverage (8) are supported.
*
* @param codepoint A valid Unicode codepoint. Otherwise 0 will be returned.
* @return Returns 0 when glyph is not present or parsing is failed.
*/
uint16_t ttfp_get_glyph_index(const ttfp_face *face, uint32_t codepoint);
/**
* @brief Resolves a variation of a Glyph ID from two code points.
*
* @param codepoint A valid Unicode codepoint. Otherwise 0 will be returned.
* @param variation A valid Unicode codepoint. Otherwise 0 will be returned.
* @return Returns 0 when glyph is not present or parsing is failed.
*/
uint16_t ttfp_get_glyph_var_index(const ttfp_face *face, uint32_t codepoint, uint32_t variation);
/**
* @brief Returns glyph's horizontal advance.
*
* @return Glyph's advance or 0 when not set.
*/
uint16_t ttfp_get_glyph_hor_advance(const ttfp_face *face, uint16_t glyph_id);
/**
* @brief Returns glyph's vertical advance.
*
* This function is affected by variation axes.
*
* @return Glyph's advance or 0 when not set.
*/
uint16_t ttfp_get_glyph_ver_advance(const ttfp_face *face, uint16_t glyph_id);
/**
* @brief Returns glyph's horizontal side bearing.
*
* @return Glyph's side bearing or 0 when not set.
*/
int16_t ttfp_get_glyph_hor_side_bearing(const ttfp_face *face, uint16_t glyph_id);
/**
* @brief Returns glyph's vertical side bearing.
*
* This function is affected by variation axes.
*
* @return Glyph's side bearing or 0 when not set.
*/
int16_t ttfp_get_glyph_ver_side_bearing(const ttfp_face *face, uint16_t glyph_id);
/**
* @brief Returns glyph's vertical origin.
*
* @return Glyph's vertical origin or 0 when not set.
*/
int16_t ttfp_get_glyph_y_origin(const ttfp_face *face, uint16_t glyph_id);
/**
* @brief Returns glyph's name.
*
* Uses the `post` and `CFF` tables as sources.
*
* A glyph name cannot be larger than 255 bytes + 1 byte for '\0'.
*
* @param name A char buffer larger than 256 bytes.
* @return `true` on success.
*/
bool ttfp_get_glyph_name(const ttfp_face *face, uint16_t glyph_id, char *name);
/**
* @brief Outlines a glyph and returns its tight bounding box.
*
* **Warning**: since `ttf-parser` is a pull parser,
* `OutlineBuilder` will emit segments even when outline is partially malformed.
* You must check #ttfp_outline_glyph() result before using
* #ttfp_outline_builder 's output.
*
* `glyf`, `gvar`, `CFF` and `CFF2` tables are supported.
*
* This function is affected by variation axes.
*
* @return `false` when glyph has no outline or on error.
*/
bool ttfp_outline_glyph(const ttfp_face *face,
ttfp_outline_builder builder,
void *user_data,
uint16_t glyph_id,
ttfp_rect *bbox);
/**
* @brief Returns a tight glyph bounding box.
*
* Unless the current face has a `glyf` table, this is just a shorthand for `outline_glyph()`
* since only the `glyf` table stores a bounding box. In case of CFF and variable fonts
* we have to actually outline a glyph to find it's bounding box.
*
* This function is affected by variation axes.
*/
bool ttfp_get_glyph_bbox(const ttfp_face *face, uint16_t glyph_id, ttfp_rect *bbox);
/**
* @brief Returns a bounding box that large enough to enclose any glyph from the face.
*/
ttfp_rect ttfp_get_global_bounding_box(const ttfp_face *face);
/**
* @brief Returns a reference to a glyph's raster image.
*
* A font can define a glyph using a raster or a vector image instead of a simple outline.
* Which is primarily used for emojis. This method should be used to access raster images.
*
* `pixels_per_em` allows selecting a preferred image size. The chosen size will
* be closer to an upper one. So when font has 64px and 96px images and `pixels_per_em`
* is set to 72, 96px image will be returned.
* To get the largest image simply use `SHRT_MAX`.
*
* Note that this method will return an encoded image. It should be decoded
* by the caller. We don't validate or preprocess it in any way.
*
* Also, a font can contain both: images and outlines. So when this method returns `None`
* you should also try `ttfp_outline_glyph()` afterwards.
*
* There are multiple ways an image can be stored in a TrueType font
* and this method supports most of them.
* This includes `sbix`, `bloc` + `bdat`, `EBLC` + `EBDT`, `CBLC` + `CBDT`.
* And font's tables will be accesses in this specific order.
*/
bool ttfp_get_glyph_raster_image(const ttfp_face *face,
uint16_t glyph_id,
uint16_t pixels_per_em,
ttfp_glyph_raster_image *glyph_image);
/**
* @brief Returns a reference to a glyph's SVG image.
*
* A font can define a glyph using a raster or a vector image instead of a simple outline.
* Which is primarily used for emojis. This method should be used to access SVG images.
*
* Note that this method will return just an SVG data. It should be rendered
* or even decompressed (in case of SVGZ) by the caller.
* We don't validate or preprocess it in any way.
*
* Also, a font can contain both: images and outlines. So when this method returns `false`
* you should also try `ttfp_outline_glyph()` afterwards.
*/
bool ttfp_get_glyph_svg_image(const ttfp_face *face,
uint16_t glyph_id,
const char **svg,
uint32_t *len);
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief Returns the amount of variation axes.
*/
uint16_t ttfp_get_variation_axes_count(const ttfp_face *face);
#endif
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief Returns a variation axis by index.
*/
bool ttfp_get_variation_axis(const ttfp_face *face, uint16_t index, ttfp_variation_axis *axis);
#endif
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief Returns a variation axis by tag.
*/
bool ttfp_get_variation_axis_by_tag(const ttfp_face *face, ttfp_tag tag, ttfp_variation_axis *axis);
#endif
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief Sets a variation axis coordinate.
*
* This is the only mutable function in the library.
* We can simplify the API a lot by storing the variable coordinates
* in the face object itself.
*
* This function is reentrant.
*
* Since coordinates are stored on the stack, we allow only 32 of them.
*
* @return `false` when face is not variable or doesn't have such axis.
*/
bool ttfp_set_variation(ttfp_face *face, ttfp_tag axis, float value);
#endif
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief Returns the current normalized variation coordinates.
*
* Values represented as f2.16
*/
const int16_t *ttfp_get_variation_coordinates(const ttfp_face *face);
#endif
#if defined(TTFP_VARIABLE_FONTS)
/**
* @brief Checks that face has non-default variation coordinates.
*/
bool ttfp_has_non_default_variation_coordinates(const ttfp_face *face);
#endif
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif /* TTFP_H */