-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHarfBuzz-0.0.d.ts
10380 lines (10219 loc) · 365 KB
/
HarfBuzz-0.0.d.ts
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
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */
declare namespace imports.gi.HarfBuzz {
export interface aat_layout_feature_selector_info_tInitOptions {}
/**
* Structure representing a setting for an #hb_aat_layout_feature_type_t.
*/
interface aat_layout_feature_selector_info_t {}
class aat_layout_feature_selector_info_t {
public constructor(options?: Partial<aat_layout_feature_selector_info_tInitOptions>);
/**
* The selector's name identifier
*/
public name_id: ot_name_id_t;
/**
* The value to turn the selector on
*/
public enable: aat_layout_feature_selector_t;
/**
* The value to turn the selector off
*/
public disable: aat_layout_feature_selector_t;
public readonly reserved: number;
}
export interface blob_tInitOptions {}
/**
* Data type for blobs. A blob wraps a chunk of binary
* data and facilitates its lifecycle management between
* a client program and HarfBuzz.
*/
interface blob_t {}
class blob_t {
public constructor(options?: Partial<blob_tInitOptions>);
}
export interface buffer_tInitOptions {}
/**
* The main structure holding the input text and its properties before shaping,
* and output glyphs and their information after shaping.
*/
interface buffer_t {}
class buffer_t {
public constructor(options?: Partial<buffer_tInitOptions>);
}
export interface color_line_tInitOptions {}
/**
* A struct containing color information for a gradient.
*/
interface color_line_t {}
class color_line_t {
public constructor(options?: Partial<color_line_tInitOptions>);
public data: any;
public get_color_stops: color_line_get_color_stops_func_t;
public get_color_stops_user_data: any;
public get_extend: color_line_get_extend_func_t;
public get_extend_user_data: any;
public reserved0: any;
public reserved1: any;
public reserved2: any;
public reserved3: any;
public reserved5: any;
public reserved6: any;
public reserved7: any;
public reserved8: any;
}
export interface color_stop_tInitOptions {}
/**
* Information about a color stop on a color line.
*
* Color lines typically have offsets ranging between 0 and 1,
* but that is not required.
*
* Note: despite #color being unpremultiplied here, interpolation in
* gradients shall happen in premultiplied space. See the OpenType spec
* [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr)
* section for details.
*/
interface color_stop_t {}
class color_stop_t {
public constructor(options?: Partial<color_stop_tInitOptions>);
/**
* the offset of the color stop
*/
public offset: number;
/**
* whether the color is the foreground
*/
public is_foreground: bool_t;
/**
* the color, unpremultiplied
*/
public color: color_t;
}
export interface draw_funcs_tInitOptions {}
/**
* Glyph draw callbacks.
*
* #hb_draw_move_to_func_t, #hb_draw_line_to_func_t and
* #hb_draw_cubic_to_func_t calls are necessary to be defined but we translate
* #hb_draw_quadratic_to_func_t calls to #hb_draw_cubic_to_func_t if the
* callback isn't defined.
*/
interface draw_funcs_t {}
class draw_funcs_t {
public constructor(options?: Partial<draw_funcs_tInitOptions>);
}
export interface draw_state_tInitOptions {}
/**
* Current drawing state.
*/
interface draw_state_t {}
class draw_state_t {
public constructor(options?: Partial<draw_state_tInitOptions>);
/**
* Whether there is an open path
*/
public path_open: bool_t;
/**
* X component of the start of current path
*/
public path_start_x: number;
/**
* Y component of the start of current path
*/
public path_start_y: number;
/**
* X component of current point
*/
public current_x: number;
/**
* Y component of current point
*/
public current_y: number;
public readonly reserved1: var_num_t;
public readonly reserved2: var_num_t;
public readonly reserved3: var_num_t;
public readonly reserved4: var_num_t;
public readonly reserved5: var_num_t;
public readonly reserved6: var_num_t;
public readonly reserved7: var_num_t;
}
export interface face_tInitOptions {}
/**
* Data type for holding font faces.
*/
interface face_t {}
class face_t {
public constructor(options?: Partial<face_tInitOptions>);
}
export interface feature_tInitOptions {}
/**
* The #hb_feature_t is the structure that holds information about requested
* feature application. The feature will be applied with the given value to all
* glyphs which are in clusters between #start (inclusive) and #end (exclusive).
* Setting start to #HB_FEATURE_GLOBAL_START and end to #HB_FEATURE_GLOBAL_END
* specifies that the feature always applies to the entire buffer.
*/
interface feature_t {}
class feature_t {
public constructor(options?: Partial<feature_tInitOptions>);
/**
* The #hb_tag_t tag of the feature
*/
public tag: tag_t;
/**
* The value of the feature. 0 disables the feature, non-zero (usually
* 1) enables the feature. For features implemented as lookup type 3 (like
* 'salt') the #value is a one based index into the alternates.
*/
public value: number;
/**
* the cluster to start applying this feature setting (inclusive).
*/
public start: number;
/**
* the cluster to end applying this feature setting (exclusive).
*/
public end: number;
/**
* Converts a #hb_feature_t into a `NULL`-terminated string in the format
* understood by {@link Hb.feature_from_string}. The client in responsible for
* allocating big enough size for #buf, 128 bytes is more than enough.
* @returns output string
*/
public _string(): string[];
}
export interface font_extents_tInitOptions {}
/**
* Font-wide extent values, measured in font units.
*
* Note that typically #ascender is positive and #descender
* negative, in coordinate systems that grow up.
*/
interface font_extents_t {}
class font_extents_t {
public constructor(options?: Partial<font_extents_tInitOptions>);
/**
* The height of typographic ascenders.
*/
public ascender: position_t;
/**
* The depth of typographic descenders.
*/
public descender: position_t;
/**
* The suggested line-spacing gap.
*/
public line_gap: position_t;
public readonly reserved9: position_t;
public readonly reserved8: position_t;
public readonly reserved7: position_t;
public readonly reserved6: position_t;
public readonly reserved5: position_t;
public readonly reserved4: position_t;
public readonly reserved3: position_t;
public readonly reserved2: position_t;
public readonly reserved1: position_t;
}
export interface font_funcs_tInitOptions {}
/**
* Data type containing a set of virtual methods used for
* working on #hb_font_t font objects.
*
* HarfBuzz provides a lightweight default function for each of
* the methods in #hb_font_funcs_t. Client programs can implement
* their own replacements for the individual font functions, as
* needed, and replace the default by calling the setter for a
* method.
*/
interface font_funcs_t {}
class font_funcs_t {
public constructor(options?: Partial<font_funcs_tInitOptions>);
}
export interface font_tInitOptions {}
/**
* Data type for holding fonts.
*/
interface font_t {}
class font_t {
public constructor(options?: Partial<font_tInitOptions>);
}
export interface glyph_extents_tInitOptions {}
/**
* Glyph extent values, measured in font units.
*
* Note that #height is negative, in coordinate systems that grow up.
*/
interface glyph_extents_t {}
class glyph_extents_t {
public constructor(options?: Partial<glyph_extents_tInitOptions>);
/**
* Distance from the x-origin to the left extremum of the glyph.
*/
public x_bearing: position_t;
/**
* Distance from the top extremum of the glyph to the y-origin.
*/
public y_bearing: position_t;
/**
* Distance from the left extremum of the glyph to the right extremum.
*/
public width: position_t;
/**
* Distance from the top extremum of the glyph to the bottom extremum.
*/
public height: position_t;
}
export interface glyph_info_tInitOptions {}
/**
* The #hb_glyph_info_t is the structure that holds information about the
* glyphs and their relation to input text.
*/
interface glyph_info_t {}
class glyph_info_t {
public constructor(options?: Partial<glyph_info_tInitOptions>);
/**
* either a Unicode code point (before shaping) or a glyph index
* (after shaping).
*/
public codepoint: codepoint_t;
public readonly mask: mask_t;
/**
* the index of the character in the original text that corresponds
* to this #hb_glyph_info_t, or whatever the client passes to
* {@link Hb.buffer_add}. More than one #hb_glyph_info_t can have the same
* #cluster value, if they resulted from the same character (e.g. one
* to many glyph substitution), and when more than one character gets
* merged in the same glyph (e.g. many to one glyph substitution) the
* #hb_glyph_info_t will have the smallest cluster value of them.
* By default some characters are merged into the same cluster
* (e.g. combining marks have the same cluster as their bases)
* even if they are separate glyphs, hb_buffer_set_cluster_level()
* allow selecting more fine-grained cluster handling.
*/
public cluster: number;
public readonly var1: var_int_t;
public readonly var2: var_int_t;
}
export interface glyph_position_tInitOptions {}
/**
* The #hb_glyph_position_t is the structure that holds the positions of the
* glyph in both horizontal and vertical directions. All positions in
* #hb_glyph_position_t are relative to the current point.
*/
interface glyph_position_t {}
class glyph_position_t {
public constructor(options?: Partial<glyph_position_tInitOptions>);
/**
* how much the line advances after drawing this glyph when setting
* text in horizontal direction.
*/
public x_advance: position_t;
/**
* how much the line advances after drawing this glyph when setting
* text in vertical direction.
*/
public y_advance: position_t;
/**
* how much the glyph moves on the X-axis before drawing it, this
* should not affect how much the line advances.
*/
public x_offset: position_t;
/**
* how much the glyph moves on the Y-axis before drawing it, this
* should not affect how much the line advances.
*/
public y_offset: position_t;
public readonly var: var_int_t;
}
export interface language_tInitOptions {}
/**
* Data type for languages. Each #hb_language_t corresponds to a BCP 47
* language tag.
*/
interface language_t {}
class language_t {
public constructor(options?: Partial<language_tInitOptions>);
/**
* Converts an #hb_language_t to a string.
* @returns
* A `NULL`-terminated string representing the #language. Must not be freed by
* the caller.
*/
public _string(): string;
}
export interface map_tInitOptions {}
/**
* Data type for holding integer-to-integer hash maps.
*/
interface map_t {}
class map_t {
public constructor(options?: Partial<map_tInitOptions>);
}
export interface ot_color_layer_tInitOptions {}
/**
* Pairs of glyph and color index.
*
* A color index of 0xFFFF does not refer to a palette
* color, but indicates that the foreground color should
* be used.
*/
interface ot_color_layer_t {}
class ot_color_layer_t {
public constructor(options?: Partial<ot_color_layer_tInitOptions>);
/**
* the glyph ID of the layer
*/
public glyph: codepoint_t;
/**
* the palette color index of the layer
*/
public color_index: number;
}
export interface ot_math_glyph_part_tInitOptions {}
/**
* Data type to hold information for a "part" component of a math-variant glyph.
* Large variants for stretchable math glyphs (such as parentheses) can be constructed
* on the fly from parts.
*/
interface ot_math_glyph_part_t {}
class ot_math_glyph_part_t {
public constructor(options?: Partial<ot_math_glyph_part_tInitOptions>);
/**
* The glyph index of the variant part
*/
public glyph: codepoint_t;
/**
* The length of the connector on the starting side of the variant part
*/
public start_connector_length: position_t;
/**
* The length of the connector on the ending side of the variant part
*/
public end_connector_length: position_t;
/**
* The total advance of the part
*/
public full_advance: position_t;
/**
* #hb_ot_math_glyph_part_flags_t flags for the part
*/
public flags: ot_math_glyph_part_flags_t;
}
export interface ot_math_glyph_variant_tInitOptions {}
/**
* Data type to hold math-variant information for a glyph.
*/
interface ot_math_glyph_variant_t {}
class ot_math_glyph_variant_t {
public constructor(options?: Partial<ot_math_glyph_variant_tInitOptions>);
/**
* The glyph index of the variant
*/
public glyph: codepoint_t;
/**
* The advance width of the variant
*/
public advance: position_t;
}
export interface ot_math_kern_entry_tInitOptions {}
/**
* Data type to hold math kerning (cut-in) information for a glyph.
*/
interface ot_math_kern_entry_t {}
class ot_math_kern_entry_t {
public constructor(options?: Partial<ot_math_kern_entry_tInitOptions>);
/**
* The maximum height at which this entry should be used
*/
public max_correction_height: position_t;
/**
* The kern value of the entry
*/
public kern_value: position_t;
}
export interface ot_name_entry_tInitOptions {}
/**
* Structure representing a name ID in a particular language.
*/
interface ot_name_entry_t {}
class ot_name_entry_t {
public constructor(options?: Partial<ot_name_entry_tInitOptions>);
/**
* name ID
*/
public name_id: ot_name_id_t;
public readonly var: var_int_t;
/**
* language
*/
public language: language_t;
}
export interface ot_var_axis_info_tInitOptions {}
/**
* Data type for holding variation-axis values.
*
* The minimum, default, and maximum values are in un-normalized, user scales.
*
* <note>Note: at present, the only flag defined for #flags is
* #HB_OT_VAR_AXIS_FLAG_HIDDEN.</note>
*/
interface ot_var_axis_info_t {}
class ot_var_axis_info_t {
public constructor(options?: Partial<ot_var_axis_info_tInitOptions>);
/**
* Index of the axis in the variation-axis array
*/
public axis_index: number;
/**
* The #hb_tag_t tag identifying the design variation of the axis
*/
public tag: tag_t;
/**
* The `name` table Name ID that provides display names for the axis
*/
public name_id: ot_name_id_t;
/**
* The #hb_ot_var_axis_flags_t flags for the axis
*/
public flags: ot_var_axis_flags_t;
/**
* The minimum value on the variation axis that the font covers
*/
public min_value: number;
/**
* The position on the variation axis corresponding to the font's defaults
*/
public default_value: number;
/**
* The maximum value on the variation axis that the font covers
*/
public max_value: number;
public readonly reserved: number;
}
export interface ot_var_axis_tInitOptions {}
/**
* Use #hb_ot_var_axis_info_t instead.
*/
interface ot_var_axis_t {}
class ot_var_axis_t {
public constructor(options?: Partial<ot_var_axis_tInitOptions>);
/**
* axis tag
*/
public tag: tag_t;
/**
* axis name identifier
*/
public name_id: ot_name_id_t;
/**
* minimum value of the axis
*/
public min_value: number;
/**
* default value of the axis
*/
public default_value: number;
/**
* maximum value of the axis
*/
public max_value: number;
}
export interface paint_funcs_tInitOptions {}
/**
* Glyph paint callbacks.
*
* The callbacks assume that the caller maintains a stack
* of current transforms, clips and intermediate surfaces,
* as evidenced by the pairs of push/pop callbacks. The
* push/pop calls will be properly nested, so it is fine
* to store the different kinds of object on a single stack.
*
* Not all callbacks are required for all kinds of glyphs.
* For rendering COLRv0 or non-color outline glyphs, the
* gradient callbacks are not needed, and the composite
* callback only needs to handle simple alpha compositing
* (#HB_PAINT_COMPOSITE_MODE_SRC_OVER).
*
* The paint-image callback is only needed for glyphs
* with image blobs in the CBDT, sbix or SVG tables.
*
* The custom-palette-color callback is only necessary if
* you want to override colors from the font palette with
* custom colors.
*/
interface paint_funcs_t {}
class paint_funcs_t {
public constructor(options?: Partial<paint_funcs_tInitOptions>);
}
export interface segment_properties_tInitOptions {}
/**
* The structure that holds various text properties of an #hb_buffer_t. Can be
* set and retrieved using {@link Hb.buffer_set_segment_properties} and
* hb_buffer_get_segment_properties(), respectively.
*/
interface segment_properties_t {}
class segment_properties_t {
public constructor(options?: Partial<segment_properties_tInitOptions>);
/**
* the #hb_direction_t of the buffer, see {@link Hb.buffer_set_direction}.
*/
public direction: direction_t;
/**
* the #hb_script_t of the buffer, see {@link Hb.buffer_set_script}.
*/
public script: script_t;
/**
* the #hb_language_t of the buffer, see {@link Hb.buffer_set_language}.
*/
public language: language_t;
public readonly reserved1: any;
public readonly reserved2: any;
}
export interface set_tInitOptions {}
/**
* Data type for holding a set of integers. #hb_set_t's are
* used to gather and contain glyph IDs, Unicode code
* points, and various other collections of discrete
* values.
*/
interface set_t {}
class set_t {
public constructor(options?: Partial<set_tInitOptions>);
}
export interface shape_plan_tInitOptions {}
/**
* Data type for holding a shaping plan.
*
* Shape plans contain information about how HarfBuzz will shape a
* particular text segment, based on the segment's properties and the
* capabilities in the font face in use.
*
* Shape plans can be queried about how shaping will perform, given a set
* of specific input parameters (script, language, direction, features,
* etc.).
*/
interface shape_plan_t {}
class shape_plan_t {
public constructor(options?: Partial<shape_plan_tInitOptions>);
}
export interface unicode_funcs_tInitOptions {}
/**
* Data type containing a set of virtual methods used for
* accessing various Unicode character properties.
*
* HarfBuzz provides a default function for each of the
* methods in #hb_unicode_funcs_t. Client programs can implement
* their own replacements for the individual Unicode functions, as
* needed, and replace the default by calling the setter for a
* method.
*/
interface unicode_funcs_t {}
class unicode_funcs_t {
public constructor(options?: Partial<unicode_funcs_tInitOptions>);
}
export interface user_data_key_tInitOptions {}
/**
* Data structure for holding user-data keys.
*/
interface user_data_key_t {}
class user_data_key_t {
public constructor(options?: Partial<user_data_key_tInitOptions>);
public readonly unused: string;
}
export interface variation_tInitOptions {}
/**
* Data type for holding variation data. Registered OpenType
* variation-axis tags are listed in
* [OpenType Axis Tag Registry](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg).
*/
interface variation_t {}
class variation_t {
public constructor(options?: Partial<variation_tInitOptions>);
/**
* The #hb_tag_t tag of the variation-axis name
*/
public tag: tag_t;
/**
* The value of the variation axis
*/
public value: number;
/**
* Converts an #hb_variation_t into a `NULL`-terminated string in the format
* understood by {@link Hb.variation_from_string}. The client in responsible for
* allocating big enough size for #buf, 128 bytes is more than enough.
* @returns output string
*/
public _string(): string[];
}
/**
* Data type for holding HarfBuzz's clustering behavior options. The cluster level
* dictates one aspect of how HarfBuzz will treat non-base characters
* during shaping.
*
* In #HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES, non-base
* characters are merged into the cluster of the base character that precedes them.
*
* In #HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS, non-base characters are initially
* assigned their own cluster values, which are not merged into preceding base
* clusters. This allows HarfBuzz to perform additional operations like reorder
* sequences of adjacent marks.
*
* #HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES is the default, because it maintains
* backward compatibility with older versions of HarfBuzz. New client programs that
* do not need to maintain such backward compatibility are recommended to use
* #HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS instead of the default.
*/
enum buffer_cluster_level_t {
/**
* Return cluster values grouped by graphemes into
* monotone order.
*/
MONOTONE_GRAPHEMES = 0,
/**
* Return cluster values grouped into monotone order.
*/
MONOTONE_CHARACTERS = 1,
/**
* Don't group cluster values.
*/
CHARACTERS = 2,
/**
* Default cluster level,
* equal to #HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES.
*/
DEFAULT = 0
}
/**
* The type of #hb_buffer_t contents.
*/
enum buffer_content_type_t {
/**
* Initial value for new buffer.
*/
INVALID = 0,
/**
* The buffer contains input characters (before shaping).
*/
UNICODE = 1,
/**
* The buffer contains output glyphs (after shaping).
*/
GLYPHS = 2
}
/**
* The direction of a text segment or buffer.
*
* A segment can also be tested for horizontal or vertical
* orientation (irrespective of specific direction) with
* {@link HB.DIRECTION_IS_HORIZONTAL} or HB_DIRECTION_IS_VERTICAL().
*/
enum direction_t {
/**
* Initial, unset direction.
*/
INVALID = 0,
/**
* Text is set horizontally from left to right.
*/
LTR = 4,
/**
* Text is set horizontally from right to left.
*/
RTL = 5,
/**
* Text is set vertically from top to bottom.
*/
TTB = 6,
/**
* Text is set vertically from bottom to top.
*/
BTT = 7
}
/**
* Data type holding the memory modes available to
* client programs.
*
* Regarding these various memory-modes:
*
* - In no case shall the HarfBuzz client modify memory
* that is passed to HarfBuzz in a blob. If there is
* any such possibility, #HB_MEMORY_MODE_DUPLICATE should be used
* such that HarfBuzz makes a copy immediately,
*
* - Use #HB_MEMORY_MODE_READONLY otherwise, unless you really really
* really know what you are doing,
*
* - #HB_MEMORY_MODE_WRITABLE is appropriate if you really made a
* copy of data solely for the purpose of passing to
* HarfBuzz and doing that just once (no reuse!),
*
* - If the font is mmap()ed, it's okay to use
* #HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, however, using that mode
* correctly is very tricky. Use #HB_MEMORY_MODE_READONLY instead.
*/
enum memory_mode_t {
/**
* HarfBuzz immediately makes a copy of the data.
*/
DUPLICATE = 0,
/**
* HarfBuzz client will never modify the data,
* and HarfBuzz will never modify the data.
*/
READONLY = 1,
/**
* HarfBuzz client made a copy of the data solely
* for HarfBuzz, so HarfBuzz may modify the data.
*/
WRITABLE = 2,
/**
* See above
*/
READONLY_MAY_MAKE_WRITABLE = 3
}
/**
* The GDEF classes defined for glyphs.
*/
enum ot_layout_glyph_class_t {
/**
* Glyphs not matching the other classifications
*/
UNCLASSIFIED = 0,
/**
* Spacing, single characters, capable of accepting marks
*/
BASE_GLYPH = 1,
/**
* Glyphs that represent ligation of multiple characters
*/
LIGATURE = 2,
/**
* Non-spacing, combining glyphs that represent marks
*/
MARK = 3,
/**
* Spacing glyphs that represent part of a single character
*/
COMPONENT = 4
}
/**
* The 'MATH' table constants, refer to
* [OpenType documentation](https://docs.microsoft.com/en-us/typography/opentype/spec/math#mathconstants-table)
* For more explanations.
*/
enum ot_math_constant_t {
/**
* scriptPercentScaleDown
*/
SCRIPT_PERCENT_SCALE_DOWN = 0,
/**
* scriptScriptPercentScaleDown
*/
SCRIPT_SCRIPT_PERCENT_SCALE_DOWN = 1,
/**
* delimitedSubFormulaMinHeight
*/
DELIMITED_SUB_FORMULA_MIN_HEIGHT = 2,
/**
* displayOperatorMinHeight
*/
DISPLAY_OPERATOR_MIN_HEIGHT = 3,
/**
* mathLeading
*/
MATH_LEADING = 4,
/**
* axisHeight
*/
AXIS_HEIGHT = 5,
/**
* accentBaseHeight
*/
ACCENT_BASE_HEIGHT = 6,
/**
* flattenedAccentBaseHeight
*/
FLATTENED_ACCENT_BASE_HEIGHT = 7,
/**
* subscriptShiftDown
*/
SUBSCRIPT_SHIFT_DOWN = 8,
/**
* subscriptTopMax
*/
SUBSCRIPT_TOP_MAX = 9,
/**
* subscriptBaselineDropMin
*/
SUBSCRIPT_BASELINE_DROP_MIN = 10,
/**
* superscriptShiftUp
*/
SUPERSCRIPT_SHIFT_UP = 11,
/**
* superscriptShiftUpCramped
*/
SUPERSCRIPT_SHIFT_UP_CRAMPED = 12,
/**
* superscriptBottomMin
*/
SUPERSCRIPT_BOTTOM_MIN = 13,
/**
* superscriptBaselineDropMax
*/
SUPERSCRIPT_BASELINE_DROP_MAX = 14,
/**
* subSuperscriptGapMin
*/
SUB_SUPERSCRIPT_GAP_MIN = 15,
/**
* superscriptBottomMaxWithSubscript
*/
SUPERSCRIPT_BOTTOM_MAX_WITH_SUBSCRIPT = 16,
/**
* spaceAfterScript
*/
SPACE_AFTER_SCRIPT = 17,
/**
* upperLimitGapMin
*/
UPPER_LIMIT_GAP_MIN = 18,
/**
* upperLimitBaselineRiseMin
*/
UPPER_LIMIT_BASELINE_RISE_MIN = 19,
/**
* lowerLimitGapMin
*/
LOWER_LIMIT_GAP_MIN = 20,
/**
* lowerLimitBaselineDropMin
*/
LOWER_LIMIT_BASELINE_DROP_MIN = 21,
/**
* stackTopShiftUp
*/
STACK_TOP_SHIFT_UP = 22,
/**
* stackTopDisplayStyleShiftUp
*/
STACK_TOP_DISPLAY_STYLE_SHIFT_UP = 23,
/**
* stackBottomShiftDown
*/
STACK_BOTTOM_SHIFT_DOWN = 24,
/**
* stackBottomDisplayStyleShiftDown
*/
STACK_BOTTOM_DISPLAY_STYLE_SHIFT_DOWN = 25,
/**
* stackGapMin
*/
STACK_GAP_MIN = 26,
/**
* stackDisplayStyleGapMin
*/
STACK_DISPLAY_STYLE_GAP_MIN = 27,
/**
* stretchStackTopShiftUp
*/
STRETCH_STACK_TOP_SHIFT_UP = 28,
/**
* stretchStackBottomShiftDown
*/
STRETCH_STACK_BOTTOM_SHIFT_DOWN = 29,
/**
* stretchStackGapAboveMin
*/
STRETCH_STACK_GAP_ABOVE_MIN = 30,
/**
* stretchStackGapBelowMin
*/
STRETCH_STACK_GAP_BELOW_MIN = 31,
/**
* fractionNumeratorShiftUp
*/
FRACTION_NUMERATOR_SHIFT_UP = 32,
/**
* fractionNumeratorDisplayStyleShiftUp
*/
FRACTION_NUMERATOR_DISPLAY_STYLE_SHIFT_UP = 33,
/**
* fractionDenominatorShiftDown
*/
FRACTION_DENOMINATOR_SHIFT_DOWN = 34,
/**
* fractionDenominatorDisplayStyleShiftDown
*/
FRACTION_DENOMINATOR_DISPLAY_STYLE_SHIFT_DOWN = 35,
/**
* fractionNumeratorGapMin
*/
FRACTION_NUMERATOR_GAP_MIN = 36,
/**
* fractionNumDisplayStyleGapMin
*/
FRACTION_NUM_DISPLAY_STYLE_GAP_MIN = 37,
/**
* fractionRuleThickness
*/
FRACTION_RULE_THICKNESS = 38,
/**
* fractionDenominatorGapMin
*/
FRACTION_DENOMINATOR_GAP_MIN = 39,