jassub 1.7.11 → 1.7.12

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 (166) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +251 -251
  3. package/dist/COPYRIGHT +951 -951
  4. package/dist/jassub-worker.wasm.js +1 -1
  5. package/dist/jassub.es.js +1 -1
  6. package/dist/jassub.umd.js +1 -1
  7. package/dist/js/jassub-worker.js +4 -4
  8. package/dist/js/jassub-worker.wasm +0 -0
  9. package/dist/js/jassub-worker.wasm.js +26 -25
  10. package/dist/js/jassub.js +832 -832
  11. package/dist/libraries/bin/brotli.js +1 -0
  12. package/dist/libraries/include/ass/ass.h +812 -0
  13. package/dist/libraries/include/ass/ass_types.h +292 -0
  14. package/dist/libraries/include/brotli/decode.h +344 -0
  15. package/dist/libraries/include/brotli/encode.h +448 -0
  16. package/dist/libraries/include/brotli/port.h +288 -0
  17. package/dist/libraries/include/brotli/types.h +83 -0
  18. package/dist/libraries/include/expat.h +1064 -0
  19. package/dist/libraries/include/expat_config.h +115 -0
  20. package/dist/libraries/include/expat_external.h +165 -0
  21. package/dist/libraries/include/fontconfig/fcfreetype.h +59 -0
  22. package/dist/libraries/include/fontconfig/fcprivate.h +134 -0
  23. package/dist/libraries/include/fontconfig/fontconfig.h +1154 -0
  24. package/dist/libraries/include/freetype2/freetype/config/ftconfig.h +63 -0
  25. package/dist/libraries/include/freetype2/freetype/config/ftheader.h +824 -0
  26. package/dist/libraries/include/freetype2/freetype/config/ftmodule.h +20 -0
  27. package/dist/libraries/include/freetype2/freetype/config/ftoption.h +1011 -0
  28. package/dist/libraries/include/freetype2/freetype/config/ftstdlib.h +175 -0
  29. package/dist/libraries/include/freetype2/freetype/config/integer-types.h +245 -0
  30. package/dist/libraries/include/freetype2/freetype/config/mac-support.h +49 -0
  31. package/dist/libraries/include/freetype2/freetype/config/public-macros.h +120 -0
  32. package/dist/libraries/include/freetype2/freetype/freetype.h +4833 -0
  33. package/dist/libraries/include/freetype2/freetype/ftadvanc.h +188 -0
  34. package/dist/libraries/include/freetype2/freetype/ftbbox.h +101 -0
  35. package/dist/libraries/include/freetype2/freetype/ftbdf.h +212 -0
  36. package/dist/libraries/include/freetype2/freetype/ftbitmap.h +329 -0
  37. package/dist/libraries/include/freetype2/freetype/ftbzip2.h +102 -0
  38. package/dist/libraries/include/freetype2/freetype/ftcache.h +1087 -0
  39. package/dist/libraries/include/freetype2/freetype/ftchapters.h +147 -0
  40. package/dist/libraries/include/freetype2/freetype/ftcid.h +167 -0
  41. package/dist/libraries/include/freetype2/freetype/ftcolor.h +1609 -0
  42. package/dist/libraries/include/freetype2/freetype/ftdriver.h +1193 -0
  43. package/dist/libraries/include/freetype2/freetype/fterrdef.h +279 -0
  44. package/dist/libraries/include/freetype2/freetype/fterrors.h +296 -0
  45. package/dist/libraries/include/freetype2/freetype/ftfntfmt.h +93 -0
  46. package/dist/libraries/include/freetype2/freetype/ftgasp.h +143 -0
  47. package/dist/libraries/include/freetype2/freetype/ftglyph.h +664 -0
  48. package/dist/libraries/include/freetype2/freetype/ftgxval.h +354 -0
  49. package/dist/libraries/include/freetype2/freetype/ftgzip.h +151 -0
  50. package/dist/libraries/include/freetype2/freetype/ftimage.h +1276 -0
  51. package/dist/libraries/include/freetype2/freetype/ftincrem.h +348 -0
  52. package/dist/libraries/include/freetype2/freetype/ftlcdfil.h +323 -0
  53. package/dist/libraries/include/freetype2/freetype/ftlist.h +296 -0
  54. package/dist/libraries/include/freetype2/freetype/ftlogging.h +184 -0
  55. package/dist/libraries/include/freetype2/freetype/ftlzw.h +100 -0
  56. package/dist/libraries/include/freetype2/freetype/ftmac.h +289 -0
  57. package/dist/libraries/include/freetype2/freetype/ftmm.h +752 -0
  58. package/dist/libraries/include/freetype2/freetype/ftmodapi.h +806 -0
  59. package/dist/libraries/include/freetype2/freetype/ftmoderr.h +204 -0
  60. package/dist/libraries/include/freetype2/freetype/ftotval.h +206 -0
  61. package/dist/libraries/include/freetype2/freetype/ftoutln.h +586 -0
  62. package/dist/libraries/include/freetype2/freetype/ftparams.h +203 -0
  63. package/dist/libraries/include/freetype2/freetype/ftpfr.h +179 -0
  64. package/dist/libraries/include/freetype2/freetype/ftrender.h +244 -0
  65. package/dist/libraries/include/freetype2/freetype/ftsizes.h +159 -0
  66. package/dist/libraries/include/freetype2/freetype/ftsnames.h +272 -0
  67. package/dist/libraries/include/freetype2/freetype/ftstroke.h +773 -0
  68. package/dist/libraries/include/freetype2/freetype/ftsynth.h +83 -0
  69. package/dist/libraries/include/freetype2/freetype/ftsystem.h +352 -0
  70. package/dist/libraries/include/freetype2/freetype/fttrigon.h +350 -0
  71. package/dist/libraries/include/freetype2/freetype/fttypes.h +615 -0
  72. package/dist/libraries/include/freetype2/freetype/ftwinfnt.h +276 -0
  73. package/dist/libraries/include/freetype2/freetype/t1tables.h +773 -0
  74. package/dist/libraries/include/freetype2/freetype/ttnameid.h +1235 -0
  75. package/dist/libraries/include/freetype2/freetype/tttables.h +855 -0
  76. package/dist/libraries/include/freetype2/freetype/tttags.h +123 -0
  77. package/dist/libraries/include/freetype2/ft2build.h +42 -0
  78. package/dist/libraries/include/fribidi/fribidi-arabic.h +81 -0
  79. package/dist/libraries/include/fribidi/fribidi-begindecls.h +3 -0
  80. package/dist/libraries/include/fribidi/fribidi-bidi-types-list.h +96 -0
  81. package/dist/libraries/include/fribidi/fribidi-bidi-types.h +405 -0
  82. package/dist/libraries/include/fribidi/fribidi-bidi.h +142 -0
  83. package/dist/libraries/include/fribidi/fribidi-brackets.h +89 -0
  84. package/dist/libraries/include/fribidi/fribidi-char-sets-list.h +54 -0
  85. package/dist/libraries/include/fribidi/fribidi-char-sets.h +106 -0
  86. package/dist/libraries/include/fribidi/fribidi-common.h +158 -0
  87. package/dist/libraries/include/fribidi/fribidi-config.h +23 -0
  88. package/dist/libraries/include/fribidi/fribidi-deprecated.h +175 -0
  89. package/dist/libraries/include/fribidi/fribidi-enddecls.h +3 -0
  90. package/dist/libraries/include/fribidi/fribidi-flags.h +72 -0
  91. package/dist/libraries/include/fribidi/fribidi-joining-types-list.h +44 -0
  92. package/dist/libraries/include/fribidi/fribidi-joining-types.h +249 -0
  93. package/dist/libraries/include/fribidi/fribidi-joining.h +74 -0
  94. package/dist/libraries/include/fribidi/fribidi-mirroring.h +86 -0
  95. package/dist/libraries/include/fribidi/fribidi-shape.h +71 -0
  96. package/dist/libraries/include/fribidi/fribidi-types.h +79 -0
  97. package/dist/libraries/include/fribidi/fribidi-unicode-version.h +10 -0
  98. package/dist/libraries/include/fribidi/fribidi-unicode.h +105 -0
  99. package/dist/libraries/include/fribidi/fribidi.h +129 -0
  100. package/dist/libraries/include/harfbuzz/hb-aat-layout.h +795 -0
  101. package/dist/libraries/include/harfbuzz/hb-aat.h +38 -0
  102. package/dist/libraries/include/harfbuzz/hb-blob.h +160 -0
  103. package/dist/libraries/include/harfbuzz/hb-buffer.h +799 -0
  104. package/dist/libraries/include/harfbuzz/hb-common.h +902 -0
  105. package/dist/libraries/include/harfbuzz/hb-cplusplus.hh +221 -0
  106. package/dist/libraries/include/harfbuzz/hb-deprecated.h +251 -0
  107. package/dist/libraries/include/harfbuzz/hb-draw.h +325 -0
  108. package/dist/libraries/include/harfbuzz/hb-face.h +181 -0
  109. package/dist/libraries/include/harfbuzz/hb-font.h +1108 -0
  110. package/dist/libraries/include/harfbuzz/hb-ft.h +145 -0
  111. package/dist/libraries/include/harfbuzz/hb-map.h +124 -0
  112. package/dist/libraries/include/harfbuzz/hb-ot-color.h +146 -0
  113. package/dist/libraries/include/harfbuzz/hb-ot-deprecated.h +141 -0
  114. package/dist/libraries/include/harfbuzz/hb-ot-font.h +45 -0
  115. package/dist/libraries/include/harfbuzz/hb-ot-layout.h +503 -0
  116. package/dist/libraries/include/harfbuzz/hb-ot-math.h +333 -0
  117. package/dist/libraries/include/harfbuzz/hb-ot-meta.h +72 -0
  118. package/dist/libraries/include/harfbuzz/hb-ot-metrics.h +129 -0
  119. package/dist/libraries/include/harfbuzz/hb-ot-name.h +158 -0
  120. package/dist/libraries/include/harfbuzz/hb-ot-shape.h +53 -0
  121. package/dist/libraries/include/harfbuzz/hb-ot-var.h +191 -0
  122. package/dist/libraries/include/harfbuzz/hb-ot.h +49 -0
  123. package/dist/libraries/include/harfbuzz/hb-set.h +200 -0
  124. package/dist/libraries/include/harfbuzz/hb-shape-plan.h +122 -0
  125. package/dist/libraries/include/harfbuzz/hb-shape.h +62 -0
  126. package/dist/libraries/include/harfbuzz/hb-style.h +81 -0
  127. package/dist/libraries/include/harfbuzz/hb-subset-repacker.h +81 -0
  128. package/dist/libraries/include/harfbuzz/hb-subset.h +234 -0
  129. package/dist/libraries/include/harfbuzz/hb-unicode.h +643 -0
  130. package/dist/libraries/include/harfbuzz/hb-version.h +95 -0
  131. package/dist/libraries/include/harfbuzz/hb.h +50 -0
  132. package/dist/libraries/lib/cmake/expat-2.4.7/expat-config-version.cmake +70 -0
  133. package/dist/libraries/lib/cmake/expat-2.4.7/expat-config.cmake +99 -0
  134. package/dist/libraries/lib/cmake/expat-2.4.7/expat-noconfig.cmake +19 -0
  135. package/dist/libraries/lib/cmake/expat-2.4.7/expat.cmake +99 -0
  136. package/dist/libraries/lib/libass.a +0 -0
  137. package/dist/libraries/lib/libass.la +41 -0
  138. package/dist/libraries/lib/libbrotlicommon.a +0 -0
  139. package/dist/libraries/lib/libbrotlidec.a +0 -0
  140. package/dist/libraries/lib/libbrotlienc.a +0 -0
  141. package/dist/libraries/lib/libexpat.a +0 -0
  142. package/dist/libraries/lib/libfontconfig.a +0 -0
  143. package/dist/libraries/lib/libfontconfig.la +41 -0
  144. package/dist/libraries/lib/libfreetype.a +0 -0
  145. package/dist/libraries/lib/libfreetype.la +41 -0
  146. package/dist/libraries/lib/libfribidi.a +0 -0
  147. package/dist/libraries/lib/libfribidi.la +41 -0
  148. package/dist/libraries/lib/libharfbuzz-subset.a +0 -0
  149. package/dist/libraries/lib/libharfbuzz-subset.la +41 -0
  150. package/dist/libraries/lib/libharfbuzz.a +0 -0
  151. package/dist/libraries/lib/libharfbuzz.la +41 -0
  152. package/dist/libraries/lib/pkgconfig/expat.pc +11 -0
  153. package/dist/libraries/lib/pkgconfig/fontconfig.pc +18 -0
  154. package/dist/libraries/lib/pkgconfig/freetype2.pc +14 -0
  155. package/dist/libraries/lib/pkgconfig/fribidi.pc +13 -0
  156. package/dist/libraries/lib/pkgconfig/harfbuzz-subset.pc +12 -0
  157. package/dist/libraries/lib/pkgconfig/harfbuzz.pc +13 -0
  158. package/dist/libraries/lib/pkgconfig/libass.pc +13 -0
  159. package/dist/libraries/lib/pkgconfig/libbrotlicommon.pc +11 -0
  160. package/dist/libraries/lib/pkgconfig/libbrotlidec.pc +12 -0
  161. package/dist/libraries/lib/pkgconfig/libbrotlienc.pc +12 -0
  162. package/dist/libraries/share/aclocal/freetype2.m4 +194 -0
  163. package/dist/libraries/share/doc/expat/AUTHORS +10 -0
  164. package/dist/libraries/share/doc/expat/changelog +1161 -0
  165. package/index.d.ts +115 -115
  166. package/package.json +1 -1
