jassub 1.7.12 → 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 (175) hide show
  1. package/dist/jassub-worker-modern.wasm +0 -0
  2. package/dist/jassub-worker.js +11 -11
  3. package/dist/jassub-worker.wasm +0 -0
  4. package/dist/jassub-worker.wasm.js +1 -1
  5. package/package.json +4 -2
  6. package/dist/js/jassub-worker-modern.js +0 -10
  7. package/dist/js/jassub-worker-modern.wasm +0 -0
  8. package/dist/js/jassub-worker.js +0 -10
  9. package/dist/js/jassub-worker.wasm +0 -0
  10. package/dist/js/jassub-worker.wasm.js +0 -84
  11. package/dist/js/jassub.js +0 -832
  12. package/dist/libraries/bin/brotli.js +0 -1
  13. package/dist/libraries/include/ass/ass.h +0 -812
  14. package/dist/libraries/include/ass/ass_types.h +0 -292
  15. package/dist/libraries/include/brotli/decode.h +0 -344
  16. package/dist/libraries/include/brotli/encode.h +0 -448
  17. package/dist/libraries/include/brotli/port.h +0 -288
  18. package/dist/libraries/include/brotli/types.h +0 -83
  19. package/dist/libraries/include/expat.h +0 -1064
  20. package/dist/libraries/include/expat_config.h +0 -115
  21. package/dist/libraries/include/expat_external.h +0 -165
  22. package/dist/libraries/include/fontconfig/fcfreetype.h +0 -59
  23. package/dist/libraries/include/fontconfig/fcprivate.h +0 -134
  24. package/dist/libraries/include/fontconfig/fontconfig.h +0 -1154
  25. package/dist/libraries/include/freetype2/freetype/config/ftconfig.h +0 -63
  26. package/dist/libraries/include/freetype2/freetype/config/ftheader.h +0 -824
  27. package/dist/libraries/include/freetype2/freetype/config/ftmodule.h +0 -20
  28. package/dist/libraries/include/freetype2/freetype/config/ftoption.h +0 -1011
  29. package/dist/libraries/include/freetype2/freetype/config/ftstdlib.h +0 -175
  30. package/dist/libraries/include/freetype2/freetype/config/integer-types.h +0 -245
  31. package/dist/libraries/include/freetype2/freetype/config/mac-support.h +0 -49
  32. package/dist/libraries/include/freetype2/freetype/config/public-macros.h +0 -120
  33. package/dist/libraries/include/freetype2/freetype/freetype.h +0 -4833
  34. package/dist/libraries/include/freetype2/freetype/ftadvanc.h +0 -188
  35. package/dist/libraries/include/freetype2/freetype/ftbbox.h +0 -101
  36. package/dist/libraries/include/freetype2/freetype/ftbdf.h +0 -212
  37. package/dist/libraries/include/freetype2/freetype/ftbitmap.h +0 -329
  38. package/dist/libraries/include/freetype2/freetype/ftbzip2.h +0 -102
  39. package/dist/libraries/include/freetype2/freetype/ftcache.h +0 -1087
  40. package/dist/libraries/include/freetype2/freetype/ftchapters.h +0 -147
  41. package/dist/libraries/include/freetype2/freetype/ftcid.h +0 -167
  42. package/dist/libraries/include/freetype2/freetype/ftcolor.h +0 -1609
  43. package/dist/libraries/include/freetype2/freetype/ftdriver.h +0 -1193
  44. package/dist/libraries/include/freetype2/freetype/fterrdef.h +0 -279
  45. package/dist/libraries/include/freetype2/freetype/fterrors.h +0 -296
  46. package/dist/libraries/include/freetype2/freetype/ftfntfmt.h +0 -93
  47. package/dist/libraries/include/freetype2/freetype/ftgasp.h +0 -143
  48. package/dist/libraries/include/freetype2/freetype/ftglyph.h +0 -664
  49. package/dist/libraries/include/freetype2/freetype/ftgxval.h +0 -354
  50. package/dist/libraries/include/freetype2/freetype/ftgzip.h +0 -151
  51. package/dist/libraries/include/freetype2/freetype/ftimage.h +0 -1276
  52. package/dist/libraries/include/freetype2/freetype/ftincrem.h +0 -348
  53. package/dist/libraries/include/freetype2/freetype/ftlcdfil.h +0 -323
  54. package/dist/libraries/include/freetype2/freetype/ftlist.h +0 -296
  55. package/dist/libraries/include/freetype2/freetype/ftlogging.h +0 -184
  56. package/dist/libraries/include/freetype2/freetype/ftlzw.h +0 -100
  57. package/dist/libraries/include/freetype2/freetype/ftmac.h +0 -289
  58. package/dist/libraries/include/freetype2/freetype/ftmm.h +0 -752
  59. package/dist/libraries/include/freetype2/freetype/ftmodapi.h +0 -806
  60. package/dist/libraries/include/freetype2/freetype/ftmoderr.h +0 -204
  61. package/dist/libraries/include/freetype2/freetype/ftotval.h +0 -206
  62. package/dist/libraries/include/freetype2/freetype/ftoutln.h +0 -586
  63. package/dist/libraries/include/freetype2/freetype/ftparams.h +0 -203
  64. package/dist/libraries/include/freetype2/freetype/ftpfr.h +0 -179
  65. package/dist/libraries/include/freetype2/freetype/ftrender.h +0 -244
  66. package/dist/libraries/include/freetype2/freetype/ftsizes.h +0 -159
  67. package/dist/libraries/include/freetype2/freetype/ftsnames.h +0 -272
  68. package/dist/libraries/include/freetype2/freetype/ftstroke.h +0 -773
  69. package/dist/libraries/include/freetype2/freetype/ftsynth.h +0 -83
  70. package/dist/libraries/include/freetype2/freetype/ftsystem.h +0 -352
  71. package/dist/libraries/include/freetype2/freetype/fttrigon.h +0 -350
  72. package/dist/libraries/include/freetype2/freetype/fttypes.h +0 -615
  73. package/dist/libraries/include/freetype2/freetype/ftwinfnt.h +0 -276
  74. package/dist/libraries/include/freetype2/freetype/t1tables.h +0 -773
  75. package/dist/libraries/include/freetype2/freetype/ttnameid.h +0 -1235
  76. package/dist/libraries/include/freetype2/freetype/tttables.h +0 -855
  77. package/dist/libraries/include/freetype2/freetype/tttags.h +0 -123
  78. package/dist/libraries/include/freetype2/ft2build.h +0 -42
  79. package/dist/libraries/include/fribidi/fribidi-arabic.h +0 -81
  80. package/dist/libraries/include/fribidi/fribidi-begindecls.h +0 -3
  81. package/dist/libraries/include/fribidi/fribidi-bidi-types-list.h +0 -96
  82. package/dist/libraries/include/fribidi/fribidi-bidi-types.h +0 -405
  83. package/dist/libraries/include/fribidi/fribidi-bidi.h +0 -142
  84. package/dist/libraries/include/fribidi/fribidi-brackets.h +0 -89
  85. package/dist/libraries/include/fribidi/fribidi-char-sets-list.h +0 -54
  86. package/dist/libraries/include/fribidi/fribidi-char-sets.h +0 -106
  87. package/dist/libraries/include/fribidi/fribidi-common.h +0 -158
  88. package/dist/libraries/include/fribidi/fribidi-config.h +0 -23
  89. package/dist/libraries/include/fribidi/fribidi-deprecated.h +0 -175
  90. package/dist/libraries/include/fribidi/fribidi-enddecls.h +0 -3
  91. package/dist/libraries/include/fribidi/fribidi-flags.h +0 -72
  92. package/dist/libraries/include/fribidi/fribidi-joining-types-list.h +0 -44
  93. package/dist/libraries/include/fribidi/fribidi-joining-types.h +0 -249
  94. package/dist/libraries/include/fribidi/fribidi-joining.h +0 -74
  95. package/dist/libraries/include/fribidi/fribidi-mirroring.h +0 -86
  96. package/dist/libraries/include/fribidi/fribidi-shape.h +0 -71
  97. package/dist/libraries/include/fribidi/fribidi-types.h +0 -79
  98. package/dist/libraries/include/fribidi/fribidi-unicode-version.h +0 -10
  99. package/dist/libraries/include/fribidi/fribidi-unicode.h +0 -105
  100. package/dist/libraries/include/fribidi/fribidi.h +0 -129
  101. package/dist/libraries/include/harfbuzz/hb-aat-layout.h +0 -795
  102. package/dist/libraries/include/harfbuzz/hb-aat.h +0 -38
  103. package/dist/libraries/include/harfbuzz/hb-blob.h +0 -160
  104. package/dist/libraries/include/harfbuzz/hb-buffer.h +0 -799
  105. package/dist/libraries/include/harfbuzz/hb-common.h +0 -902
  106. package/dist/libraries/include/harfbuzz/hb-cplusplus.hh +0 -221
  107. package/dist/libraries/include/harfbuzz/hb-deprecated.h +0 -251
  108. package/dist/libraries/include/harfbuzz/hb-draw.h +0 -325
  109. package/dist/libraries/include/harfbuzz/hb-face.h +0 -181
  110. package/dist/libraries/include/harfbuzz/hb-font.h +0 -1108
  111. package/dist/libraries/include/harfbuzz/hb-ft.h +0 -145
  112. package/dist/libraries/include/harfbuzz/hb-map.h +0 -124
  113. package/dist/libraries/include/harfbuzz/hb-ot-color.h +0 -146
  114. package/dist/libraries/include/harfbuzz/hb-ot-deprecated.h +0 -141
  115. package/dist/libraries/include/harfbuzz/hb-ot-font.h +0 -45
  116. package/dist/libraries/include/harfbuzz/hb-ot-layout.h +0 -503
  117. package/dist/libraries/include/harfbuzz/hb-ot-math.h +0 -333
  118. package/dist/libraries/include/harfbuzz/hb-ot-meta.h +0 -72
  119. package/dist/libraries/include/harfbuzz/hb-ot-metrics.h +0 -129
  120. package/dist/libraries/include/harfbuzz/hb-ot-name.h +0 -158
  121. package/dist/libraries/include/harfbuzz/hb-ot-shape.h +0 -53
  122. package/dist/libraries/include/harfbuzz/hb-ot-var.h +0 -191
  123. package/dist/libraries/include/harfbuzz/hb-ot.h +0 -49
  124. package/dist/libraries/include/harfbuzz/hb-set.h +0 -200
  125. package/dist/libraries/include/harfbuzz/hb-shape-plan.h +0 -122
  126. package/dist/libraries/include/harfbuzz/hb-shape.h +0 -62
  127. package/dist/libraries/include/harfbuzz/hb-style.h +0 -81
  128. package/dist/libraries/include/harfbuzz/hb-subset-repacker.h +0 -81
  129. package/dist/libraries/include/harfbuzz/hb-subset.h +0 -234
  130. package/dist/libraries/include/harfbuzz/hb-unicode.h +0 -643
  131. package/dist/libraries/include/harfbuzz/hb-version.h +0 -95
  132. package/dist/libraries/include/harfbuzz/hb.h +0 -50
  133. package/dist/libraries/lib/cmake/expat-2.4.7/expat-config-version.cmake +0 -70
  134. package/dist/libraries/lib/cmake/expat-2.4.7/expat-config.cmake +0 -99
  135. package/dist/libraries/lib/cmake/expat-2.4.7/expat-noconfig.cmake +0 -19
  136. package/dist/libraries/lib/cmake/expat-2.4.7/expat.cmake +0 -99
  137. package/dist/libraries/lib/libass.a +0 -0
  138. package/dist/libraries/lib/libass.la +0 -41
  139. package/dist/libraries/lib/libbrotlicommon.a +0 -0
  140. package/dist/libraries/lib/libbrotlidec.a +0 -0
  141. package/dist/libraries/lib/libbrotlienc.a +0 -0
  142. package/dist/libraries/lib/libexpat.a +0 -0
  143. package/dist/libraries/lib/libfontconfig.a +0 -0
  144. package/dist/libraries/lib/libfontconfig.la +0 -41
  145. package/dist/libraries/lib/libfreetype.a +0 -0
  146. package/dist/libraries/lib/libfreetype.la +0 -41
  147. package/dist/libraries/lib/libfribidi.a +0 -0
  148. package/dist/libraries/lib/libfribidi.la +0 -41
  149. package/dist/libraries/lib/libharfbuzz-subset.a +0 -0
  150. package/dist/libraries/lib/libharfbuzz-subset.la +0 -41
  151. package/dist/libraries/lib/libharfbuzz.a +0 -0
  152. package/dist/libraries/lib/libharfbuzz.la +0 -41
  153. package/dist/libraries/lib/pkgconfig/expat.pc +0 -11
  154. package/dist/libraries/lib/pkgconfig/fontconfig.pc +0 -18
  155. package/dist/libraries/lib/pkgconfig/freetype2.pc +0 -14
  156. package/dist/libraries/lib/pkgconfig/fribidi.pc +0 -13
  157. package/dist/libraries/lib/pkgconfig/harfbuzz-subset.pc +0 -12
  158. package/dist/libraries/lib/pkgconfig/harfbuzz.pc +0 -13
  159. package/dist/libraries/lib/pkgconfig/libass.pc +0 -13
  160. package/dist/libraries/lib/pkgconfig/libbrotlicommon.pc +0 -11
  161. package/dist/libraries/lib/pkgconfig/libbrotlidec.pc +0 -12
  162. package/dist/libraries/lib/pkgconfig/libbrotlienc.pc +0 -12
  163. package/dist/libraries/share/aclocal/freetype2.m4 +0 -194
  164. package/dist/libraries/share/doc/expat/AUTHORS +0 -10
  165. package/dist/libraries/share/doc/expat/changelog +0 -1161
  166. package/dist/license/all +0 -951
  167. package/dist/license/all.tmp +0 -307
  168. package/dist/license/brotli +0 -12
  169. package/dist/license/expat +0 -71
  170. package/dist/license/fontconfig +0 -46
  171. package/dist/license/freetype +0 -92
  172. package/dist/license/fribidi +0 -15
  173. package/dist/license/harfbuzz +0 -32
  174. package/dist/license/jassub +0 -0
  175. package/dist/license/libass +0 -28
