jassub 1.7.13 → 1.7.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/package.json +4 -2
  2. package/dist/js/jassub-worker-modern.js +0 -128
  3. package/dist/js/jassub-worker-modern.wasm +0 -0
  4. package/dist/js/jassub-worker.js +0 -128
  5. package/dist/js/jassub-worker.wasm +0 -0
  6. package/dist/js/jassub-worker.wasm.js +0 -84
  7. package/dist/js/jassub.js +0 -832
  8. package/dist/libraries/bin/brotli.js +0 -1
  9. package/dist/libraries/include/ass/ass.h +0 -812
  10. package/dist/libraries/include/ass/ass_types.h +0 -292
  11. package/dist/libraries/include/brotli/decode.h +0 -344
  12. package/dist/libraries/include/brotli/encode.h +0 -448
  13. package/dist/libraries/include/brotli/port.h +0 -288
  14. package/dist/libraries/include/brotli/types.h +0 -83
  15. package/dist/libraries/include/expat.h +0 -1064
  16. package/dist/libraries/include/expat_config.h +0 -115
  17. package/dist/libraries/include/expat_external.h +0 -165
  18. package/dist/libraries/include/fontconfig/fcfreetype.h +0 -59
  19. package/dist/libraries/include/fontconfig/fcprivate.h +0 -134
  20. package/dist/libraries/include/fontconfig/fontconfig.h +0 -1154
  21. package/dist/libraries/include/freetype2/freetype/config/ftconfig.h +0 -63
  22. package/dist/libraries/include/freetype2/freetype/config/ftheader.h +0 -824
  23. package/dist/libraries/include/freetype2/freetype/config/ftmodule.h +0 -20
  24. package/dist/libraries/include/freetype2/freetype/config/ftoption.h +0 -1011
  25. package/dist/libraries/include/freetype2/freetype/config/ftstdlib.h +0 -175
  26. package/dist/libraries/include/freetype2/freetype/config/integer-types.h +0 -245
  27. package/dist/libraries/include/freetype2/freetype/config/mac-support.h +0 -49
  28. package/dist/libraries/include/freetype2/freetype/config/public-macros.h +0 -120
  29. package/dist/libraries/include/freetype2/freetype/freetype.h +0 -4833
  30. package/dist/libraries/include/freetype2/freetype/ftadvanc.h +0 -188
  31. package/dist/libraries/include/freetype2/freetype/ftbbox.h +0 -101
  32. package/dist/libraries/include/freetype2/freetype/ftbdf.h +0 -212
  33. package/dist/libraries/include/freetype2/freetype/ftbitmap.h +0 -329
  34. package/dist/libraries/include/freetype2/freetype/ftbzip2.h +0 -102
  35. package/dist/libraries/include/freetype2/freetype/ftcache.h +0 -1087
  36. package/dist/libraries/include/freetype2/freetype/ftchapters.h +0 -147
  37. package/dist/libraries/include/freetype2/freetype/ftcid.h +0 -167
  38. package/dist/libraries/include/freetype2/freetype/ftcolor.h +0 -1609
  39. package/dist/libraries/include/freetype2/freetype/ftdriver.h +0 -1193
  40. package/dist/libraries/include/freetype2/freetype/fterrdef.h +0 -279
  41. package/dist/libraries/include/freetype2/freetype/fterrors.h +0 -296
  42. package/dist/libraries/include/freetype2/freetype/ftfntfmt.h +0 -93
  43. package/dist/libraries/include/freetype2/freetype/ftgasp.h +0 -143
  44. package/dist/libraries/include/freetype2/freetype/ftglyph.h +0 -664
  45. package/dist/libraries/include/freetype2/freetype/ftgxval.h +0 -354
  46. package/dist/libraries/include/freetype2/freetype/ftgzip.h +0 -151
  47. package/dist/libraries/include/freetype2/freetype/ftimage.h +0 -1276
  48. package/dist/libraries/include/freetype2/freetype/ftincrem.h +0 -348
  49. package/dist/libraries/include/freetype2/freetype/ftlcdfil.h +0 -323
  50. package/dist/libraries/include/freetype2/freetype/ftlist.h +0 -296
  51. package/dist/libraries/include/freetype2/freetype/ftlogging.h +0 -184
  52. package/dist/libraries/include/freetype2/freetype/ftlzw.h +0 -100
  53. package/dist/libraries/include/freetype2/freetype/ftmac.h +0 -289
  54. package/dist/libraries/include/freetype2/freetype/ftmm.h +0 -752
  55. package/dist/libraries/include/freetype2/freetype/ftmodapi.h +0 -806
  56. package/dist/libraries/include/freetype2/freetype/ftmoderr.h +0 -204
  57. package/dist/libraries/include/freetype2/freetype/ftotval.h +0 -206
  58. package/dist/libraries/include/freetype2/freetype/ftoutln.h +0 -586
  59. package/dist/libraries/include/freetype2/freetype/ftparams.h +0 -203
  60. package/dist/libraries/include/freetype2/freetype/ftpfr.h +0 -179
  61. package/dist/libraries/include/freetype2/freetype/ftrender.h +0 -244
  62. package/dist/libraries/include/freetype2/freetype/ftsizes.h +0 -159
  63. package/dist/libraries/include/freetype2/freetype/ftsnames.h +0 -272
  64. package/dist/libraries/include/freetype2/freetype/ftstroke.h +0 -773
  65. package/dist/libraries/include/freetype2/freetype/ftsynth.h +0 -83
  66. package/dist/libraries/include/freetype2/freetype/ftsystem.h +0 -352
  67. package/dist/libraries/include/freetype2/freetype/fttrigon.h +0 -350
  68. package/dist/libraries/include/freetype2/freetype/fttypes.h +0 -615
  69. package/dist/libraries/include/freetype2/freetype/ftwinfnt.h +0 -276
  70. package/dist/libraries/include/freetype2/freetype/t1tables.h +0 -773
  71. package/dist/libraries/include/freetype2/freetype/ttnameid.h +0 -1235
  72. package/dist/libraries/include/freetype2/freetype/tttables.h +0 -855
  73. package/dist/libraries/include/freetype2/freetype/tttags.h +0 -123
  74. package/dist/libraries/include/freetype2/ft2build.h +0 -42
  75. package/dist/libraries/include/fribidi/fribidi-arabic.h +0 -81
  76. package/dist/libraries/include/fribidi/fribidi-begindecls.h +0 -3
  77. package/dist/libraries/include/fribidi/fribidi-bidi-types-list.h +0 -96
  78. package/dist/libraries/include/fribidi/fribidi-bidi-types.h +0 -405
  79. package/dist/libraries/include/fribidi/fribidi-bidi.h +0 -142
  80. package/dist/libraries/include/fribidi/fribidi-brackets.h +0 -89
  81. package/dist/libraries/include/fribidi/fribidi-char-sets-list.h +0 -54
  82. package/dist/libraries/include/fribidi/fribidi-char-sets.h +0 -106
  83. package/dist/libraries/include/fribidi/fribidi-common.h +0 -158
  84. package/dist/libraries/include/fribidi/fribidi-config.h +0 -23
  85. package/dist/libraries/include/fribidi/fribidi-deprecated.h +0 -175
  86. package/dist/libraries/include/fribidi/fribidi-enddecls.h +0 -3
  87. package/dist/libraries/include/fribidi/fribidi-flags.h +0 -72
  88. package/dist/libraries/include/fribidi/fribidi-joining-types-list.h +0 -44
  89. package/dist/libraries/include/fribidi/fribidi-joining-types.h +0 -249
  90. package/dist/libraries/include/fribidi/fribidi-joining.h +0 -74
  91. package/dist/libraries/include/fribidi/fribidi-mirroring.h +0 -86
  92. package/dist/libraries/include/fribidi/fribidi-shape.h +0 -71
  93. package/dist/libraries/include/fribidi/fribidi-types.h +0 -79
  94. package/dist/libraries/include/fribidi/fribidi-unicode-version.h +0 -10
  95. package/dist/libraries/include/fribidi/fribidi-unicode.h +0 -105
  96. package/dist/libraries/include/fribidi/fribidi.h +0 -129
  97. package/dist/libraries/include/harfbuzz/hb-aat-layout.h +0 -795
  98. package/dist/libraries/include/harfbuzz/hb-aat.h +0 -38
  99. package/dist/libraries/include/harfbuzz/hb-blob.h +0 -160
  100. package/dist/libraries/include/harfbuzz/hb-buffer.h +0 -799
  101. package/dist/libraries/include/harfbuzz/hb-common.h +0 -902
  102. package/dist/libraries/include/harfbuzz/hb-cplusplus.hh +0 -221
  103. package/dist/libraries/include/harfbuzz/hb-deprecated.h +0 -251
  104. package/dist/libraries/include/harfbuzz/hb-draw.h +0 -325
  105. package/dist/libraries/include/harfbuzz/hb-face.h +0 -181
  106. package/dist/libraries/include/harfbuzz/hb-font.h +0 -1108
  107. package/dist/libraries/include/harfbuzz/hb-ft.h +0 -145
  108. package/dist/libraries/include/harfbuzz/hb-map.h +0 -124
  109. package/dist/libraries/include/harfbuzz/hb-ot-color.h +0 -146
  110. package/dist/libraries/include/harfbuzz/hb-ot-deprecated.h +0 -141
  111. package/dist/libraries/include/harfbuzz/hb-ot-font.h +0 -45
  112. package/dist/libraries/include/harfbuzz/hb-ot-layout.h +0 -503
  113. package/dist/libraries/include/harfbuzz/hb-ot-math.h +0 -333
  114. package/dist/libraries/include/harfbuzz/hb-ot-meta.h +0 -72
  115. package/dist/libraries/include/harfbuzz/hb-ot-metrics.h +0 -129
  116. package/dist/libraries/include/harfbuzz/hb-ot-name.h +0 -158
  117. package/dist/libraries/include/harfbuzz/hb-ot-shape.h +0 -53
  118. package/dist/libraries/include/harfbuzz/hb-ot-var.h +0 -191
  119. package/dist/libraries/include/harfbuzz/hb-ot.h +0 -49
  120. package/dist/libraries/include/harfbuzz/hb-set.h +0 -200
  121. package/dist/libraries/include/harfbuzz/hb-shape-plan.h +0 -122
  122. package/dist/libraries/include/harfbuzz/hb-shape.h +0 -62
  123. package/dist/libraries/include/harfbuzz/hb-style.h +0 -81
  124. package/dist/libraries/include/harfbuzz/hb-subset-repacker.h +0 -81
  125. package/dist/libraries/include/harfbuzz/hb-subset.h +0 -234
  126. package/dist/libraries/include/harfbuzz/hb-unicode.h +0 -643
  127. package/dist/libraries/include/harfbuzz/hb-version.h +0 -95
  128. package/dist/libraries/include/harfbuzz/hb.h +0 -50
  129. package/dist/libraries/lib/cmake/expat-2.4.7/expat-config-version.cmake +0 -70
  130. package/dist/libraries/lib/cmake/expat-2.4.7/expat-config.cmake +0 -99
  131. package/dist/libraries/lib/cmake/expat-2.4.7/expat-noconfig.cmake +0 -19
  132. package/dist/libraries/lib/cmake/expat-2.4.7/expat.cmake +0 -99
  133. package/dist/libraries/lib/libass.a +0 -0
  134. package/dist/libraries/lib/libass.la +0 -41
  135. package/dist/libraries/lib/libbrotlicommon.a +0 -0
  136. package/dist/libraries/lib/libbrotlidec.a +0 -0
  137. package/dist/libraries/lib/libbrotlienc.a +0 -0
  138. package/dist/libraries/lib/libexpat.a +0 -0
  139. package/dist/libraries/lib/libfontconfig.a +0 -0
  140. package/dist/libraries/lib/libfontconfig.la +0 -41
  141. package/dist/libraries/lib/libfreetype.a +0 -0
  142. package/dist/libraries/lib/libfreetype.la +0 -41
  143. package/dist/libraries/lib/libfribidi.a +0 -0
  144. package/dist/libraries/lib/libfribidi.la +0 -41
  145. package/dist/libraries/lib/libharfbuzz-subset.a +0 -0
  146. package/dist/libraries/lib/libharfbuzz-subset.la +0 -41
  147. package/dist/libraries/lib/libharfbuzz.a +0 -0
  148. package/dist/libraries/lib/libharfbuzz.la +0 -41
  149. package/dist/libraries/lib/pkgconfig/expat.pc +0 -11
  150. package/dist/libraries/lib/pkgconfig/fontconfig.pc +0 -18
  151. package/dist/libraries/lib/pkgconfig/freetype2.pc +0 -14
  152. package/dist/libraries/lib/pkgconfig/fribidi.pc +0 -13
  153. package/dist/libraries/lib/pkgconfig/harfbuzz-subset.pc +0 -12
  154. package/dist/libraries/lib/pkgconfig/harfbuzz.pc +0 -13
  155. package/dist/libraries/lib/pkgconfig/libass.pc +0 -13
  156. package/dist/libraries/lib/pkgconfig/libbrotlicommon.pc +0 -11
  157. package/dist/libraries/lib/pkgconfig/libbrotlidec.pc +0 -12
  158. package/dist/libraries/lib/pkgconfig/libbrotlienc.pc +0 -12
  159. package/dist/libraries/share/aclocal/freetype2.m4 +0 -194
  160. package/dist/libraries/share/doc/expat/AUTHORS +0 -10
  161. package/dist/libraries/share/doc/expat/changelog +0 -1161
  162. package/dist/license/all +0 -951
  163. package/dist/license/all.tmp +0 -307
  164. package/dist/license/brotli +0 -12
  165. package/dist/license/expat +0 -71
  166. package/dist/license/fontconfig +0 -46
  167. package/dist/license/freetype +0 -92
  168. package/dist/license/fribidi +0 -15
  169. package/dist/license/harfbuzz +0 -32
  170. package/dist/license/jassub +0 -0
  171. package/dist/license/libass +0 -28