@@ -0,0 +1,325 @@
1
+ /*
2
+ * Copyright © 2019-2020 Ebrahim Byagowi
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
+
25
+ #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
26
+ #error "Include <hb.h> instead."
27
+ #endif
28
+
29
+ #ifndef HB_DRAW_H
30
+ #define HB_DRAW_H
31
+
32
+ #include "hb.h"
33
+
34
+ HB_BEGIN_DECLS
35
+
36
+
37
+ /**
38
+ * hb_draw_state_t
39
+ * @path_open: Whether there is an open path
40
+ * @path_start_x: X component of the start of current path
41
+ * @path_start_y: Y component of the start of current path
42
+ * @current_x: X component of current point
43
+ * @current_y: Y component of current point
44
+ *
45
+ * Current drawing state.
46
+ *
47
+ * Since: 4.0.0
48
+ **/
49
+ typedef struct hb_draw_state_t {
50
+ hb_bool_t path_open;
51
+
52
+ float path_start_x;
53
+ float path_start_y;
54
+
55
+ float current_x;
56
+ float current_y;
57
+
58
+ /*< private >*/
59
+ hb_var_num_t reserved1;
60
+ hb_var_num_t reserved2;
61
+ hb_var_num_t reserved3;
62
+ hb_var_num_t reserved4;
63
+ hb_var_num_t reserved5;
64
+ hb_var_num_t reserved6;
65
+ hb_var_num_t reserved7;
66
+ } hb_draw_state_t;
67
+
68
+ /**
69
+ * HB_DRAW_STATE_DEFAULT:
70
+ *
71
+ * The default #hb_draw_state_t at the start of glyph drawing.
72
+ */
73
+ #define HB_DRAW_STATE_DEFAULT {0, 0.f, 0.f, 0.f, 0.f, {0.}, {0.}, {0.}}
74
+
75
+
76
+ /**
77
+ * hb_draw_funcs_t:
78
+ *
79
+ * Glyph draw callbacks.
80
+ *
81
+ * #hb_draw_move_to_func_t, #hb_draw_line_to_func_t and
82
+ * #hb_draw_cubic_to_func_t calls are necessary to be defined but we translate
83
+ * #hb_draw_quadratic_to_func_t calls to #hb_draw_cubic_to_func_t if the
84
+ * callback isn't defined.
85
+ *
86
+ * Since: 4.0.0
87
+ **/
88
+
89
+ typedef struct hb_draw_funcs_t hb_draw_funcs_t;
90
+
91
+
92
+ /**
93
+ * hb_draw_move_to_func_t:
94
+ * @dfuncs: draw functions object
95
+ * @draw_data: The data accompanying the draw functions
96
+ * @st: current draw state
97
+ * @to_x: X component of target point
98
+ * @to_y: Y component of target point
99
+ * @user_data: User data pointer passed by the caller
100
+ *
101
+ * A virtual method for the #hb_draw_funcs_t to perform a "move-to" draw
102
+ * operation.
103
+ *
104
+ * Since: 4.0.0
105
+ *
106
+ **/
107
+ typedef void (*hb_draw_move_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data,
108
+ hb_draw_state_t *st,
109
+ float to_x, float to_y,
110
+ void *user_data);
111
+
112
+ /**
113
+ * hb_draw_line_to_func_t:
114
+ * @dfuncs: draw functions object
115
+ * @draw_data: The data accompanying the draw functions
116
+ * @st: current draw state
117
+ * @to_x: X component of target point
118
+ * @to_y: Y component of target point
119
+ * @user_data: User data pointer passed by the caller
120
+ *
121
+ * A virtual method for the #hb_draw_funcs_t to perform a "line-to" draw
122
+ * operation.
123
+ *
124
+ * Since: 4.0.0
125
+ *
126
+ **/
127
+ typedef void (*hb_draw_line_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data,
128
+ hb_draw_state_t *st,
129
+ float to_x, float to_y,
130
+ void *user_data);
131
+
132
+ /**
133
+ * hb_draw_quadratic_to_func_t:
134
+ * @dfuncs: draw functions object
135
+ * @draw_data: The data accompanying the draw functions
136
+ * @st: current draw state
137
+ * @control_x: X component of control point
138
+ * @control_y: Y component of control point
139
+ * @to_x: X component of target point
140
+ * @to_y: Y component of target point
141
+ * @user_data: User data pointer passed by the caller
142
+ *
143
+ * A virtual method for the #hb_draw_funcs_t to perform a "quadratic-to" draw
144
+ * operation.
145
+ *
146
+ * Since: 4.0.0
147
+ *
148
+ **/
149
+ typedef void (*hb_draw_quadratic_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data,
150
+ hb_draw_state_t *st,
151
+ float control_x, float control_y,
152
+ float to_x, float to_y,
153
+ void *user_data);
154
+
155
+ /**
156
+ * hb_draw_cubic_to_func_t:
157
+ * @dfuncs: draw functions object
158
+ * @draw_data: The data accompanying the draw functions
159
+ * @st: current draw state
160
+ * @control1_x: X component of first control point
161
+ * @control1_y: Y component of first control point
162
+ * @control2_x: X component of second control point
163
+ * @control2_y: Y component of second control point
164
+ * @to_x: X component of target point
165
+ * @to_y: Y component of target point
166
+ * @user_data: User data pointer passed by the caller
167
+ *
168
+ * A virtual method for the #hb_draw_funcs_t to perform a "cubic-to" draw
169
+ * operation.
170
+ *
171
+ * Since: 4.0.0
172
+ *
173
+ **/
174
+ typedef void (*hb_draw_cubic_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data,
175
+ hb_draw_state_t *st,
176
+ float control1_x, float control1_y,
177
+ float control2_x, float control2_y,
178
+ float to_x, float to_y,
179
+ void *user_data);
180
+
181
+ /**
182
+ * hb_draw_close_path_func_t:
183
+ * @dfuncs: draw functions object
184
+ * @draw_data: The data accompanying the draw functions
185
+ * @st: current draw state
186
+ * @user_data: User data pointer passed by the caller
187
+ *
188
+ * A virtual method for the #hb_draw_funcs_t to perform a "close-path" draw
189
+ * operation.
190
+ *
191
+ * Since: 4.0.0
192
+ *
193
+ **/
194
+ typedef void (*hb_draw_close_path_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data,
195
+ hb_draw_state_t *st,
196
+ void *user_data);
197
+
198
+ /**
199
+ * hb_draw_funcs_set_move_to_func:
200
+ * @dfuncs: draw functions object
201
+ * @func: (closure user_data) (destroy destroy) (scope notified): move-to callback
202
+ * @user_data: Data to pass to @func
203
+ * @destroy: (nullable): The function to call when @user_data is not needed anymore
204
+ *
205
+ * Sets move-to callback to the draw functions object.
206
+ *
207
+ * Since: 4.0.0
208
+ **/
209
+ HB_EXTERN void
210
+ hb_draw_funcs_set_move_to_func (hb_draw_funcs_t *dfuncs,
211
+ hb_draw_move_to_func_t func,
212
+ void *user_data, hb_destroy_func_t destroy);
213
+
214
+ /**
215
+ * hb_draw_funcs_set_line_to_func:
216
+ * @dfuncs: draw functions object
217
+ * @func: (closure user_data) (destroy destroy) (scope notified): line-to callback
218
+ * @user_data: Data to pass to @func
219
+ * @destroy: (nullable): The function to call when @user_data is not needed anymore
220
+ *
221
+ * Sets line-to callback to the draw functions object.
222
+ *
223
+ * Since: 4.0.0
224
+ **/
225
+ HB_EXTERN void
226
+ hb_draw_funcs_set_line_to_func (hb_draw_funcs_t *dfuncs,
227
+ hb_draw_line_to_func_t func,
228
+ void *user_data, hb_destroy_func_t destroy);
229
+
230
+ /**
231
+ * hb_draw_funcs_set_quadratic_to_func:
232
+ * @dfuncs: draw functions object
233
+ * @func: (closure user_data) (destroy destroy) (scope notified): quadratic-to callback
234
+ * @user_data: Data to pass to @func
235
+ * @destroy: (nullable): The function to call when @user_data is not needed anymore
236
+ *
237
+ * Sets quadratic-to callback to the draw functions object.
238
+ *
239
+ * Since: 4.0.0
240
+ **/
241
+ HB_EXTERN void
242
+ hb_draw_funcs_set_quadratic_to_func (hb_draw_funcs_t *dfuncs,
243
+ hb_draw_quadratic_to_func_t func,
244
+ void *user_data, hb_destroy_func_t destroy);
245
+
246
+ /**
247
+ * hb_draw_funcs_set_cubic_to_func:
248
+ * @dfuncs: draw functions
249
+ * @func: (closure user_data) (destroy destroy) (scope notified): cubic-to callback
250
+ * @user_data: Data to pass to @func
251
+ * @destroy: (nullable): The function to call when @user_data is not needed anymore
252
+ *
253
+ * Sets cubic-to callback to the draw functions object.
254
+ *
255
+ * Since: 4.0.0
256
+ **/
257
+ HB_EXTERN void
258
+ hb_draw_funcs_set_cubic_to_func (hb_draw_funcs_t *dfuncs,
259
+ hb_draw_cubic_to_func_t func,
260
+ void *user_data, hb_destroy_func_t destroy);
261
+
262
+ /**
263
+ * hb_draw_funcs_set_close_path_func:
264
+ * @dfuncs: draw functions object
265
+ * @func: (closure user_data) (destroy destroy) (scope notified): close-path callback
266
+ * @user_data: Data to pass to @func
267
+ * @destroy: (nullable): The function to call when @user_data is not needed anymore
268
+ *
269
+ * Sets close-path callback to the draw functions object.
270
+ *
271
+ * Since: 4.0.0
272
+ **/
273
+ HB_EXTERN void
274
+ hb_draw_funcs_set_close_path_func (hb_draw_funcs_t *dfuncs,
275
+ hb_draw_close_path_func_t func,
276
+ void *user_data, hb_destroy_func_t destroy);
277
+
278
+
279
+ HB_EXTERN hb_draw_funcs_t *
280
+ hb_draw_funcs_create (void);
281
+
282
+ HB_EXTERN hb_draw_funcs_t *
283
+ hb_draw_funcs_reference (hb_draw_funcs_t *dfuncs);
284
+
285
+ HB_EXTERN void
286
+ hb_draw_funcs_destroy (hb_draw_funcs_t *dfuncs);
287
+
288
+ HB_EXTERN void
289
+ hb_draw_funcs_make_immutable (hb_draw_funcs_t *dfuncs);
290
+
291
+ HB_EXTERN hb_bool_t
292
+ hb_draw_funcs_is_immutable (hb_draw_funcs_t *dfuncs);
293
+
294
+
295
+ HB_EXTERN void
296
+ hb_draw_move_to (hb_draw_funcs_t *dfuncs, void *draw_data,
297
+ hb_draw_state_t *st,
298
+ float to_x, float to_y);
299
+
300
+ HB_EXTERN void
301
+ hb_draw_line_to (hb_draw_funcs_t *dfuncs, void *draw_data,
302
+ hb_draw_state_t *st,
303
+ float to_x, float to_y);
304
+
305
+ HB_EXTERN void
306
+ hb_draw_quadratic_to (hb_draw_funcs_t *dfuncs, void *draw_data,
307
+ hb_draw_state_t *st,
308
+ float control_x, float control_y,
309
+ float to_x, float to_y);
310
+
311
+ HB_EXTERN void
312
+ hb_draw_cubic_to (hb_draw_funcs_t *dfuncs, void *draw_data,
313
+ hb_draw_state_t *st,
314
+ float control1_x, float control1_y,
315
+ float control2_x, float control2_y,
316
+ float to_x, float to_y);
317
+
318
+ HB_EXTERN void
319
+ hb_draw_close_path (hb_draw_funcs_t *dfuncs, void *draw_data,
320
+ hb_draw_state_t *st);
321
+
322
+
323
+ HB_END_DECLS
324
+
325
+ #endif /* HB_DRAW_H */
@@ -0,0 +1,181 @@
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_FACE_H
32
+ #define HB_FACE_H
33
+
34
+ #include "hb-common.h"
35
+ #include "hb-blob.h"
36
+ #include "hb-set.h"
37
+
38
+ HB_BEGIN_DECLS
39
+
40
+
41
+ HB_EXTERN unsigned int
42
+ hb_face_count (hb_blob_t *blob);
43
+
44
+
45
+ /*
46
+ * hb_face_t
47
+ */
48
+
49
+ /**
50
+ * hb_face_t:
51
+ *
52
+ * Data type for holding font faces.
53
+ *
54
+ **/
55
+ typedef struct hb_face_t hb_face_t;
56
+
57
+ HB_EXTERN hb_face_t *
58
+ hb_face_create (hb_blob_t *blob,
59
+ unsigned int index);
60
+
61
+ /**
62
+ * hb_reference_table_func_t:
63
+ * @face: an #hb_face_t to reference table for
64
+ * @tag: the tag of the table to reference
65
+ * @user_data: User data pointer passed by the caller
66
+ *
67
+ * Callback function for hb_face_create_for_tables().
68
+ *
69
+ * Return value: (transfer full): A pointer to the @tag table within @face
70
+ *
71
+ * Since: 0.9.2
72
+ */
73
+
74
+ typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
75
+
76
+ /* calls destroy() when not needing user_data anymore */
77
+ HB_EXTERN hb_face_t *
78
+ hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
79
+ void *user_data,
80
+ hb_destroy_func_t destroy);
81
+
82
+ HB_EXTERN hb_face_t *
83
+ hb_face_get_empty (void);
84
+
85
+ HB_EXTERN hb_face_t *
86
+ hb_face_reference (hb_face_t *face);
87
+
88
+ HB_EXTERN void
89
+ hb_face_destroy (hb_face_t *face);
90
+
91
+ HB_EXTERN hb_bool_t
92
+ hb_face_set_user_data (hb_face_t *face,
93
+ hb_user_data_key_t *key,
94
+ void * data,
95
+ hb_destroy_func_t destroy,
96
+ hb_bool_t replace);
97
+
98
+ HB_EXTERN void *
99
+ hb_face_get_user_data (const hb_face_t *face,
100
+ hb_user_data_key_t *key);
101
+
102
+ HB_EXTERN void
103
+ hb_face_make_immutable (hb_face_t *face);
104
+
105
+ HB_EXTERN hb_bool_t
106
+ hb_face_is_immutable (const hb_face_t *face);
107
+
108
+
109
+ HB_EXTERN hb_blob_t *
110
+ hb_face_reference_table (const hb_face_t *face,
111
+ hb_tag_t tag);
112
+
113
+ HB_EXTERN hb_blob_t *
114
+ hb_face_reference_blob (hb_face_t *face);
115
+
116
+ HB_EXTERN void
117
+ hb_face_set_index (hb_face_t *face,
118
+ unsigned int index);
119
+
120
+ HB_EXTERN unsigned int
121
+ hb_face_get_index (const hb_face_t *face);
122
+
123
+ HB_EXTERN void
124
+ hb_face_set_upem (hb_face_t *face,
125
+ unsigned int upem);
126
+
127
+ HB_EXTERN unsigned int
128
+ hb_face_get_upem (const hb_face_t *face);
129
+
130
+ HB_EXTERN void
131
+ hb_face_set_glyph_count (hb_face_t *face,
132
+ unsigned int glyph_count);
133
+
134
+ HB_EXTERN unsigned int
135
+ hb_face_get_glyph_count (const hb_face_t *face);
136
+
137
+ HB_EXTERN unsigned int
138
+ hb_face_get_table_tags (const hb_face_t *face,
139
+ unsigned int start_offset,
140
+ unsigned int *table_count, /* IN/OUT */
141
+ hb_tag_t *table_tags /* OUT */);
142
+
143
+
144
+ /*
145
+ * Character set.
146
+ */
147
+
148
+ HB_EXTERN void
149
+ hb_face_collect_unicodes (hb_face_t *face,
150
+ hb_set_t *out);
151
+
152
+ HB_EXTERN void
153
+ hb_face_collect_variation_selectors (hb_face_t *face,
154
+ hb_set_t *out);
155
+
156
+ HB_EXTERN void
157
+ hb_face_collect_variation_unicodes (hb_face_t *face,
158
+ hb_codepoint_t variation_selector,
159
+ hb_set_t *out);
160
+
161
+
162
+ /*
163
+ * Builder face.
164
+ */
165
+
166
+ HB_EXTERN hb_face_t *
167
+ hb_face_builder_create (void);
168
+
169
+ HB_EXTERN hb_bool_t
170
+ hb_face_builder_add_table (hb_face_t *face,
171
+ hb_tag_t tag,
172
+ hb_blob_t *blob);
173
+
174
+ HB_EXTERN void
175
+ hb_face_builder_sort_tables (hb_face_t *face,
176
+ const hb_tag_t *tags);
177
+
178
+
179
+ HB_END_DECLS
180
+
181
+ #endif /* HB_FACE_H */