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,329 @@
1
+ /****************************************************************************
2
+ *
3
+ * ftbitmap.h
4
+ *
5
+ * FreeType utility functions for bitmaps (specification).
6
+ *
7
+ * Copyright (C) 2004-2021 by
8
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
9
+ *
10
+ * This file is part of the FreeType project, and may only be used,
11
+ * modified, and distributed under the terms of the FreeType project
12
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
13
+ * this file you indicate that you have read the license and
14
+ * understand and accept it fully.
15
+ *
16
+ */
17
+
18
+
19
+ #ifndef FTBITMAP_H_
20
+ #define FTBITMAP_H_
21
+
22
+
23
+ #include <freetype/freetype.h>
24
+ #include <freetype/ftcolor.h>
25
+
26
+ #ifdef FREETYPE_H
27
+ #error "freetype.h of FreeType 1 has been loaded!"
28
+ #error "Please fix the directory search order for header files"
29
+ #error "so that freetype.h of FreeType 2 is found first."
30
+ #endif
31
+
32
+
33
+ FT_BEGIN_HEADER
34
+
35
+
36
+ /**************************************************************************
37
+ *
38
+ * @section:
39
+ * bitmap_handling
40
+ *
41
+ * @title:
42
+ * Bitmap Handling
43
+ *
44
+ * @abstract:
45
+ * Handling FT_Bitmap objects.
46
+ *
47
+ * @description:
48
+ * This section contains functions for handling @FT_Bitmap objects,
49
+ * automatically adjusting the target's bitmap buffer size as needed.
50
+ *
51
+ * Note that none of the functions changes the bitmap's 'flow' (as
52
+ * indicated by the sign of the `pitch` field in @FT_Bitmap).
53
+ *
54
+ * To set the flow, assign an appropriate positive or negative value to
55
+ * the `pitch` field of the target @FT_Bitmap object after calling
56
+ * @FT_Bitmap_Init but before calling any of the other functions
57
+ * described here.
58
+ */
59
+
60
+
61
+ /**************************************************************************
62
+ *
63
+ * @function:
64
+ * FT_Bitmap_Init
65
+ *
66
+ * @description:
67
+ * Initialize a pointer to an @FT_Bitmap structure.
68
+ *
69
+ * @inout:
70
+ * abitmap ::
71
+ * A pointer to the bitmap structure.
72
+ *
73
+ * @note:
74
+ * A deprecated name for the same function is `FT_Bitmap_New`.
75
+ */
76
+ FT_EXPORT( void )
77
+ FT_Bitmap_Init( FT_Bitmap *abitmap );
78
+
79
+
80
+ /* deprecated */
81
+ FT_EXPORT( void )
82
+ FT_Bitmap_New( FT_Bitmap *abitmap );
83
+
84
+
85
+ /**************************************************************************
86
+ *
87
+ * @function:
88
+ * FT_Bitmap_Copy
89
+ *
90
+ * @description:
91
+ * Copy a bitmap into another one.
92
+ *
93
+ * @input:
94
+ * library ::
95
+ * A handle to a library object.
96
+ *
97
+ * source ::
98
+ * A handle to the source bitmap.
99
+ *
100
+ * @output:
101
+ * target ::
102
+ * A handle to the target bitmap.
103
+ *
104
+ * @return:
105
+ * FreeType error code. 0~means success.
106
+ *
107
+ * @note:
108
+ * `source->buffer` and `target->buffer` must neither be equal nor
109
+ * overlap.
110
+ */
111
+ FT_EXPORT( FT_Error )
112
+ FT_Bitmap_Copy( FT_Library library,
113
+ const FT_Bitmap *source,
114
+ FT_Bitmap *target );
115
+
116
+
117
+ /**************************************************************************
118
+ *
119
+ * @function:
120
+ * FT_Bitmap_Embolden
121
+ *
122
+ * @description:
123
+ * Embolden a bitmap. The new bitmap will be about `xStrength` pixels
124
+ * wider and `yStrength` pixels higher. The left and bottom borders are
125
+ * kept unchanged.
126
+ *
127
+ * @input:
128
+ * library ::
129
+ * A handle to a library object.
130
+ *
131
+ * xStrength ::
132
+ * How strong the glyph is emboldened horizontally. Expressed in 26.6
133
+ * pixel format.
134
+ *
135
+ * yStrength ::
136
+ * How strong the glyph is emboldened vertically. Expressed in 26.6
137
+ * pixel format.
138
+ *
139
+ * @inout:
140
+ * bitmap ::
141
+ * A handle to the target bitmap.
142
+ *
143
+ * @return:
144
+ * FreeType error code. 0~means success.
145
+ *
146
+ * @note:
147
+ * The current implementation restricts `xStrength` to be less than or
148
+ * equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.
149
+ *
150
+ * If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, you
151
+ * should call @FT_GlyphSlot_Own_Bitmap on the slot first.
152
+ *
153
+ * Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format are
154
+ * converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp).
155
+ */
156
+ FT_EXPORT( FT_Error )
157
+ FT_Bitmap_Embolden( FT_Library library,
158
+ FT_Bitmap* bitmap,
159
+ FT_Pos xStrength,
160
+ FT_Pos yStrength );
161
+
162
+
163
+ /**************************************************************************
164
+ *
165
+ * @function:
166
+ * FT_Bitmap_Convert
167
+ *
168
+ * @description:
169
+ * Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to
170
+ * a bitmap object with depth 8bpp, making the number of used bytes per
171
+ * line (a.k.a. the 'pitch') a multiple of `alignment`.
172
+ *
173
+ * @input:
174
+ * library ::
175
+ * A handle to a library object.
176
+ *
177
+ * source ::
178
+ * The source bitmap.
179
+ *
180
+ * alignment ::
181
+ * The pitch of the bitmap is a multiple of this argument. Common
182
+ * values are 1, 2, or 4.
183
+ *
184
+ * @output:
185
+ * target ::
186
+ * The target bitmap.
187
+ *
188
+ * @return:
189
+ * FreeType error code. 0~means success.
190
+ *
191
+ * @note:
192
+ * It is possible to call @FT_Bitmap_Convert multiple times without
193
+ * calling @FT_Bitmap_Done (the memory is simply reallocated).
194
+ *
195
+ * Use @FT_Bitmap_Done to finally remove the bitmap object.
196
+ *
197
+ * The `library` argument is taken to have access to FreeType's memory
198
+ * handling functions.
199
+ *
200
+ * `source->buffer` and `target->buffer` must neither be equal nor
201
+ * overlap.
202
+ */
203
+ FT_EXPORT( FT_Error )
204
+ FT_Bitmap_Convert( FT_Library library,
205
+ const FT_Bitmap *source,
206
+ FT_Bitmap *target,
207
+ FT_Int alignment );
208
+
209
+
210
+ /**************************************************************************
211
+ *
212
+ * @function:
213
+ * FT_Bitmap_Blend
214
+ *
215
+ * @description:
216
+ * Blend a bitmap onto another bitmap, using a given color.
217
+ *
218
+ * @input:
219
+ * library ::
220
+ * A handle to a library object.
221
+ *
222
+ * source ::
223
+ * The source bitmap, which can have any @FT_Pixel_Mode format.
224
+ *
225
+ * source_offset ::
226
+ * The offset vector to the upper left corner of the source bitmap in
227
+ * 26.6 pixel format. It should represent an integer offset; the
228
+ * function will set the lowest six bits to zero to enforce that.
229
+ *
230
+ * color ::
231
+ * The color used to draw `source` onto `target`.
232
+ *
233
+ * @inout:
234
+ * target ::
235
+ * A handle to an `FT_Bitmap` object. It should be either initialized
236
+ * as empty with a call to @FT_Bitmap_Init, or it should be of type
237
+ * @FT_PIXEL_MODE_BGRA.
238
+ *
239
+ * atarget_offset ::
240
+ * The offset vector to the upper left corner of the target bitmap in
241
+ * 26.6 pixel format. It should represent an integer offset; the
242
+ * function will set the lowest six bits to zero to enforce that.
243
+ *
244
+ * @return:
245
+ * FreeType error code. 0~means success.
246
+ *
247
+ * @note:
248
+ * This function doesn't perform clipping.
249
+ *
250
+ * The bitmap in `target` gets allocated or reallocated as needed; the
251
+ * vector `atarget_offset` is updated accordingly.
252
+ *
253
+ * In case of allocation or reallocation, the bitmap's pitch is set to
254
+ * `4 * width`. Both `source` and `target` must have the same bitmap
255
+ * flow (as indicated by the sign of the `pitch` field).
256
+ *
257
+ * `source->buffer` and `target->buffer` must neither be equal nor
258
+ * overlap.
259
+ *
260
+ * @since:
261
+ * 2.10
262
+ */
263
+ FT_EXPORT( FT_Error )
264
+ FT_Bitmap_Blend( FT_Library library,
265
+ const FT_Bitmap* source,
266
+ const FT_Vector source_offset,
267
+ FT_Bitmap* target,
268
+ FT_Vector *atarget_offset,
269
+ FT_Color color );
270
+
271
+
272
+ /**************************************************************************
273
+ *
274
+ * @function:
275
+ * FT_GlyphSlot_Own_Bitmap
276
+ *
277
+ * @description:
278
+ * Make sure that a glyph slot owns `slot->bitmap`.
279
+ *
280
+ * @input:
281
+ * slot ::
282
+ * The glyph slot.
283
+ *
284
+ * @return:
285
+ * FreeType error code. 0~means success.
286
+ *
287
+ * @note:
288
+ * This function is to be used in combination with @FT_Bitmap_Embolden.
289
+ */
290
+ FT_EXPORT( FT_Error )
291
+ FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot );
292
+
293
+
294
+ /**************************************************************************
295
+ *
296
+ * @function:
297
+ * FT_Bitmap_Done
298
+ *
299
+ * @description:
300
+ * Destroy a bitmap object initialized with @FT_Bitmap_Init.
301
+ *
302
+ * @input:
303
+ * library ::
304
+ * A handle to a library object.
305
+ *
306
+ * bitmap ::
307
+ * The bitmap object to be freed.
308
+ *
309
+ * @return:
310
+ * FreeType error code. 0~means success.
311
+ *
312
+ * @note:
313
+ * The `library` argument is taken to have access to FreeType's memory
314
+ * handling functions.
315
+ */
316
+ FT_EXPORT( FT_Error )
317
+ FT_Bitmap_Done( FT_Library library,
318
+ FT_Bitmap *bitmap );
319
+
320
+
321
+ /* */
322
+
323
+
324
+ FT_END_HEADER
325
+
326
+ #endif /* FTBITMAP_H_ */
327
+
328
+
329
+ /* END */
@@ -0,0 +1,102 @@
1
+ /****************************************************************************
2
+ *
3
+ * ftbzip2.h
4
+ *
5
+ * Bzip2-compressed stream support.
6
+ *
7
+ * Copyright (C) 2010-2021 by
8
+ * Joel Klinghed.
9
+ *
10
+ * This file is part of the FreeType project, and may only be used,
11
+ * modified, and distributed under the terms of the FreeType project
12
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
13
+ * this file you indicate that you have read the license and
14
+ * understand and accept it fully.
15
+ *
16
+ */
17
+
18
+
19
+ #ifndef FTBZIP2_H_
20
+ #define FTBZIP2_H_
21
+
22
+ #include <freetype/freetype.h>
23
+
24
+ #ifdef FREETYPE_H
25
+ #error "freetype.h of FreeType 1 has been loaded!"
26
+ #error "Please fix the directory search order for header files"
27
+ #error "so that freetype.h of FreeType 2 is found first."
28
+ #endif
29
+
30
+
31
+ FT_BEGIN_HEADER
32
+
33
+ /**************************************************************************
34
+ *
35
+ * @section:
36
+ * bzip2
37
+ *
38
+ * @title:
39
+ * BZIP2 Streams
40
+ *
41
+ * @abstract:
42
+ * Using bzip2-compressed font files.
43
+ *
44
+ * @description:
45
+ * In certain builds of the library, bzip2 compression recognition is
46
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
47
+ * This means that if no font driver is capable of handling the raw
48
+ * compressed file, the library will try to open a bzip2 compressed
49
+ * stream from it and re-open the face with it.
50
+ *
51
+ * The stream implementation is very basic and resets the decompression
52
+ * process each time seeking backwards is needed within the stream,
53
+ * which significantly undermines the performance.
54
+ *
55
+ * This section contains the declaration of Bzip2-specific functions.
56
+ *
57
+ */
58
+
59
+
60
+ /**************************************************************************
61
+ *
62
+ * @function:
63
+ * FT_Stream_OpenBzip2
64
+ *
65
+ * @description:
66
+ * Open a new stream to parse bzip2-compressed font files. This is
67
+ * mainly used to support the compressed `*.pcf.bz2` fonts that come with
68
+ * XFree86.
69
+ *
70
+ * @input:
71
+ * stream ::
72
+ * The target embedding stream.
73
+ *
74
+ * source ::
75
+ * The source stream.
76
+ *
77
+ * @return:
78
+ * FreeType error code. 0~means success.
79
+ *
80
+ * @note:
81
+ * The source stream must be opened _before_ calling this function.
82
+ *
83
+ * Calling the internal function `FT_Stream_Close` on the new stream will
84
+ * **not** call `FT_Stream_Close` on the source stream. None of the
85
+ * stream objects will be released to the heap.
86
+ *
87
+ * This function may return `FT_Err_Unimplemented_Feature` if your build
88
+ * of FreeType was not compiled with bzip2 support.
89
+ */
90
+ FT_EXPORT( FT_Error )
91
+ FT_Stream_OpenBzip2( FT_Stream stream,
92
+ FT_Stream source );
93
+
94
+ /* */
95
+
96
+
97
+ FT_END_HEADER
98
+
99
+ #endif /* FTBZIP2_H_ */
100
+
101
+
102
+ /* END */