@@ -1,1108 +0,0 @@
1
- /*
2
- * Copyright © 2009 Red Hat, Inc.
3
- *
4
- * This is part of HarfBuzz, a text shaping library.
5
- *
6
- * Permission is hereby granted, without written agreement and without
7
- * license or royalty fees, to use, copy, modify, and distribute this
8
- * software and its documentation for any purpose, provided that the
9
- * above copyright notice and the following two paragraphs appear in
10
- * all copies of this software.
11
- *
12
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16
- * DAMAGE.
17
- *
18
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20
- * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23
- *
24
- * Red Hat Author(s): Behdad Esfahbod
25
- */
26
-
27
- #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
28
- #error "Include <hb.h> instead."
29
- #endif
30
-
31
- #ifndef HB_FONT_H
32
- #define HB_FONT_H
33
-
34
- #include "hb-common.h"
35
- #include "hb-face.h"
36
- #include "hb-draw.h"
37
-
38
- HB_BEGIN_DECLS
39
-
40
- /**
41
- * hb_font_t:
42
- *
43
- * Data type for holding fonts.
44
- *
45
- */
46
- typedef struct hb_font_t hb_font_t;
47
-
48
-
49
- /*
50
- * hb_font_funcs_t
51
- */
52
-
53
- /**
54
- * hb_font_funcs_t:
55
- *
56
- * Data type containing a set of virtual methods used for
57
- * working on #hb_font_t font objects.
58
- *
59
- * HarfBuzz provides a lightweight default function for each of
60
- * the methods in #hb_font_funcs_t. Client programs can implement
61
- * their own replacements for the individual font functions, as
62
- * needed, and replace the default by calling the setter for a
63
- * method.
64
- *
65
- **/
66
- typedef struct hb_font_funcs_t hb_font_funcs_t;
67
-
68
- HB_EXTERN hb_font_funcs_t *
69
- hb_font_funcs_create (void);
70
-
71
- HB_EXTERN hb_font_funcs_t *
72
- hb_font_funcs_get_empty (void);
73
-
74
- HB_EXTERN hb_font_funcs_t *
75
- hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
76
-
77
- HB_EXTERN void
78
- hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
79
-
80
- HB_EXTERN hb_bool_t
81
- hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
82
- hb_user_data_key_t *key,
83
- void * data,
84
- hb_destroy_func_t destroy,
85
- hb_bool_t replace);
86
-
87
-
88
- HB_EXTERN void *
89
- hb_font_funcs_get_user_data (const hb_font_funcs_t *ffuncs,
90
- hb_user_data_key_t *key);
91
-
92
-
93
- HB_EXTERN void
94
- hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
95
-
96
- HB_EXTERN hb_bool_t
97
- hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
98
-
99
-
100
- /* font and glyph extents */
101
-
102
- /**
103
- * hb_font_extents_t:
104
- * @ascender: The height of typographic ascenders.
105
- * @descender: The depth of typographic descenders.
106
- * @line_gap: The suggested line-spacing gap.
107
- *
108
- * Font-wide extent values, measured in font units.
109
- *
110
- * Note that typically @ascender is positive and @descender
111
- * negative, in coordinate systems that grow up.
112
- **/
113
- typedef struct hb_font_extents_t {
114
- hb_position_t ascender;
115
- hb_position_t descender;
116
- hb_position_t line_gap;
117
- /*< private >*/
118
- hb_position_t reserved9;
119
- hb_position_t reserved8;
120
- hb_position_t reserved7;
121
- hb_position_t reserved6;
122
- hb_position_t reserved5;
123
- hb_position_t reserved4;
124
- hb_position_t reserved3;
125
- hb_position_t reserved2;
126
- hb_position_t reserved1;
127
- } hb_font_extents_t;
128
-
129
- /**
130
- * hb_glyph_extents_t:
131
- * @x_bearing: Distance from the x-origin to the left extremum of the glyph.
132
- * @y_bearing: Distance from the top extremum of the glyph to the y-origin.
133
- * @width: Distance from the left extremum of the glyph to the right extremum.
134
- * @height: Distance from the top extremum of the glyph to the bottom extremum.
135
- *
136
- * Glyph extent values, measured in font units.
137
- *
138
- * Note that @height is negative, in coordinate systems that grow up.
139
- **/
140
- typedef struct hb_glyph_extents_t {
141
- hb_position_t x_bearing;
142
- hb_position_t y_bearing;
143
- hb_position_t width;
144
- hb_position_t height;
145
- } hb_glyph_extents_t;
146
-
147
- /* func types */
148
-
149
- /**
150
- * hb_font_get_font_extents_func_t:
151
- * @font: #hb_font_t to work upon
152
- * @font_data: @font user data pointer
153
- * @extents: (out): The font extents retrieved
154
- * @user_data: User data pointer passed by the caller
155
- *
156
- * This method should retrieve the extents for a font.
157
- *
158
- **/
159
- typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data,
160
- hb_font_extents_t *extents,
161
- void *user_data);
162
-
163
- /**
164
- * hb_font_get_font_h_extents_func_t:
165
- *
166
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
167
- *
168
- * This method should retrieve the extents for a font, for horizontal-direction
169
- * text segments. Extents must be returned in an #hb_glyph_extents output
170
- * parameter.
171
- *
172
- **/
173
- typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t;
174
-
175
- /**
176
- * hb_font_get_font_v_extents_func_t:
177
- *
178
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
179
- *
180
- * This method should retrieve the extents for a font, for vertical-direction
181
- * text segments. Extents must be returned in an #hb_glyph_extents output
182
- * parameter.
183
- *
184
- **/
185
- typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t;
186
-
187
-
188
- /**
189
- * hb_font_get_nominal_glyph_func_t:
190
- * @font: #hb_font_t to work upon
191
- * @font_data: @font user data pointer
192
- * @unicode: The Unicode code point to query
193
- * @glyph: (out): The glyph ID retrieved
194
- * @user_data: User data pointer passed by the caller
195
- *
196
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
197
- *
198
- * This method should retrieve the nominal glyph ID for a specified Unicode code
199
- * point. Glyph IDs must be returned in a #hb_codepoint_t output parameter.
200
- *
201
- * Return value: `true` if data found, `false` otherwise
202
- *
203
- **/
204
- typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data,
205
- hb_codepoint_t unicode,
206
- hb_codepoint_t *glyph,
207
- void *user_data);
208
-
209
- /**
210
- * hb_font_get_variation_glyph_func_t:
211
- * @font: #hb_font_t to work upon
212
- * @font_data: @font user data pointer
213
- * @unicode: The Unicode code point to query
214
- * @variation_selector: The variation-selector code point to query
215
- * @glyph: (out): The glyph ID retrieved
216
- * @user_data: User data pointer passed by the caller
217
- *
218
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
219
- *
220
- * This method should retrieve the glyph ID for a specified Unicode code point
221
- * followed by a specified Variation Selector code point. Glyph IDs must be
222
- * returned in a #hb_codepoint_t output parameter.
223
- *
224
- * Return value: `true` if data found, `false` otherwise
225
- *
226
- **/
227
- typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data,
228
- hb_codepoint_t unicode, hb_codepoint_t variation_selector,
229
- hb_codepoint_t *glyph,
230
- void *user_data);
231
-
232
-
233
- /**
234
- * hb_font_get_nominal_glyphs_func_t:
235
- * @font: #hb_font_t to work upon
236
- * @font_data: @font user data pointer
237
- * @count: number of code points to query
238
- * @first_unicode: The first Unicode code point to query
239
- * @unicode_stride: The stride between successive code points
240
- * @first_glyph: (out): The first glyph ID retrieved
241
- * @glyph_stride: The stride between successive glyph IDs
242
- * @user_data: User data pointer passed by the caller
243
- *
244
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
245
- *
246
- * This method should retrieve the nominal glyph IDs for a sequence of
247
- * Unicode code points. Glyph IDs must be returned in a #hb_codepoint_t
248
- * output parameter.
249
- *
250
- * Return value: the number of code points processed
251
- *
252
- **/
253
- typedef unsigned int (*hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data,
254
- unsigned int count,
255
- const hb_codepoint_t *first_unicode,
256
- unsigned int unicode_stride,
257
- hb_codepoint_t *first_glyph,
258
- unsigned int glyph_stride,
259
- void *user_data);
260
-
261
- /**
262
- * hb_font_get_glyph_advance_func_t:
263
- * @font: #hb_font_t to work upon
264
- * @font_data: @font user data pointer
265
- * @glyph: The glyph ID to query
266
- * @user_data: User data pointer passed by the caller
267
- *
268
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
269
- *
270
- * This method should retrieve the advance for a specified glyph. The
271
- * method must return an #hb_position_t.
272
- *
273
- * Return value: The advance of @glyph within @font
274
- *
275
- **/
276
- typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
277
- hb_codepoint_t glyph,
278
- void *user_data);
279
-
280
- /**
281
- * hb_font_get_glyph_h_advance_func_t:
282
- *
283
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
284
- *
285
- * This method should retrieve the advance for a specified glyph, in
286
- * horizontal-direction text segments. Advances must be returned in
287
- * an #hb_position_t output parameter.
288
- *
289
- **/
290
- typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
291
-
292
- /**
293
- * hb_font_get_glyph_v_advance_func_t:
294
- *
295
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
296
- *
297
- * This method should retrieve the advance for a specified glyph, in
298
- * vertical-direction text segments. Advances must be returned in
299
- * an #hb_position_t output parameter.
300
- *
301
- **/
302
- typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
303
-
304
- /**
305
- * hb_font_get_glyph_advances_func_t:
306
- * @font: #hb_font_t to work upon
307
- * @font_data: @font user data pointer
308
- * @count: The number of glyph IDs in the sequence queried
309
- * @first_glyph: The first glyph ID to query
310
- * @glyph_stride: The stride between successive glyph IDs
311
- * @first_advance: (out): The first advance retrieved
312
- * @advance_stride: The stride between successive advances
313
- * @user_data: User data pointer passed by the caller
314
- *
315
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
316
- *
317
- * This method should retrieve the advances for a sequence of glyphs.
318
- *
319
- **/
320
- typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data,
321
- unsigned int count,
322
- const hb_codepoint_t *first_glyph,
323
- unsigned glyph_stride,
324
- hb_position_t *first_advance,
325
- unsigned advance_stride,
326
- void *user_data);
327
-
328
- /**
329
- * hb_font_get_glyph_h_advances_func_t:
330
- *
331
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
332
- *
333
- * This method should retrieve the advances for a sequence of glyphs, in
334
- * horizontal-direction text segments.
335
- *
336
- **/
337
- typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_h_advances_func_t;
338
-
339
- /**
340
- * hb_font_get_glyph_v_advances_func_t:
341
- *
342
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
343
- *
344
- * This method should retrieve the advances for a sequence of glyphs, in
345
- * vertical-direction text segments.
346
- *
347
- **/
348
- typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_v_advances_func_t;
349
-
350
- /**
351
- * hb_font_get_glyph_origin_func_t:
352
- * @font: #hb_font_t to work upon
353
- * @font_data: @font user data pointer
354
- * @glyph: The glyph ID to query
355
- * @x: (out): The X coordinate of the origin
356
- * @y: (out): The Y coordinate of the origin
357
- * @user_data: User data pointer passed by the caller
358
- *
359
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
360
- *
361
- * This method should retrieve the (X,Y) coordinates (in font units) of the
362
- * origin for a glyph. Each coordinate must be returned in an #hb_position_t
363
- * output parameter.
364
- *
365
- * Return value: `true` if data found, `false` otherwise
366
- *
367
- **/
368
- typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
369
- hb_codepoint_t glyph,
370
- hb_position_t *x, hb_position_t *y,
371
- void *user_data);
372
-
373
- /**
374
- * hb_font_get_glyph_h_origin_func_t:
375
- *
376
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
377
- *
378
- * This method should retrieve the (X,Y) coordinates (in font units) of the
379
- * origin for a glyph, for horizontal-direction text segments. Each
380
- * coordinate must be returned in an #hb_position_t output parameter.
381
- *
382
- **/
383
- typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
384
-
385
- /**
386
- * hb_font_get_glyph_v_origin_func_t:
387
- *
388
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
389
- *
390
- * This method should retrieve the (X,Y) coordinates (in font units) of the
391
- * origin for a glyph, for vertical-direction text segments. Each coordinate
392
- * must be returned in an #hb_position_t output parameter.
393
- *
394
- **/
395
- typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
396
-
397
- /**
398
- * hb_font_get_glyph_kerning_func_t:
399
- * @font: #hb_font_t to work upon
400
- * @font_data: @font user data pointer
401
- * @first_glyph: The glyph ID of the first glyph in the glyph pair
402
- * @second_glyph: The glyph ID of the second glyph in the glyph pair
403
- * @user_data: User data pointer passed by the caller
404
- *
405
- * This method should retrieve the kerning-adjustment value for a glyph-pair in
406
- * the specified font, for horizontal text segments.
407
- *
408
- **/
409
- typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data,
410
- hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
411
- void *user_data);
412
- /**
413
- * hb_font_get_glyph_h_kerning_func_t:
414
- *
415
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
416
- *
417
- * This method should retrieve the kerning-adjustment value for a glyph-pair in
418
- * the specified font, for horizontal text segments.
419
- *
420
- **/
421
- typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
422
-
423
-
424
- /**
425
- * hb_font_get_glyph_extents_func_t:
426
- * @font: #hb_font_t to work upon
427
- * @font_data: @font user data pointer
428
- * @glyph: The glyph ID to query
429
- * @extents: (out): The #hb_glyph_extents_t retrieved
430
- * @user_data: User data pointer passed by the caller
431
- *
432
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
433
- *
434
- * This method should retrieve the extents for a specified glyph. Extents must be
435
- * returned in an #hb_glyph_extents output parameter.
436
- *
437
- * Return value: `true` if data found, `false` otherwise
438
- *
439
- **/
440
- typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
441
- hb_codepoint_t glyph,
442
- hb_glyph_extents_t *extents,
443
- void *user_data);
444
-
445
- /**
446
- * hb_font_get_glyph_contour_point_func_t:
447
- * @font: #hb_font_t to work upon
448
- * @font_data: @font user data pointer
449
- * @glyph: The glyph ID to query
450
- * @point_index: The contour-point index to query
451
- * @x: (out): The X value retrieved for the contour point
452
- * @y: (out): The Y value retrieved for the contour point
453
- * @user_data: User data pointer passed by the caller
454
- *
455
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
456
- *
457
- * This method should retrieve the (X,Y) coordinates (in font units) for a
458
- * specified contour point in a glyph. Each coordinate must be returned as
459
- * an #hb_position_t output parameter.
460
- *
461
- * Return value: `true` if data found, `false` otherwise
462
- *
463
- **/
464
- typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
465
- hb_codepoint_t glyph, unsigned int point_index,
466
- hb_position_t *x, hb_position_t *y,
467
- void *user_data);
468
-
469
-
470
- /**
471
- * hb_font_get_glyph_name_func_t:
472
- * @font: #hb_font_t to work upon
473
- * @font_data: @font user data pointer
474
- * @glyph: The glyph ID to query
475
- * @name: (out) (array length=size): Name string retrieved for the glyph ID
476
- * @size: Length of the glyph-name string retrieved
477
- * @user_data: User data pointer passed by the caller
478
- *
479
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
480
- *
481
- * This method should retrieve the glyph name that corresponds to a
482
- * glyph ID. The name should be returned in a string output parameter.
483
- *
484
- * Return value: `true` if data found, `false` otherwise
485
- *
486
- **/
487
- typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data,
488
- hb_codepoint_t glyph,
489
- char *name, unsigned int size,
490
- void *user_data);
491
-
492
- /**
493
- * hb_font_get_glyph_from_name_func_t:
494
- * @font: #hb_font_t to work upon
495
- * @font_data: @font user data pointer
496
- * @name: (array length=len): The name string to query
497
- * @len: The length of the name queried
498
- * @glyph: (out): The glyph ID retrieved
499
- * @user_data: User data pointer passed by the caller
500
- *
501
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
502
- *
503
- * This method should retrieve the glyph ID that corresponds to a glyph-name
504
- * string.
505
- *
506
- * Return value: `true` if data found, `false` otherwise
507
- *
508
- **/
509
- typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data,
510
- const char *name, int len, /* -1 means nul-terminated */
511
- hb_codepoint_t *glyph,
512
- void *user_data);
513
-
514
- /**
515
- * hb_font_get_glyph_shape_func_t:
516
- * @font: #hb_font_t to work upon
517
- * @font_data: @font user data pointer
518
- * @glyph: The glyph ID to query
519
- * @draw_funcs: The draw functions to send the shape data to
520
- * @draw_data: The data accompanying the draw functions
521
- * @user_data: User data pointer passed by the caller
522
- *
523
- * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
524
- *
525
- * Since: 4.0.0
526
- *
527
- **/
528
- typedef void (*hb_font_get_glyph_shape_func_t) (hb_font_t *font, void *font_data,
529
- hb_codepoint_t glyph,
530
- hb_draw_funcs_t *draw_funcs, void *draw_data,
531
- void *user_data);
532
-
533
-
534
- /* func setters */
535
-
536
- /**
537
- * hb_font_funcs_set_font_h_extents_func:
538
- * @ffuncs: A font-function structure
539
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
540
- * @user_data: Data to pass to @func
541
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
542
- *
543
- * Sets the implementation function for #hb_font_get_font_h_extents_func_t.
544
- *
545
- * Since: 1.1.2
546
- **/
547
- HB_EXTERN void
548
- hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs,
549
- hb_font_get_font_h_extents_func_t func,
550
- void *user_data, hb_destroy_func_t destroy);
551
-
552
- /**
553
- * hb_font_funcs_set_font_v_extents_func:
554
- * @ffuncs: A font-function structure
555
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
556
- * @user_data: Data to pass to @func
557
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
558
- *
559
- * Sets the implementation function for #hb_font_get_font_v_extents_func_t.
560
- *
561
- * Since: 1.1.2
562
- **/
563
- HB_EXTERN void
564
- hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs,
565
- hb_font_get_font_v_extents_func_t func,
566
- void *user_data, hb_destroy_func_t destroy);
567
-
568
- /**
569
- * hb_font_funcs_set_nominal_glyph_func:
570
- * @ffuncs: A font-function structure
571
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
572
- * @user_data: Data to pass to @func
573
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
574
- *
575
- * Sets the implementation function for #hb_font_get_nominal_glyph_func_t.
576
- *
577
- * Since: 1.2.3
578
- **/
579
- HB_EXTERN void
580
- hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs,
581
- hb_font_get_nominal_glyph_func_t func,
582
- void *user_data, hb_destroy_func_t destroy);
583
-
584
- /**
585
- * hb_font_funcs_set_nominal_glyphs_func:
586
- * @ffuncs: A font-function structure
587
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
588
- * @user_data: Data to pass to @func
589
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
590
- *
591
- * Sets the implementation function for #hb_font_get_nominal_glyphs_func_t.
592
- *
593
- * Since: 2.0.0
594
- **/
595
- HB_EXTERN void
596
- hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs,
597
- hb_font_get_nominal_glyphs_func_t func,
598
- void *user_data, hb_destroy_func_t destroy);
599
-
600
- /**
601
- * hb_font_funcs_set_variation_glyph_func:
602
- * @ffuncs: A font-function structure
603
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
604
- * @user_data: Data to pass to @func
605
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
606
- *
607
- * Sets the implementation function for #hb_font_get_variation_glyph_func_t.
608
- *
609
- * Since: 1.2.3
610
- **/
611
- HB_EXTERN void
612
- hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs,
613
- hb_font_get_variation_glyph_func_t func,
614
- void *user_data, hb_destroy_func_t destroy);
615
-
616
- /**
617
- * hb_font_funcs_set_glyph_h_advance_func:
618
- * @ffuncs: A font-function structure
619
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
620
- * @user_data: Data to pass to @func
621
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
622
- *
623
- * Sets the implementation function for #hb_font_get_glyph_h_advance_func_t.
624
- *
625
- * Since: 0.9.2
626
- **/
627
- HB_EXTERN void
628
- hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
629
- hb_font_get_glyph_h_advance_func_t func,
630
- void *user_data, hb_destroy_func_t destroy);
631
-
632
- /**
633
- * hb_font_funcs_set_glyph_v_advance_func:
634
- * @ffuncs: A font-function structure
635
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
636
- * @user_data: Data to pass to @func
637
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
638
- *
639
- * Sets the implementation function for #hb_font_get_glyph_v_advance_func_t.
640
- *
641
- * Since: 0.9.2
642
- **/
643
- HB_EXTERN void
644
- hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
645
- hb_font_get_glyph_v_advance_func_t func,
646
- void *user_data, hb_destroy_func_t destroy);
647
-
648
- /**
649
- * hb_font_funcs_set_glyph_h_advances_func:
650
- * @ffuncs: A font-function structure
651
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
652
- * @user_data: Data to pass to @func
653
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
654
- *
655
- * Sets the implementation function for #hb_font_get_glyph_h_advances_func_t.
656
- *
657
- * Since: 1.8.6
658
- **/
659
- HB_EXTERN void
660
- hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs,
661
- hb_font_get_glyph_h_advances_func_t func,
662
- void *user_data, hb_destroy_func_t destroy);
663
-
664
- /**
665
- * hb_font_funcs_set_glyph_v_advances_func:
666
- * @ffuncs: A font-function structure
667
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
668
- * @user_data: Data to pass to @func
669
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
670
- *
671
- * Sets the implementation function for #hb_font_get_glyph_v_advances_func_t.
672
- *
673
- * Since: 1.8.6
674
- **/
675
- HB_EXTERN void
676
- hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs,
677
- hb_font_get_glyph_v_advances_func_t func,
678
- void *user_data, hb_destroy_func_t destroy);
679
-
680
- /**
681
- * hb_font_funcs_set_glyph_h_origin_func:
682
- * @ffuncs: A font-function structure
683
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
684
- * @user_data: Data to pass to @func
685
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
686
- *
687
- * Sets the implementation function for #hb_font_get_glyph_h_origin_func_t.
688
- *
689
- * Since: 0.9.2
690
- **/
691
- HB_EXTERN void
692
- hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
693
- hb_font_get_glyph_h_origin_func_t func,
694
- void *user_data, hb_destroy_func_t destroy);
695
-
696
- /**
697
- * hb_font_funcs_set_glyph_v_origin_func:
698
- * @ffuncs: A font-function structure
699
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
700
- * @user_data: Data to pass to @func
701
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
702
- *
703
- * Sets the implementation function for #hb_font_get_glyph_v_origin_func_t.
704
- *
705
- * Since: 0.9.2
706
- **/
707
- HB_EXTERN void
708
- hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
709
- hb_font_get_glyph_v_origin_func_t func,
710
- void *user_data, hb_destroy_func_t destroy);
711
-
712
- /**
713
- * hb_font_funcs_set_glyph_h_kerning_func:
714
- * @ffuncs: A font-function structure
715
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
716
- * @user_data: Data to pass to @func
717
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
718
- *
719
- * Sets the implementation function for #hb_font_get_glyph_h_kerning_func_t.
720
- *
721
- * Since: 0.9.2
722
- **/
723
- HB_EXTERN void
724
- hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
725
- hb_font_get_glyph_h_kerning_func_t func,
726
- void *user_data, hb_destroy_func_t destroy);
727
-
728
- /**
729
- * hb_font_funcs_set_glyph_extents_func:
730
- * @ffuncs: A font-function structure
731
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
732
- * @user_data: Data to pass to @func
733
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
734
- *
735
- * Sets the implementation function for #hb_font_get_glyph_extents_func_t.
736
- *
737
- * Since: 0.9.2
738
- **/
739
- HB_EXTERN void
740
- hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
741
- hb_font_get_glyph_extents_func_t func,
742
- void *user_data, hb_destroy_func_t destroy);
743
-
744
- /**
745
- * hb_font_funcs_set_glyph_contour_point_func:
746
- * @ffuncs: A font-function structure
747
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
748
- * @user_data: Data to pass to @func
749
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
750
- *
751
- * Sets the implementation function for #hb_font_get_glyph_contour_point_func_t.
752
- *
753
- * Since: 0.9.2
754
- **/
755
- HB_EXTERN void
756
- hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
757
- hb_font_get_glyph_contour_point_func_t func,
758
- void *user_data, hb_destroy_func_t destroy);
759
-
760
- /**
761
- * hb_font_funcs_set_glyph_name_func:
762
- * @ffuncs: A font-function structure
763
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
764
- * @user_data: Data to pass to @func
765
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
766
- *
767
- * Sets the implementation function for #hb_font_get_glyph_name_func_t.
768
- *
769
- * Since: 0.9.2
770
- **/
771
- HB_EXTERN void
772
- hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
773
- hb_font_get_glyph_name_func_t func,
774
- void *user_data, hb_destroy_func_t destroy);
775
-
776
- /**
777
- * hb_font_funcs_set_glyph_from_name_func:
778
- * @ffuncs: A font-function structure
779
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
780
- * @user_data: Data to pass to @func
781
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
782
- *
783
- * Sets the implementation function for #hb_font_get_glyph_from_name_func_t.
784
- *
785
- * Since: 0.9.2
786
- **/
787
- HB_EXTERN void
788
- hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
789
- hb_font_get_glyph_from_name_func_t func,
790
- void *user_data, hb_destroy_func_t destroy);
791
-
792
- /**
793
- * hb_font_funcs_set_glyph_shape_func:
794
- * @ffuncs: A font-function structure
795
- * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
796
- * @user_data: Data to pass to @func
797
- * @destroy: (nullable): The function to call when @user_data is not needed anymore
798
- *
799
- * Sets the implementation function for #hb_font_get_glyph_shape_func_t.
800
- *
801
- * Since: 4.0.0
802
- **/
803
- HB_EXTERN void
804
- hb_font_funcs_set_glyph_shape_func (hb_font_funcs_t *ffuncs,
805
- hb_font_get_glyph_shape_func_t func,
806
- void *user_data, hb_destroy_func_t destroy);
807
-
808
- /* func dispatch */
809
-
810
- HB_EXTERN hb_bool_t
811
- hb_font_get_h_extents (hb_font_t *font,
812
- hb_font_extents_t *extents);
813
- HB_EXTERN hb_bool_t
814
- hb_font_get_v_extents (hb_font_t *font,
815
- hb_font_extents_t *extents);
816
-
817
- HB_EXTERN hb_bool_t
818
- hb_font_get_nominal_glyph (hb_font_t *font,
819
- hb_codepoint_t unicode,
820
- hb_codepoint_t *glyph);
821
- HB_EXTERN hb_bool_t
822
- hb_font_get_variation_glyph (hb_font_t *font,
823
- hb_codepoint_t unicode, hb_codepoint_t variation_selector,
824
- hb_codepoint_t *glyph);
825
-
826
- HB_EXTERN unsigned int
827
- hb_font_get_nominal_glyphs (hb_font_t *font,
828
- unsigned int count,
829
- const hb_codepoint_t *first_unicode,
830
- unsigned int unicode_stride,
831
- hb_codepoint_t *first_glyph,
832
- unsigned int glyph_stride);
833
-
834
- HB_EXTERN hb_position_t
835
- hb_font_get_glyph_h_advance (hb_font_t *font,
836
- hb_codepoint_t glyph);
837
- HB_EXTERN hb_position_t
838
- hb_font_get_glyph_v_advance (hb_font_t *font,
839
- hb_codepoint_t glyph);
840
-
841
- HB_EXTERN void
842
- hb_font_get_glyph_h_advances (hb_font_t* font,
843
- unsigned int count,
844
- const hb_codepoint_t *first_glyph,
845
- unsigned glyph_stride,
846
- hb_position_t *first_advance,
847
- unsigned advance_stride);
848
- HB_EXTERN void
849
- hb_font_get_glyph_v_advances (hb_font_t* font,
850
- unsigned int count,
851
- const hb_codepoint_t *first_glyph,
852
- unsigned glyph_stride,
853
- hb_position_t *first_advance,
854
- unsigned advance_stride);
855
-
856
- HB_EXTERN hb_bool_t
857
- hb_font_get_glyph_h_origin (hb_font_t *font,
858
- hb_codepoint_t glyph,
859
- hb_position_t *x, hb_position_t *y);
860
- HB_EXTERN hb_bool_t
861
- hb_font_get_glyph_v_origin (hb_font_t *font,
862
- hb_codepoint_t glyph,
863
- hb_position_t *x, hb_position_t *y);
864
-
865
- HB_EXTERN hb_position_t
866
- hb_font_get_glyph_h_kerning (hb_font_t *font,
867
- hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
868
-
869
- HB_EXTERN hb_bool_t
870
- hb_font_get_glyph_extents (hb_font_t *font,
871
- hb_codepoint_t glyph,
872
- hb_glyph_extents_t *extents);
873
-
874
- HB_EXTERN hb_bool_t
875
- hb_font_get_glyph_contour_point (hb_font_t *font,
876
- hb_codepoint_t glyph, unsigned int point_index,
877
- hb_position_t *x, hb_position_t *y);
878
-
879
- HB_EXTERN hb_bool_t
880
- hb_font_get_glyph_name (hb_font_t *font,
881
- hb_codepoint_t glyph,
882
- char *name, unsigned int size);
883
- HB_EXTERN hb_bool_t
884
- hb_font_get_glyph_from_name (hb_font_t *font,
885
- const char *name, int len, /* -1 means nul-terminated */
886
- hb_codepoint_t *glyph);
887
-
888
- HB_EXTERN void
889
- hb_font_get_glyph_shape (hb_font_t *font,
890
- hb_codepoint_t glyph,
891
- hb_draw_funcs_t *dfuncs, void *draw_data);
892
-
893
-
894
- /* high-level funcs, with fallback */
895
-
896
- /* Calls either hb_font_get_nominal_glyph() if variation_selector is 0,
897
- * otherwise calls hb_font_get_variation_glyph(). */
898
- HB_EXTERN hb_bool_t
899
- hb_font_get_glyph (hb_font_t *font,
900
- hb_codepoint_t unicode, hb_codepoint_t variation_selector,
901
- hb_codepoint_t *glyph);
902
-
903
- HB_EXTERN void
904
- hb_font_get_extents_for_direction (hb_font_t *font,
905
- hb_direction_t direction,
906
- hb_font_extents_t *extents);
907
- HB_EXTERN void
908
- hb_font_get_glyph_advance_for_direction (hb_font_t *font,
909
- hb_codepoint_t glyph,
910
- hb_direction_t direction,
911
- hb_position_t *x, hb_position_t *y);
912
- HB_EXTERN void
913
- hb_font_get_glyph_advances_for_direction (hb_font_t* font,
914
- hb_direction_t direction,
915
- unsigned int count,
916
- const hb_codepoint_t *first_glyph,
917
- unsigned glyph_stride,
918
- hb_position_t *first_advance,
919
- unsigned advance_stride);
920
- HB_EXTERN void
921
- hb_font_get_glyph_origin_for_direction (hb_font_t *font,
922
- hb_codepoint_t glyph,
923
- hb_direction_t direction,
924
- hb_position_t *x, hb_position_t *y);
925
- HB_EXTERN void
926
- hb_font_add_glyph_origin_for_direction (hb_font_t *font,
927
- hb_codepoint_t glyph,
928
- hb_direction_t direction,
929
- hb_position_t *x, hb_position_t *y);
930
- HB_EXTERN void
931
- hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
932
- hb_codepoint_t glyph,
933
- hb_direction_t direction,
934
- hb_position_t *x, hb_position_t *y);
935
-
936
- HB_EXTERN void
937
- hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
938
- hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
939
- hb_direction_t direction,
940
- hb_position_t *x, hb_position_t *y);
941
-
942
- HB_EXTERN hb_bool_t
943
- hb_font_get_glyph_extents_for_origin (hb_font_t *font,
944
- hb_codepoint_t glyph,
945
- hb_direction_t direction,
946
- hb_glyph_extents_t *extents);
947
-
948
- HB_EXTERN hb_bool_t
949
- hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
950
- hb_codepoint_t glyph, unsigned int point_index,
951
- hb_direction_t direction,
952
- hb_position_t *x, hb_position_t *y);
953
-
954
- /* Generates gidDDD if glyph has no name. */
955
- HB_EXTERN void
956
- hb_font_glyph_to_string (hb_font_t *font,
957
- hb_codepoint_t glyph,
958
- char *s, unsigned int size);
959
- /* Parses gidDDD and uniUUUU strings automatically. */
960
- HB_EXTERN hb_bool_t
961
- hb_font_glyph_from_string (hb_font_t *font,
962
- const char *s, int len, /* -1 means nul-terminated */
963
- hb_codepoint_t *glyph);
964
-
965
-
966
- /*
967
- * hb_font_t
968
- */
969
-
970
- /* Fonts are very light-weight objects */
971
-
972
- HB_EXTERN hb_font_t *
973
- hb_font_create (hb_face_t *face);
974
-
975
- HB_EXTERN hb_font_t *
976
- hb_font_create_sub_font (hb_font_t *parent);
977
-
978
- HB_EXTERN hb_font_t *
979
- hb_font_get_empty (void);
980
-
981
- HB_EXTERN hb_font_t *
982
- hb_font_reference (hb_font_t *font);
983
-
984
- HB_EXTERN void
985
- hb_font_destroy (hb_font_t *font);
986
-
987
- HB_EXTERN hb_bool_t
988
- hb_font_set_user_data (hb_font_t *font,
989
- hb_user_data_key_t *key,
990
- void * data,
991
- hb_destroy_func_t destroy,
992
- hb_bool_t replace);
993
-
994
-
995
- HB_EXTERN void *
996
- hb_font_get_user_data (const hb_font_t *font,
997
- hb_user_data_key_t *key);
998
-
999
- HB_EXTERN void
1000
- hb_font_make_immutable (hb_font_t *font);
1001
-
1002
- HB_EXTERN hb_bool_t
1003
- hb_font_is_immutable (hb_font_t *font);
1004
-
1005
- HB_EXTERN unsigned int
1006
- hb_font_get_serial (hb_font_t *font);
1007
-
1008
- HB_EXTERN void
1009
- hb_font_changed (hb_font_t *font);
1010
-
1011
- HB_EXTERN void
1012
- hb_font_set_parent (hb_font_t *font,
1013
- hb_font_t *parent);
1014
-
1015
- HB_EXTERN hb_font_t *
1016
- hb_font_get_parent (hb_font_t *font);
1017
-
1018
- HB_EXTERN void
1019
- hb_font_set_face (hb_font_t *font,
1020
- hb_face_t *face);
1021
-
1022
- HB_EXTERN hb_face_t *
1023
- hb_font_get_face (hb_font_t *font);
1024
-
1025
-
1026
- HB_EXTERN void
1027
- hb_font_set_funcs (hb_font_t *font,
1028
- hb_font_funcs_t *klass,
1029
- void *font_data,
1030
- hb_destroy_func_t destroy);
1031
-
1032
- /* Be *very* careful with this function! */
1033
- HB_EXTERN void
1034
- hb_font_set_funcs_data (hb_font_t *font,
1035
- void *font_data,
1036
- hb_destroy_func_t destroy);
1037
-
1038
-
1039
- HB_EXTERN void
1040
- hb_font_set_scale (hb_font_t *font,
1041
- int x_scale,
1042
- int y_scale);
1043
-
1044
- HB_EXTERN void
1045
- hb_font_get_scale (hb_font_t *font,
1046
- int *x_scale,
1047
- int *y_scale);
1048
-
1049
- /*
1050
- * A zero value means "no hinting in that direction"
1051
- */
1052
- HB_EXTERN void
1053
- hb_font_set_ppem (hb_font_t *font,
1054
- unsigned int x_ppem,
1055
- unsigned int y_ppem);
1056
-
1057
- HB_EXTERN void
1058
- hb_font_get_ppem (hb_font_t *font,
1059
- unsigned int *x_ppem,
1060
- unsigned int *y_ppem);
1061
-
1062
- /*
1063
- * Point size per EM. Used for optical-sizing in CoreText.
1064
- * A value of zero means "not set".
1065
- */
1066
- HB_EXTERN void
1067
- hb_font_set_ptem (hb_font_t *font, float ptem);
1068
-
1069
- HB_EXTERN float
1070
- hb_font_get_ptem (hb_font_t *font);
1071
-
1072
- HB_EXTERN void
1073
- hb_font_set_synthetic_slant (hb_font_t *font, float slant);
1074
-
1075
- HB_EXTERN float
1076
- hb_font_get_synthetic_slant (hb_font_t *font);
1077
-
1078
- HB_EXTERN void
1079
- hb_font_set_variations (hb_font_t *font,
1080
- const hb_variation_t *variations,
1081
- unsigned int variations_length);
1082
-
1083
- HB_EXTERN void
1084
- hb_font_set_var_coords_design (hb_font_t *font,
1085
- const float *coords,
1086
- unsigned int coords_length);
1087
-
1088
- HB_EXTERN const float *
1089
- hb_font_get_var_coords_design (hb_font_t *font,
1090
- unsigned int *length);
1091
-
1092
- HB_EXTERN void
1093
- hb_font_set_var_coords_normalized (hb_font_t *font,
1094
- const int *coords, /* 2.14 normalized */
1095
- unsigned int coords_length);
1096
-
1097
- HB_EXTERN const int *
1098
- hb_font_get_var_coords_normalized (hb_font_t *font,
1099
- unsigned int *length);
1100
-
1101
- HB_EXTERN void
1102
- hb_font_set_var_named_instance (hb_font_t *font,
1103
- unsigned instance_index);
1104
-
1105
-
1106
- HB_END_DECLS
1107
-
1108
- #endif /* HB_FONT_H */