@@ -1,1087 +0,0 @@
1
- /****************************************************************************
2
- *
3
- * ftcache.h
4
- *
5
- * FreeType Cache subsystem (specification).
6
- *
7
- * Copyright (C) 1996-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 FTCACHE_H_
20
- #define FTCACHE_H_
21
-
22
-
23
- #include <freetype/ftglyph.h>
24
-
25
-
26
- FT_BEGIN_HEADER
27
-
28
-
29
- /**************************************************************************
30
- *
31
- * @section:
32
- * cache_subsystem
33
- *
34
- * @title:
35
- * Cache Sub-System
36
- *
37
- * @abstract:
38
- * How to cache face, size, and glyph data with FreeType~2.
39
- *
40
- * @description:
41
- * This section describes the FreeType~2 cache sub-system, which is used
42
- * to limit the number of concurrently opened @FT_Face and @FT_Size
43
- * objects, as well as caching information like character maps and glyph
44
- * images while limiting their maximum memory usage.
45
- *
46
- * Note that all types and functions begin with the `FTC_` prefix.
47
- *
48
- * The cache is highly portable and thus doesn't know anything about the
49
- * fonts installed on your system, or how to access them. This implies
50
- * the following scheme:
51
- *
52
- * First, available or installed font faces are uniquely identified by
53
- * @FTC_FaceID values, provided to the cache by the client. Note that
54
- * the cache only stores and compares these values, and doesn't try to
55
- * interpret them in any way.
56
- *
57
- * Second, the cache calls, only when needed, a client-provided function
58
- * to convert an @FTC_FaceID into a new @FT_Face object. The latter is
59
- * then completely managed by the cache, including its termination
60
- * through @FT_Done_Face. To monitor termination of face objects, the
61
- * finalizer callback in the `generic` field of the @FT_Face object can
62
- * be used, which might also be used to store the @FTC_FaceID of the
63
- * face.
64
- *
65
- * Clients are free to map face IDs to anything else. The most simple
66
- * usage is to associate them to a (pathname,face_index) pair that is
67
- * used to call @FT_New_Face. However, more complex schemes are also
68
- * possible.
69
- *
70
- * Note that for the cache to work correctly, the face ID values must be
71
- * **persistent**, which means that the contents they point to should not
72
- * change at runtime, or that their value should not become invalid.
73
- *
74
- * If this is unavoidable (e.g., when a font is uninstalled at runtime),
75
- * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let
76
- * the cache get rid of any references to the old @FTC_FaceID it may keep
77
- * internally. Failure to do so will lead to incorrect behaviour or even
78
- * crashes.
79
- *
80
- * To use the cache, start with calling @FTC_Manager_New to create a new
81
- * @FTC_Manager object, which models a single cache instance. You can
82
- * then look up @FT_Face and @FT_Size objects with
83
- * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively.
84
- *
85
- * If you want to use the charmap caching, call @FTC_CMapCache_New, then
86
- * later use @FTC_CMapCache_Lookup to perform the equivalent of
87
- * @FT_Get_Char_Index, only much faster.
88
- *
89
- * If you want to use the @FT_Glyph caching, call @FTC_ImageCache_New,
90
- * then later use @FTC_ImageCache_Lookup to retrieve the corresponding
91
- * @FT_Glyph objects from the cache.
92
- *
93
- * If you need lots of small bitmaps, it is much more memory efficient to
94
- * call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This
95
- * returns @FTC_SBitRec structures, which are used to store small bitmaps
96
- * directly. (A small bitmap is one whose metrics and dimensions all fit
97
- * into 8-bit integers).
98
- *
99
- * We hope to also provide a kerning cache in the near future.
100
- *
101
- *
102
- * @order:
103
- * FTC_Manager
104
- * FTC_FaceID
105
- * FTC_Face_Requester
106
- *
107
- * FTC_Manager_New
108
- * FTC_Manager_Reset
109
- * FTC_Manager_Done
110
- * FTC_Manager_LookupFace
111
- * FTC_Manager_LookupSize
112
- * FTC_Manager_RemoveFaceID
113
- *
114
- * FTC_Node
115
- * FTC_Node_Unref
116
- *
117
- * FTC_ImageCache
118
- * FTC_ImageCache_New
119
- * FTC_ImageCache_Lookup
120
- *
121
- * FTC_SBit
122
- * FTC_SBitCache
123
- * FTC_SBitCache_New
124
- * FTC_SBitCache_Lookup
125
- *
126
- * FTC_CMapCache
127
- * FTC_CMapCache_New
128
- * FTC_CMapCache_Lookup
129
- *
130
- *************************************************************************/
131
-
132
-
133
- /*************************************************************************/
134
- /*************************************************************************/
135
- /*************************************************************************/
136
- /***** *****/
137
- /***** BASIC TYPE DEFINITIONS *****/
138
- /***** *****/
139
- /*************************************************************************/
140
- /*************************************************************************/
141
- /*************************************************************************/
142
-
143
-
144
- /**************************************************************************
145
- *
146
- * @type:
147
- * FTC_FaceID
148
- *
149
- * @description:
150
- * An opaque pointer type that is used to identity face objects. The
151
- * contents of such objects is application-dependent.
152
- *
153
- * These pointers are typically used to point to a user-defined structure
154
- * containing a font file path, and face index.
155
- *
156
- * @note:
157
- * Never use `NULL` as a valid @FTC_FaceID.
158
- *
159
- * Face IDs are passed by the client to the cache manager that calls,
160
- * when needed, the @FTC_Face_Requester to translate them into new
161
- * @FT_Face objects.
162
- *
163
- * If the content of a given face ID changes at runtime, or if the value
164
- * becomes invalid (e.g., when uninstalling a font), you should
165
- * immediately call @FTC_Manager_RemoveFaceID before any other cache
166
- * function.
167
- *
168
- * Failure to do so will result in incorrect behaviour or even memory
169
- * leaks and crashes.
170
- */
171
- typedef FT_Pointer FTC_FaceID;
172
-
173
-
174
- /**************************************************************************
175
- *
176
- * @functype:
177
- * FTC_Face_Requester
178
- *
179
- * @description:
180
- * A callback function provided by client applications. It is used by
181
- * the cache manager to translate a given @FTC_FaceID into a new valid
182
- * @FT_Face object, on demand.
183
- *
184
- * @input:
185
- * face_id ::
186
- * The face ID to resolve.
187
- *
188
- * library ::
189
- * A handle to a FreeType library object.
190
- *
191
- * req_data ::
192
- * Application-provided request data (see note below).
193
- *
194
- * @output:
195
- * aface ::
196
- * A new @FT_Face handle.
197
- *
198
- * @return:
199
- * FreeType error code. 0~means success.
200
- *
201
- * @note:
202
- * The third parameter `req_data` is the same as the one passed by the
203
- * client when @FTC_Manager_New is called.
204
- *
205
- * The face requester should not perform funny things on the returned
206
- * face object, like creating a new @FT_Size for it, or setting a
207
- * transformation through @FT_Set_Transform!
208
- */
209
- typedef FT_Error
210
- (*FTC_Face_Requester)( FTC_FaceID face_id,
211
- FT_Library library,
212
- FT_Pointer req_data,
213
- FT_Face* aface );
214
-
215
- /* */
216
-
217
-
218
- /*************************************************************************/
219
- /*************************************************************************/
220
- /*************************************************************************/
221
- /***** *****/
222
- /***** CACHE MANAGER OBJECT *****/
223
- /***** *****/
224
- /*************************************************************************/
225
- /*************************************************************************/
226
- /*************************************************************************/
227
-
228
-
229
- /**************************************************************************
230
- *
231
- * @type:
232
- * FTC_Manager
233
- *
234
- * @description:
235
- * This object corresponds to one instance of the cache-subsystem. It is
236
- * used to cache one or more @FT_Face objects, along with corresponding
237
- * @FT_Size objects.
238
- *
239
- * The manager intentionally limits the total number of opened @FT_Face
240
- * and @FT_Size objects to control memory usage. See the `max_faces` and
241
- * `max_sizes` parameters of @FTC_Manager_New.
242
- *
243
- * The manager is also used to cache 'nodes' of various types while
244
- * limiting their total memory usage.
245
- *
246
- * All limitations are enforced by keeping lists of managed objects in
247
- * most-recently-used order, and flushing old nodes to make room for new
248
- * ones.
249
- */
250
- typedef struct FTC_ManagerRec_* FTC_Manager;
251
-
252
-
253
- /**************************************************************************
254
- *
255
- * @type:
256
- * FTC_Node
257
- *
258
- * @description:
259
- * An opaque handle to a cache node object. Each cache node is
260
- * reference-counted. A node with a count of~0 might be flushed out of a
261
- * full cache whenever a lookup request is performed.
262
- *
263
- * If you look up nodes, you have the ability to 'acquire' them, i.e., to
264
- * increment their reference count. This will prevent the node from
265
- * being flushed out of the cache until you explicitly 'release' it (see
266
- * @FTC_Node_Unref).
267
- *
268
- * See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.
269
- */
270
- typedef struct FTC_NodeRec_* FTC_Node;
271
-
272
-
273
- /**************************************************************************
274
- *
275
- * @function:
276
- * FTC_Manager_New
277
- *
278
- * @description:
279
- * Create a new cache manager.
280
- *
281
- * @input:
282
- * library ::
283
- * The parent FreeType library handle to use.
284
- *
285
- * max_faces ::
286
- * Maximum number of opened @FT_Face objects managed by this cache
287
- * instance. Use~0 for defaults.
288
- *
289
- * max_sizes ::
290
- * Maximum number of opened @FT_Size objects managed by this cache
291
- * instance. Use~0 for defaults.
292
- *
293
- * max_bytes ::
294
- * Maximum number of bytes to use for cached data nodes. Use~0 for
295
- * defaults. Note that this value does not account for managed
296
- * @FT_Face and @FT_Size objects.
297
- *
298
- * requester ::
299
- * An application-provided callback used to translate face IDs into
300
- * real @FT_Face objects.
301
- *
302
- * req_data ::
303
- * A generic pointer that is passed to the requester each time it is
304
- * called (see @FTC_Face_Requester).
305
- *
306
- * @output:
307
- * amanager ::
308
- * A handle to a new manager object. 0~in case of failure.
309
- *
310
- * @return:
311
- * FreeType error code. 0~means success.
312
- */
313
- FT_EXPORT( FT_Error )
314
- FTC_Manager_New( FT_Library library,
315
- FT_UInt max_faces,
316
- FT_UInt max_sizes,
317
- FT_ULong max_bytes,
318
- FTC_Face_Requester requester,
319
- FT_Pointer req_data,
320
- FTC_Manager *amanager );
321
-
322
-
323
- /**************************************************************************
324
- *
325
- * @function:
326
- * FTC_Manager_Reset
327
- *
328
- * @description:
329
- * Empty a given cache manager. This simply gets rid of all the
330
- * currently cached @FT_Face and @FT_Size objects within the manager.
331
- *
332
- * @inout:
333
- * manager ::
334
- * A handle to the manager.
335
- */
336
- FT_EXPORT( void )
337
- FTC_Manager_Reset( FTC_Manager manager );
338
-
339
-
340
- /**************************************************************************
341
- *
342
- * @function:
343
- * FTC_Manager_Done
344
- *
345
- * @description:
346
- * Destroy a given manager after emptying it.
347
- *
348
- * @input:
349
- * manager ::
350
- * A handle to the target cache manager object.
351
- */
352
- FT_EXPORT( void )
353
- FTC_Manager_Done( FTC_Manager manager );
354
-
355
-
356
- /**************************************************************************
357
- *
358
- * @function:
359
- * FTC_Manager_LookupFace
360
- *
361
- * @description:
362
- * Retrieve the @FT_Face object that corresponds to a given face ID
363
- * through a cache manager.
364
- *
365
- * @input:
366
- * manager ::
367
- * A handle to the cache manager.
368
- *
369
- * face_id ::
370
- * The ID of the face object.
371
- *
372
- * @output:
373
- * aface ::
374
- * A handle to the face object.
375
- *
376
- * @return:
377
- * FreeType error code. 0~means success.
378
- *
379
- * @note:
380
- * The returned @FT_Face object is always owned by the manager. You
381
- * should never try to discard it yourself.
382
- *
383
- * The @FT_Face object doesn't necessarily have a current size object
384
- * (i.e., face->size can be~0). If you need a specific 'font size', use
385
- * @FTC_Manager_LookupSize instead.
386
- *
387
- * Never change the face's transformation matrix (i.e., never call the
388
- * @FT_Set_Transform function) on a returned face! If you need to
389
- * transform glyphs, do it yourself after glyph loading.
390
- *
391
- * When you perform a lookup, out-of-memory errors are detected _within_
392
- * the lookup and force incremental flushes of the cache until enough
393
- * memory is released for the lookup to succeed.
394
- *
395
- * If a lookup fails with `FT_Err_Out_Of_Memory` the cache has already
396
- * been completely flushed, and still no memory was available for the
397
- * operation.
398
- */
399
- FT_EXPORT( FT_Error )
400
- FTC_Manager_LookupFace( FTC_Manager manager,
401
- FTC_FaceID face_id,
402
- FT_Face *aface );
403
-
404
-
405
- /**************************************************************************
406
- *
407
- * @struct:
408
- * FTC_ScalerRec
409
- *
410
- * @description:
411
- * A structure used to describe a given character size in either pixels
412
- * or points to the cache manager. See @FTC_Manager_LookupSize.
413
- *
414
- * @fields:
415
- * face_id ::
416
- * The source face ID.
417
- *
418
- * width ::
419
- * The character width.
420
- *
421
- * height ::
422
- * The character height.
423
- *
424
- * pixel ::
425
- * A Boolean. If 1, the `width` and `height` fields are interpreted as
426
- * integer pixel character sizes. Otherwise, they are expressed as
427
- * 1/64th of points.
428
- *
429
- * x_res ::
430
- * Only used when `pixel` is value~0 to indicate the horizontal
431
- * resolution in dpi.
432
- *
433
- * y_res ::
434
- * Only used when `pixel` is value~0 to indicate the vertical
435
- * resolution in dpi.
436
- *
437
- * @note:
438
- * This type is mainly used to retrieve @FT_Size objects through the
439
- * cache manager.
440
- */
441
- typedef struct FTC_ScalerRec_
442
- {
443
- FTC_FaceID face_id;
444
- FT_UInt width;
445
- FT_UInt height;
446
- FT_Int pixel;
447
- FT_UInt x_res;
448
- FT_UInt y_res;
449
-
450
- } FTC_ScalerRec;
451
-
452
-
453
- /**************************************************************************
454
- *
455
- * @struct:
456
- * FTC_Scaler
457
- *
458
- * @description:
459
- * A handle to an @FTC_ScalerRec structure.
460
- */
461
- typedef struct FTC_ScalerRec_* FTC_Scaler;
462
-
463
-
464
- /**************************************************************************
465
- *
466
- * @function:
467
- * FTC_Manager_LookupSize
468
- *
469
- * @description:
470
- * Retrieve the @FT_Size object that corresponds to a given
471
- * @FTC_ScalerRec pointer through a cache manager.
472
- *
473
- * @input:
474
- * manager ::
475
- * A handle to the cache manager.
476
- *
477
- * scaler ::
478
- * A scaler handle.
479
- *
480
- * @output:
481
- * asize ::
482
- * A handle to the size object.
483
- *
484
- * @return:
485
- * FreeType error code. 0~means success.
486
- *
487
- * @note:
488
- * The returned @FT_Size object is always owned by the manager. You
489
- * should never try to discard it by yourself.
490
- *
491
- * You can access the parent @FT_Face object simply as `size->face` if
492
- * you need it. Note that this object is also owned by the manager.
493
- *
494
- * @note:
495
- * When you perform a lookup, out-of-memory errors are detected _within_
496
- * the lookup and force incremental flushes of the cache until enough
497
- * memory is released for the lookup to succeed.
498
- *
499
- * If a lookup fails with `FT_Err_Out_Of_Memory` the cache has already
500
- * been completely flushed, and still no memory is available for the
501
- * operation.
502
- */
503
- FT_EXPORT( FT_Error )
504
- FTC_Manager_LookupSize( FTC_Manager manager,
505
- FTC_Scaler scaler,
506
- FT_Size *asize );
507
-
508
-
509
- /**************************************************************************
510
- *
511
- * @function:
512
- * FTC_Node_Unref
513
- *
514
- * @description:
515
- * Decrement a cache node's internal reference count. When the count
516
- * reaches 0, it is not destroyed but becomes eligible for subsequent
517
- * cache flushes.
518
- *
519
- * @input:
520
- * node ::
521
- * The cache node handle.
522
- *
523
- * manager ::
524
- * The cache manager handle.
525
- */
526
- FT_EXPORT( void )
527
- FTC_Node_Unref( FTC_Node node,
528
- FTC_Manager manager );
529
-
530
-
531
- /**************************************************************************
532
- *
533
- * @function:
534
- * FTC_Manager_RemoveFaceID
535
- *
536
- * @description:
537
- * A special function used to indicate to the cache manager that a given
538
- * @FTC_FaceID is no longer valid, either because its content changed, or
539
- * because it was deallocated or uninstalled.
540
- *
541
- * @input:
542
- * manager ::
543
- * The cache manager handle.
544
- *
545
- * face_id ::
546
- * The @FTC_FaceID to be removed.
547
- *
548
- * @note:
549
- * This function flushes all nodes from the cache corresponding to this
550
- * `face_id`, with the exception of nodes with a non-null reference
551
- * count.
552
- *
553
- * Such nodes are however modified internally so as to never appear in
554
- * later lookups with the same `face_id` value, and to be immediately
555
- * destroyed when released by all their users.
556
- *
557
- */
558
- FT_EXPORT( void )
559
- FTC_Manager_RemoveFaceID( FTC_Manager manager,
560
- FTC_FaceID face_id );
561
-
562
-
563
- /**************************************************************************
564
- *
565
- * @type:
566
- * FTC_CMapCache
567
- *
568
- * @description:
569
- * An opaque handle used to model a charmap cache. This cache is to hold
570
- * character codes -> glyph indices mappings.
571
- *
572
- */
573
- typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
574
-
575
-
576
- /**************************************************************************
577
- *
578
- * @function:
579
- * FTC_CMapCache_New
580
- *
581
- * @description:
582
- * Create a new charmap cache.
583
- *
584
- * @input:
585
- * manager ::
586
- * A handle to the cache manager.
587
- *
588
- * @output:
589
- * acache ::
590
- * A new cache handle. `NULL` in case of error.
591
- *
592
- * @return:
593
- * FreeType error code. 0~means success.
594
- *
595
- * @note:
596
- * Like all other caches, this one will be destroyed with the cache
597
- * manager.
598
- *
599
- */
600
- FT_EXPORT( FT_Error )
601
- FTC_CMapCache_New( FTC_Manager manager,
602
- FTC_CMapCache *acache );
603
-
604
-
605
- /**************************************************************************
606
- *
607
- * @function:
608
- * FTC_CMapCache_Lookup
609
- *
610
- * @description:
611
- * Translate a character code into a glyph index, using the charmap
612
- * cache.
613
- *
614
- * @input:
615
- * cache ::
616
- * A charmap cache handle.
617
- *
618
- * face_id ::
619
- * The source face ID.
620
- *
621
- * cmap_index ::
622
- * The index of the charmap in the source face. Any negative value
623
- * means to use the cache @FT_Face's default charmap.
624
- *
625
- * char_code ::
626
- * The character code (in the corresponding charmap).
627
- *
628
- * @return:
629
- * Glyph index. 0~means 'no glyph'.
630
- *
631
- */
632
- FT_EXPORT( FT_UInt )
633
- FTC_CMapCache_Lookup( FTC_CMapCache cache,
634
- FTC_FaceID face_id,
635
- FT_Int cmap_index,
636
- FT_UInt32 char_code );
637
-
638
-
639
- /*************************************************************************/
640
- /*************************************************************************/
641
- /*************************************************************************/
642
- /***** *****/
643
- /***** IMAGE CACHE OBJECT *****/
644
- /***** *****/
645
- /*************************************************************************/
646
- /*************************************************************************/
647
- /*************************************************************************/
648
-
649
-
650
- /**************************************************************************
651
- *
652
- * @struct:
653
- * FTC_ImageTypeRec
654
- *
655
- * @description:
656
- * A structure used to model the type of images in a glyph cache.
657
- *
658
- * @fields:
659
- * face_id ::
660
- * The face ID.
661
- *
662
- * width ::
663
- * The width in pixels.
664
- *
665
- * height ::
666
- * The height in pixels.
667
- *
668
- * flags ::
669
- * The load flags, as in @FT_Load_Glyph.
670
- *
671
- */
672
- typedef struct FTC_ImageTypeRec_
673
- {
674
- FTC_FaceID face_id;
675
- FT_UInt width;
676
- FT_UInt height;
677
- FT_Int32 flags;
678
-
679
- } FTC_ImageTypeRec;
680
-
681
-
682
- /**************************************************************************
683
- *
684
- * @type:
685
- * FTC_ImageType
686
- *
687
- * @description:
688
- * A handle to an @FTC_ImageTypeRec structure.
689
- *
690
- */
691
- typedef struct FTC_ImageTypeRec_* FTC_ImageType;
692
-
693
-
694
- /* */
695
-
696
-
697
- #define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \
698
- ( (d1)->face_id == (d2)->face_id && \
699
- (d1)->width == (d2)->width && \
700
- (d1)->flags == (d2)->flags )
701
-
702
-
703
- /**************************************************************************
704
- *
705
- * @type:
706
- * FTC_ImageCache
707
- *
708
- * @description:
709
- * A handle to a glyph image cache object. They are designed to hold
710
- * many distinct glyph images while not exceeding a certain memory
711
- * threshold.
712
- */
713
- typedef struct FTC_ImageCacheRec_* FTC_ImageCache;
714
-
715
-
716
- /**************************************************************************
717
- *
718
- * @function:
719
- * FTC_ImageCache_New
720
- *
721
- * @description:
722
- * Create a new glyph image cache.
723
- *
724
- * @input:
725
- * manager ::
726
- * The parent manager for the image cache.
727
- *
728
- * @output:
729
- * acache ::
730
- * A handle to the new glyph image cache object.
731
- *
732
- * @return:
733
- * FreeType error code. 0~means success.
734
- */
735
- FT_EXPORT( FT_Error )
736
- FTC_ImageCache_New( FTC_Manager manager,
737
- FTC_ImageCache *acache );
738
-
739
-
740
- /**************************************************************************
741
- *
742
- * @function:
743
- * FTC_ImageCache_Lookup
744
- *
745
- * @description:
746
- * Retrieve a given glyph image from a glyph image cache.
747
- *
748
- * @input:
749
- * cache ::
750
- * A handle to the source glyph image cache.
751
- *
752
- * type ::
753
- * A pointer to a glyph image type descriptor.
754
- *
755
- * gindex ::
756
- * The glyph index to retrieve.
757
- *
758
- * @output:
759
- * aglyph ::
760
- * The corresponding @FT_Glyph object. 0~in case of failure.
761
- *
762
- * anode ::
763
- * Used to return the address of the corresponding cache node after
764
- * incrementing its reference count (see note below).
765
- *
766
- * @return:
767
- * FreeType error code. 0~means success.
768
- *
769
- * @note:
770
- * The returned glyph is owned and managed by the glyph image cache.
771
- * Never try to transform or discard it manually! You can however create
772
- * a copy with @FT_Glyph_Copy and modify the new one.
773
- *
774
- * If `anode` is _not_ `NULL`, it receives the address of the cache node
775
- * containing the glyph image, after increasing its reference count.
776
- * This ensures that the node (as well as the @FT_Glyph) will always be
777
- * kept in the cache until you call @FTC_Node_Unref to 'release' it.
778
- *
779
- * If `anode` is `NULL`, the cache node is left unchanged, which means
780
- * that the @FT_Glyph could be flushed out of the cache on the next call
781
- * to one of the caching sub-system APIs. Don't assume that it is
782
- * persistent!
783
- */
784
- FT_EXPORT( FT_Error )
785
- FTC_ImageCache_Lookup( FTC_ImageCache cache,
786
- FTC_ImageType type,
787
- FT_UInt gindex,
788
- FT_Glyph *aglyph,
789
- FTC_Node *anode );
790
-
791
-
792
- /**************************************************************************
793
- *
794
- * @function:
795
- * FTC_ImageCache_LookupScaler
796
- *
797
- * @description:
798
- * A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec to
799
- * specify the face ID and its size.
800
- *
801
- * @input:
802
- * cache ::
803
- * A handle to the source glyph image cache.
804
- *
805
- * scaler ::
806
- * A pointer to a scaler descriptor.
807
- *
808
- * load_flags ::
809
- * The corresponding load flags.
810
- *
811
- * gindex ::
812
- * The glyph index to retrieve.
813
- *
814
- * @output:
815
- * aglyph ::
816
- * The corresponding @FT_Glyph object. 0~in case of failure.
817
- *
818
- * anode ::
819
- * Used to return the address of the corresponding cache node after
820
- * incrementing its reference count (see note below).
821
- *
822
- * @return:
823
- * FreeType error code. 0~means success.
824
- *
825
- * @note:
826
- * The returned glyph is owned and managed by the glyph image cache.
827
- * Never try to transform or discard it manually! You can however create
828
- * a copy with @FT_Glyph_Copy and modify the new one.
829
- *
830
- * If `anode` is _not_ `NULL`, it receives the address of the cache node
831
- * containing the glyph image, after increasing its reference count.
832
- * This ensures that the node (as well as the @FT_Glyph) will always be
833
- * kept in the cache until you call @FTC_Node_Unref to 'release' it.
834
- *
835
- * If `anode` is `NULL`, the cache node is left unchanged, which means
836
- * that the @FT_Glyph could be flushed out of the cache on the next call
837
- * to one of the caching sub-system APIs. Don't assume that it is
838
- * persistent!
839
- *
840
- * Calls to @FT_Set_Char_Size and friends have no effect on cached
841
- * glyphs; you should always use the FreeType cache API instead.
842
- */
843
- FT_EXPORT( FT_Error )
844
- FTC_ImageCache_LookupScaler( FTC_ImageCache cache,
845
- FTC_Scaler scaler,
846
- FT_ULong load_flags,
847
- FT_UInt gindex,
848
- FT_Glyph *aglyph,
849
- FTC_Node *anode );
850
-
851
-
852
- /**************************************************************************
853
- *
854
- * @type:
855
- * FTC_SBit
856
- *
857
- * @description:
858
- * A handle to a small bitmap descriptor. See the @FTC_SBitRec structure
859
- * for details.
860
- */
861
- typedef struct FTC_SBitRec_* FTC_SBit;
862
-
863
-
864
- /**************************************************************************
865
- *
866
- * @struct:
867
- * FTC_SBitRec
868
- *
869
- * @description:
870
- * A very compact structure used to describe a small glyph bitmap.
871
- *
872
- * @fields:
873
- * width ::
874
- * The bitmap width in pixels.
875
- *
876
- * height ::
877
- * The bitmap height in pixels.
878
- *
879
- * left ::
880
- * The horizontal distance from the pen position to the left bitmap
881
- * border (a.k.a. 'left side bearing', or 'lsb').
882
- *
883
- * top ::
884
- * The vertical distance from the pen position (on the baseline) to the
885
- * upper bitmap border (a.k.a. 'top side bearing'). The distance is
886
- * positive for upwards y~coordinates.
887
- *
888
- * format ::
889
- * The format of the glyph bitmap (monochrome or gray).
890
- *
891
- * max_grays ::
892
- * Maximum gray level value (in the range 1 to~255).
893
- *
894
- * pitch ::
895
- * The number of bytes per bitmap line. May be positive or negative.
896
- *
897
- * xadvance ::
898
- * The horizontal advance width in pixels.
899
- *
900
- * yadvance ::
901
- * The vertical advance height in pixels.
902
- *
903
- * buffer ::
904
- * A pointer to the bitmap pixels.
905
- */
906
- typedef struct FTC_SBitRec_
907
- {
908
- FT_Byte width;
909
- FT_Byte height;
910
- FT_Char left;
911
- FT_Char top;
912
-
913
- FT_Byte format;
914
- FT_Byte max_grays;
915
- FT_Short pitch;
916
- FT_Char xadvance;
917
- FT_Char yadvance;
918
-
919
- FT_Byte* buffer;
920
-
921
- } FTC_SBitRec;
922
-
923
-
924
- /**************************************************************************
925
- *
926
- * @type:
927
- * FTC_SBitCache
928
- *
929
- * @description:
930
- * A handle to a small bitmap cache. These are special cache objects
931
- * used to store small glyph bitmaps (and anti-aliased pixmaps) in a much
932
- * more efficient way than the traditional glyph image cache implemented
933
- * by @FTC_ImageCache.
934
- */
935
- typedef struct FTC_SBitCacheRec_* FTC_SBitCache;
936
-
937
-
938
- /**************************************************************************
939
- *
940
- * @function:
941
- * FTC_SBitCache_New
942
- *
943
- * @description:
944
- * Create a new cache to store small glyph bitmaps.
945
- *
946
- * @input:
947
- * manager ::
948
- * A handle to the source cache manager.
949
- *
950
- * @output:
951
- * acache ::
952
- * A handle to the new sbit cache. `NULL` in case of error.
953
- *
954
- * @return:
955
- * FreeType error code. 0~means success.
956
- */
957
- FT_EXPORT( FT_Error )
958
- FTC_SBitCache_New( FTC_Manager manager,
959
- FTC_SBitCache *acache );
960
-
961
-
962
- /**************************************************************************
963
- *
964
- * @function:
965
- * FTC_SBitCache_Lookup
966
- *
967
- * @description:
968
- * Look up a given small glyph bitmap in a given sbit cache and 'lock' it
969
- * to prevent its flushing from the cache until needed.
970
- *
971
- * @input:
972
- * cache ::
973
- * A handle to the source sbit cache.
974
- *
975
- * type ::
976
- * A pointer to the glyph image type descriptor.
977
- *
978
- * gindex ::
979
- * The glyph index.
980
- *
981
- * @output:
982
- * sbit ::
983
- * A handle to a small bitmap descriptor.
984
- *
985
- * anode ::
986
- * Used to return the address of the corresponding cache node after
987
- * incrementing its reference count (see note below).
988
- *
989
- * @return:
990
- * FreeType error code. 0~means success.
991
- *
992
- * @note:
993
- * The small bitmap descriptor and its bit buffer are owned by the cache
994
- * and should never be freed by the application. They might as well
995
- * disappear from memory on the next cache lookup, so don't treat them as
996
- * persistent data.
997
- *
998
- * The descriptor's `buffer` field is set to~0 to indicate a missing
999
- * glyph bitmap.
1000
- *
1001
- * If `anode` is _not_ `NULL`, it receives the address of the cache node
1002
- * containing the bitmap, after increasing its reference count. This
1003
- * ensures that the node (as well as the image) will always be kept in
1004
- * the cache until you call @FTC_Node_Unref to 'release' it.
1005
- *
1006
- * If `anode` is `NULL`, the cache node is left unchanged, which means
1007
- * that the bitmap could be flushed out of the cache on the next call to
1008
- * one of the caching sub-system APIs. Don't assume that it is
1009
- * persistent!
1010
- */
1011
- FT_EXPORT( FT_Error )
1012
- FTC_SBitCache_Lookup( FTC_SBitCache cache,
1013
- FTC_ImageType type,
1014
- FT_UInt gindex,
1015
- FTC_SBit *sbit,
1016
- FTC_Node *anode );
1017
-
1018
-
1019
- /**************************************************************************
1020
- *
1021
- * @function:
1022
- * FTC_SBitCache_LookupScaler
1023
- *
1024
- * @description:
1025
- * A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec to
1026
- * specify the face ID and its size.
1027
- *
1028
- * @input:
1029
- * cache ::
1030
- * A handle to the source sbit cache.
1031
- *
1032
- * scaler ::
1033
- * A pointer to the scaler descriptor.
1034
- *
1035
- * load_flags ::
1036
- * The corresponding load flags.
1037
- *
1038
- * gindex ::
1039
- * The glyph index.
1040
- *
1041
- * @output:
1042
- * sbit ::
1043
- * A handle to a small bitmap descriptor.
1044
- *
1045
- * anode ::
1046
- * Used to return the address of the corresponding cache node after
1047
- * incrementing its reference count (see note below).
1048
- *
1049
- * @return:
1050
- * FreeType error code. 0~means success.
1051
- *
1052
- * @note:
1053
- * The small bitmap descriptor and its bit buffer are owned by the cache
1054
- * and should never be freed by the application. They might as well
1055
- * disappear from memory on the next cache lookup, so don't treat them as
1056
- * persistent data.
1057
- *
1058
- * The descriptor's `buffer` field is set to~0 to indicate a missing
1059
- * glyph bitmap.
1060
- *
1061
- * If `anode` is _not_ `NULL`, it receives the address of the cache node
1062
- * containing the bitmap, after increasing its reference count. This
1063
- * ensures that the node (as well as the image) will always be kept in
1064
- * the cache until you call @FTC_Node_Unref to 'release' it.
1065
- *
1066
- * If `anode` is `NULL`, the cache node is left unchanged, which means
1067
- * that the bitmap could be flushed out of the cache on the next call to
1068
- * one of the caching sub-system APIs. Don't assume that it is
1069
- * persistent!
1070
- */
1071
- FT_EXPORT( FT_Error )
1072
- FTC_SBitCache_LookupScaler( FTC_SBitCache cache,
1073
- FTC_Scaler scaler,
1074
- FT_ULong load_flags,
1075
- FT_UInt gindex,
1076
- FTC_SBit *sbit,
1077
- FTC_Node *anode );
1078
-
1079
- /* */
1080
-
1081
-
1082
- FT_END_HEADER
1083
-
1084
- #endif /* FTCACHE_H_ */
1085
-
1086
-
1087
- /* END */