@revizly/sharp-libvips-dev 1.0.53 → 1.0.55

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 (41) hide show
  1. package/README.md +2 -0
  2. package/include/archive.h +6 -4
  3. package/include/archive_entry.h +1 -1
  4. package/include/brotli/decode.h +409 -0
  5. package/include/brotli/encode.h +505 -0
  6. package/include/brotli/port.h +302 -0
  7. package/include/brotli/shared_dictionary.h +100 -0
  8. package/include/brotli/types.h +83 -0
  9. package/include/freetype2/freetype/config/ftmodule.h +1 -0
  10. package/include/freetype2/freetype/config/ftoption.h +36 -2
  11. package/include/freetype2/freetype/freetype.h +8 -7
  12. package/include/freetype2/freetype/ftimage.h +2 -2
  13. package/include/freetype2/freetype/ftmoderr.h +1 -0
  14. package/include/freetype2/freetype/fttypes.h +0 -2
  15. package/include/freetype2/freetype/tttags.h +12 -0
  16. package/include/jxl/cms.h +24 -0
  17. package/include/jxl/cms_interface.h +255 -0
  18. package/include/jxl/codestream_header.h +433 -0
  19. package/include/jxl/color_encoding.h +161 -0
  20. package/include/jxl/compressed_icc.h +75 -0
  21. package/include/jxl/decode.h +1475 -0
  22. package/include/jxl/decode_cxx.h +58 -0
  23. package/include/jxl/encode.h +1629 -0
  24. package/include/jxl/encode_cxx.h +58 -0
  25. package/include/jxl/gain_map.h +129 -0
  26. package/include/jxl/jxl_cms_export.h +42 -0
  27. package/include/jxl/jxl_export.h +42 -0
  28. package/include/jxl/jxl_threads_export.h +42 -0
  29. package/include/jxl/memory_manager.h +73 -0
  30. package/include/jxl/parallel_runner.h +164 -0
  31. package/include/jxl/resizable_parallel_runner.h +77 -0
  32. package/include/jxl/resizable_parallel_runner_cxx.h +65 -0
  33. package/include/jxl/stats.h +103 -0
  34. package/include/jxl/thread_parallel_runner.h +71 -0
  35. package/include/jxl/thread_parallel_runner_cxx.h +66 -0
  36. package/include/jxl/types.h +154 -0
  37. package/include/jxl/version.h +44 -0
  38. package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
  39. package/include/vips/version.h +1 -1
  40. package/package.json +1 -1
  41. package/versions.json +6 -4
@@ -0,0 +1,302 @@
1
+ /* Copyright 2016 Google Inc. All Rights Reserved.
2
+
3
+ Distributed under MIT license.
4
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
+ */
6
+
7
+ /* Macros for compiler / platform specific API declarations. */
8
+
9
+ #ifndef BROTLI_COMMON_PORT_H_
10
+ #define BROTLI_COMMON_PORT_H_
11
+
12
+ /* The following macros were borrowed from https://github.com/nemequ/hedley
13
+ * with permission of original author - Evan Nemerson <evan@nemerson.com> */
14
+
15
+ /* >>> >>> >>> hedley macros */
16
+
17
+ #define BROTLI_MAKE_VERSION(major, minor, revision) \
18
+ (((major) * 1000000) + ((minor) * 1000) + (revision))
19
+
20
+ #if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
21
+ #define BROTLI_GNUC_VERSION \
22
+ BROTLI_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
23
+ #elif defined(__GNUC__)
24
+ #define BROTLI_GNUC_VERSION BROTLI_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, 0)
25
+ #endif
26
+
27
+ #if defined(BROTLI_GNUC_VERSION)
28
+ #define BROTLI_GNUC_VERSION_CHECK(major, minor, patch) \
29
+ (BROTLI_GNUC_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
30
+ #else
31
+ #define BROTLI_GNUC_VERSION_CHECK(major, minor, patch) (0)
32
+ #endif
33
+
34
+ #if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)
35
+ #define BROTLI_MSVC_VERSION \
36
+ BROTLI_MAKE_VERSION((_MSC_FULL_VER / 10000000), \
37
+ (_MSC_FULL_VER % 10000000) / 100000, \
38
+ (_MSC_FULL_VER % 100000) / 100)
39
+ #elif defined(_MSC_FULL_VER)
40
+ #define BROTLI_MSVC_VERSION \
41
+ BROTLI_MAKE_VERSION((_MSC_FULL_VER / 1000000), \
42
+ (_MSC_FULL_VER % 1000000) / 10000, \
43
+ (_MSC_FULL_VER % 10000) / 10)
44
+ #elif defined(_MSC_VER)
45
+ #define BROTLI_MSVC_VERSION \
46
+ BROTLI_MAKE_VERSION(_MSC_VER / 100, _MSC_VER % 100, 0)
47
+ #endif
48
+
49
+ #if !defined(_MSC_VER)
50
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) (0)
51
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
52
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
53
+ (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))
54
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1200)
55
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
56
+ (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))
57
+ #else
58
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
59
+ (_MSC_VER >= ((major * 100) + (minor)))
60
+ #endif
61
+
62
+ #if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
63
+ #define BROTLI_INTEL_VERSION \
64
+ BROTLI_MAKE_VERSION(__INTEL_COMPILER / 100, \
65
+ __INTEL_COMPILER % 100, \
66
+ __INTEL_COMPILER_UPDATE)
67
+ #elif defined(__INTEL_COMPILER)
68
+ #define BROTLI_INTEL_VERSION \
69
+ BROTLI_MAKE_VERSION(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
70
+ #endif
71
+
72
+ #if defined(BROTLI_INTEL_VERSION)
73
+ #define BROTLI_INTEL_VERSION_CHECK(major, minor, patch) \
74
+ (BROTLI_INTEL_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
75
+ #else
76
+ #define BROTLI_INTEL_VERSION_CHECK(major, minor, patch) (0)
77
+ #endif
78
+
79
+ #if defined(__PGI) && \
80
+ defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
81
+ #define BROTLI_PGI_VERSION \
82
+ BROTLI_MAKE_VERSION(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
83
+ #endif
84
+
85
+ #if defined(BROTLI_PGI_VERSION)
86
+ #define BROTLI_PGI_VERSION_CHECK(major, minor, patch) \
87
+ (BROTLI_PGI_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
88
+ #else
89
+ #define BROTLI_PGI_VERSION_CHECK(major, minor, patch) (0)
90
+ #endif
91
+
92
+ #if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)
93
+ #define BROTLI_SUNPRO_VERSION \
94
+ BROTLI_MAKE_VERSION( \
95
+ (((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), \
96
+ (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), \
97
+ (__SUNPRO_C & 0xf) * 10)
98
+ #elif defined(__SUNPRO_C)
99
+ #define BROTLI_SUNPRO_VERSION \
100
+ BROTLI_MAKE_VERSION((__SUNPRO_C >> 8) & 0xf, \
101
+ (__SUNPRO_C >> 4) & 0xf, \
102
+ (__SUNPRO_C) & 0xf)
103
+ #elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)
104
+ #define BROTLI_SUNPRO_VERSION \
105
+ BROTLI_MAKE_VERSION( \
106
+ (((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), \
107
+ (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), \
108
+ (__SUNPRO_CC & 0xf) * 10)
109
+ #elif defined(__SUNPRO_CC)
110
+ #define BROTLI_SUNPRO_VERSION \
111
+ BROTLI_MAKE_VERSION((__SUNPRO_CC >> 8) & 0xf, \
112
+ (__SUNPRO_CC >> 4) & 0xf, \
113
+ (__SUNPRO_CC) & 0xf)
114
+ #endif
115
+
116
+ #if defined(BROTLI_SUNPRO_VERSION)
117
+ #define BROTLI_SUNPRO_VERSION_CHECK(major, minor, patch) \
118
+ (BROTLI_SUNPRO_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
119
+ #else
120
+ #define BROTLI_SUNPRO_VERSION_CHECK(major, minor, patch) (0)
121
+ #endif
122
+
123
+ #if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
124
+ #define BROTLI_ARM_VERSION \
125
+ BROTLI_MAKE_VERSION((__ARMCOMPILER_VERSION / 1000000), \
126
+ (__ARMCOMPILER_VERSION % 1000000) / 10000, \
127
+ (__ARMCOMPILER_VERSION % 10000) / 100)
128
+ #elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
129
+ #define BROTLI_ARM_VERSION \
130
+ BROTLI_MAKE_VERSION((__ARMCC_VERSION / 1000000), \
131
+ (__ARMCC_VERSION % 1000000) / 10000, \
132
+ (__ARMCC_VERSION % 10000) / 100)
133
+ #endif
134
+
135
+ #if defined(BROTLI_ARM_VERSION)
136
+ #define BROTLI_ARM_VERSION_CHECK(major, minor, patch) \
137
+ (BROTLI_ARM_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
138
+ #else
139
+ #define BROTLI_ARM_VERSION_CHECK(major, minor, patch) (0)
140
+ #endif
141
+
142
+ #if defined(__ibmxl__)
143
+ #define BROTLI_IBM_VERSION \
144
+ BROTLI_MAKE_VERSION(__ibmxl_version__, \
145
+ __ibmxl_release__, \
146
+ __ibmxl_modification__)
147
+ #elif defined(__xlC__) && defined(__xlC_ver__)
148
+ #define BROTLI_IBM_VERSION \
149
+ BROTLI_MAKE_VERSION(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)
150
+ #elif defined(__xlC__)
151
+ #define BROTLI_IBM_VERSION BROTLI_MAKE_VERSION(__xlC__ >> 8, __xlC__ & 0xff, 0)
152
+ #endif
153
+
154
+ #if defined(BROTLI_IBM_VERSION)
155
+ #define BROTLI_IBM_VERSION_CHECK(major, minor, patch) \
156
+ (BROTLI_IBM_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
157
+ #else
158
+ #define BROTLI_IBM_VERSION_CHECK(major, minor, patch) (0)
159
+ #endif
160
+
161
+ #if defined(__TI_COMPILER_VERSION__)
162
+ #define BROTLI_TI_VERSION \
163
+ BROTLI_MAKE_VERSION((__TI_COMPILER_VERSION__ / 1000000), \
164
+ (__TI_COMPILER_VERSION__ % 1000000) / 1000, \
165
+ (__TI_COMPILER_VERSION__ % 1000))
166
+ #endif
167
+
168
+ #if defined(BROTLI_TI_VERSION)
169
+ #define BROTLI_TI_VERSION_CHECK(major, minor, patch) \
170
+ (BROTLI_TI_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
171
+ #else
172
+ #define BROTLI_TI_VERSION_CHECK(major, minor, patch) (0)
173
+ #endif
174
+
175
+ #if defined(__IAR_SYSTEMS_ICC__)
176
+ #if __VER__ > 1000
177
+ #define BROTLI_IAR_VERSION \
178
+ BROTLI_MAKE_VERSION((__VER__ / 1000000), \
179
+ (__VER__ / 1000) % 1000, \
180
+ (__VER__ % 1000))
181
+ #else
182
+ #define BROTLI_IAR_VERSION BROTLI_MAKE_VERSION(VER / 100, __VER__ % 100, 0)
183
+ #endif
184
+ #endif
185
+
186
+ #if defined(BROTLI_IAR_VERSION)
187
+ #define BROTLI_IAR_VERSION_CHECK(major, minor, patch) \
188
+ (BROTLI_IAR_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
189
+ #else
190
+ #define BROTLI_IAR_VERSION_CHECK(major, minor, patch) (0)
191
+ #endif
192
+
193
+ #if defined(__TINYC__)
194
+ #define BROTLI_TINYC_VERSION \
195
+ BROTLI_MAKE_VERSION(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)
196
+ #endif
197
+
198
+ #if defined(BROTLI_TINYC_VERSION)
199
+ #define BROTLI_TINYC_VERSION_CHECK(major, minor, patch) \
200
+ (BROTLI_TINYC_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
201
+ #else
202
+ #define BROTLI_TINYC_VERSION_CHECK(major, minor, patch) (0)
203
+ #endif
204
+
205
+ #if defined(__has_attribute)
206
+ #define BROTLI_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \
207
+ __has_attribute(attribute)
208
+ #else
209
+ #define BROTLI_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \
210
+ BROTLI_GNUC_VERSION_CHECK(major, minor, patch)
211
+ #endif
212
+
213
+ #if defined(__has_builtin)
214
+ #define BROTLI_GNUC_HAS_BUILTIN(builtin, major, minor, patch) \
215
+ __has_builtin(builtin)
216
+ #else
217
+ #define BROTLI_GNUC_HAS_BUILTIN(builtin, major, minor, patch) \
218
+ BROTLI_GNUC_VERSION_CHECK(major, minor, patch)
219
+ #endif
220
+
221
+ #if defined(__has_feature)
222
+ #define BROTLI_HAS_FEATURE(feature) __has_feature(feature)
223
+ #else
224
+ #define BROTLI_HAS_FEATURE(feature) (0)
225
+ #endif
226
+
227
+ #if defined(_WIN32) || defined(__CYGWIN__)
228
+ #define BROTLI_PUBLIC
229
+ #elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
230
+ BROTLI_TI_VERSION_CHECK(8, 0, 0) || \
231
+ BROTLI_INTEL_VERSION_CHECK(16, 0, 0) || \
232
+ BROTLI_ARM_VERSION_CHECK(4, 1, 0) || \
233
+ BROTLI_IBM_VERSION_CHECK(13, 1, 0) || \
234
+ BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) || \
235
+ (BROTLI_TI_VERSION_CHECK(7, 3, 0) && \
236
+ defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
237
+ #define BROTLI_PUBLIC __attribute__ ((visibility ("default")))
238
+ #else
239
+ #define BROTLI_PUBLIC
240
+ #endif
241
+
242
+ #if defined(_WIN32) || defined(__CYGWIN__)
243
+ #define BROTLI_INTERNAL
244
+ #elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
245
+ BROTLI_TI_VERSION_CHECK(8, 0, 0) || \
246
+ BROTLI_INTEL_VERSION_CHECK(16, 0, 0) || \
247
+ BROTLI_ARM_VERSION_CHECK(4, 1, 0) || \
248
+ BROTLI_IBM_VERSION_CHECK(13, 1, 0) || \
249
+ BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) || \
250
+ (BROTLI_TI_VERSION_CHECK(7, 3, 0) && \
251
+ defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
252
+ #define BROTLI_INTERNAL __attribute__ ((visibility ("hidden")))
253
+ #else
254
+ #define BROTLI_INTERNAL
255
+ #endif
256
+
257
+ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
258
+ !defined(__STDC_NO_VLA__) && !defined(__cplusplus) && \
259
+ !defined(__PGI) && !defined(__PGIC__) && !defined(__TINYC__) && \
260
+ !defined(__clang__)
261
+ #define BROTLI_ARRAY_PARAM(name) (name)
262
+ #else
263
+ #define BROTLI_ARRAY_PARAM(name)
264
+ #endif
265
+
266
+ /* <<< <<< <<< end of hedley macros. */
267
+
268
+ #if defined(BROTLI_SHARED_COMPILATION)
269
+ #if defined(_WIN32)
270
+ #if defined(BROTLICOMMON_SHARED_COMPILATION)
271
+ #define BROTLI_COMMON_API __declspec(dllexport)
272
+ #else /* !BROTLICOMMON_SHARED_COMPILATION */
273
+ #define BROTLI_COMMON_API __declspec(dllimport)
274
+ #endif /* BROTLICOMMON_SHARED_COMPILATION */
275
+ #if defined(BROTLIDEC_SHARED_COMPILATION)
276
+ #define BROTLI_DEC_API __declspec(dllexport)
277
+ #else /* !BROTLIDEC_SHARED_COMPILATION */
278
+ #define BROTLI_DEC_API __declspec(dllimport)
279
+ #endif /* BROTLIDEC_SHARED_COMPILATION */
280
+ #if defined(BROTLIENC_SHARED_COMPILATION)
281
+ #define BROTLI_ENC_API __declspec(dllexport)
282
+ #else /* !BROTLIENC_SHARED_COMPILATION */
283
+ #define BROTLI_ENC_API __declspec(dllimport)
284
+ #endif /* BROTLIENC_SHARED_COMPILATION */
285
+ #else /* !_WIN32 */
286
+ #define BROTLI_COMMON_API BROTLI_PUBLIC
287
+ #define BROTLI_DEC_API BROTLI_PUBLIC
288
+ #define BROTLI_ENC_API BROTLI_PUBLIC
289
+ #endif /* _WIN32 */
290
+ #else /* BROTLI_SHARED_COMPILATION */
291
+ #define BROTLI_COMMON_API
292
+ #define BROTLI_DEC_API
293
+ #define BROTLI_ENC_API
294
+ #endif
295
+
296
+ #if defined(BROTLI_BUILD_ENC_EXTRA_API)
297
+ #define BROTLI_ENC_EXTRA_API BROTLI_ENC_API
298
+ #else
299
+ #define BROTLI_ENC_EXTRA_API BROTLI_INTERNAL
300
+ #endif
301
+
302
+ #endif /* BROTLI_COMMON_PORT_H_ */
@@ -0,0 +1,100 @@
1
+ /* Copyright 2017 Google Inc. All Rights Reserved.
2
+
3
+ Distributed under MIT license.
4
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
+ */
6
+
7
+ /* (Opaque) Shared Dictionary definition and utilities. */
8
+
9
+ #ifndef BROTLI_COMMON_SHARED_DICTIONARY_H_
10
+ #define BROTLI_COMMON_SHARED_DICTIONARY_H_
11
+
12
+ #include <brotli/port.h>
13
+ #include <brotli/types.h>
14
+
15
+ #if defined(__cplusplus) || defined(c_plusplus)
16
+ extern "C" {
17
+ #endif
18
+
19
+ #define SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH 4
20
+ #define SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH 31
21
+ #define SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS 64
22
+ #define SHARED_BROTLI_MAX_COMPOUND_DICTS 15
23
+
24
+ /**
25
+ * Opaque structure that holds shared dictionary data.
26
+ *
27
+ * Allocated and initialized with ::BrotliSharedDictionaryCreateInstance.
28
+ * Cleaned up and deallocated with ::BrotliSharedDictionaryDestroyInstance.
29
+ */
30
+ typedef struct BrotliSharedDictionaryStruct BrotliSharedDictionary;
31
+
32
+ /**
33
+ * Input data type for ::BrotliSharedDictionaryAttach.
34
+ */
35
+ typedef enum BrotliSharedDictionaryType {
36
+ /** Raw LZ77 prefix dictionary. */
37
+ BROTLI_SHARED_DICTIONARY_RAW = 0,
38
+ /** Serialized shared dictionary.
39
+ *
40
+ * DO NOT USE: methods accepting this value will fail.
41
+ */
42
+ BROTLI_SHARED_DICTIONARY_SERIALIZED = 1
43
+ } BrotliSharedDictionaryType;
44
+
45
+ /**
46
+ * Creates an instance of ::BrotliSharedDictionary.
47
+ *
48
+ * Fresh instance has default word dictionary and transforms
49
+ * and no LZ77 prefix dictionary.
50
+ *
51
+ * @p alloc_func and @p free_func @b MUST be both zero or both non-zero. In the
52
+ * case they are both zero, default memory allocators are used. @p opaque is
53
+ * passed to @p alloc_func and @p free_func when they are called. @p free_func
54
+ * has to return without doing anything when asked to free a NULL pointer.
55
+ *
56
+ * @param alloc_func custom memory allocation function
57
+ * @param free_func custom memory free function
58
+ * @param opaque custom memory manager handle
59
+ * @returns @c 0 if instance can not be allocated or initialized
60
+ * @returns pointer to initialized ::BrotliSharedDictionary otherwise
61
+ */
62
+ BROTLI_COMMON_API BrotliSharedDictionary* BrotliSharedDictionaryCreateInstance(
63
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
64
+
65
+ /**
66
+ * Deinitializes and frees ::BrotliSharedDictionary instance.
67
+ *
68
+ * @param dict shared dictionary instance to be cleaned up and deallocated
69
+ */
70
+ BROTLI_COMMON_API void BrotliSharedDictionaryDestroyInstance(
71
+ BrotliSharedDictionary* dict);
72
+
73
+ /**
74
+ * Attaches dictionary to a given instance of ::BrotliSharedDictionary.
75
+ *
76
+ * Dictionary to be attached is represented in a serialized format as a region
77
+ * of memory.
78
+ *
79
+ * Provided data it partially referenced by a resulting (compound) dictionary,
80
+ * and should be kept untouched, while at least one compound dictionary uses it.
81
+ * This way memory overhead is kept minimal by the cost of additional resource
82
+ * management.
83
+ *
84
+ * @param dict dictionary to extend
85
+ * @param type type of dictionary to attach
86
+ * @param data_size size of @p data
87
+ * @param data serialized dictionary of type @p type, with at least @p data_size
88
+ * addressable bytes
89
+ * @returns ::BROTLI_TRUE if provided dictionary is successfully attached
90
+ * @returns ::BROTLI_FALSE otherwise
91
+ */
92
+ BROTLI_COMMON_API BROTLI_BOOL BrotliSharedDictionaryAttach(
93
+ BrotliSharedDictionary* dict, BrotliSharedDictionaryType type,
94
+ size_t data_size, const uint8_t data[BROTLI_ARRAY_PARAM(data_size)]);
95
+
96
+ #if defined(__cplusplus) || defined(c_plusplus)
97
+ } /* extern "C" */
98
+ #endif
99
+
100
+ #endif /* BROTLI_COMMON_SHARED_DICTIONARY_H_ */
@@ -0,0 +1,83 @@
1
+ /* Copyright 2013 Google Inc. All Rights Reserved.
2
+
3
+ Distributed under MIT license.
4
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
+ */
6
+
7
+ /**
8
+ * @file
9
+ * Common types used in decoder and encoder API.
10
+ */
11
+
12
+ #ifndef BROTLI_COMMON_TYPES_H_
13
+ #define BROTLI_COMMON_TYPES_H_
14
+
15
+ #include <stddef.h> /* IWYU pragma: export */
16
+
17
+ #if defined(_MSC_VER) && (_MSC_VER < 1600)
18
+ typedef __int8 int8_t;
19
+ typedef unsigned __int8 uint8_t;
20
+ typedef __int16 int16_t;
21
+ typedef unsigned __int16 uint16_t;
22
+ typedef __int32 int32_t;
23
+ typedef unsigned __int32 uint32_t;
24
+ typedef unsigned __int64 uint64_t;
25
+ typedef __int64 int64_t;
26
+ #else
27
+ #include <stdint.h> /* IWYU pragma: export */
28
+ #endif /* defined(_MSC_VER) && (_MSC_VER < 1600) */
29
+
30
+ /**
31
+ * A portable @c bool replacement.
32
+ *
33
+ * ::BROTLI_BOOL is a "documentation" type: actually it is @c int, but in API it
34
+ * denotes a type, whose only values are ::BROTLI_TRUE and ::BROTLI_FALSE.
35
+ *
36
+ * ::BROTLI_BOOL values passed to Brotli should either be ::BROTLI_TRUE or
37
+ * ::BROTLI_FALSE, or be a result of ::TO_BROTLI_BOOL macros.
38
+ *
39
+ * ::BROTLI_BOOL values returned by Brotli should not be tested for equality
40
+ * with @c true, @c false, ::BROTLI_TRUE, ::BROTLI_FALSE, but rather should be
41
+ * evaluated, for example: @code{.cpp}
42
+ * if (SomeBrotliFunction(encoder, BROTLI_TRUE) &&
43
+ * !OtherBrotliFunction(decoder, BROTLI_FALSE)) {
44
+ * bool x = !!YetAnotherBrotliFunction(encoder, TO_BROLTI_BOOL(2 * 2 == 4));
45
+ * DoSomething(x);
46
+ * }
47
+ * @endcode
48
+ */
49
+ #define BROTLI_BOOL int
50
+ /** Portable @c true replacement. */
51
+ #define BROTLI_TRUE 1
52
+ /** Portable @c false replacement. */
53
+ #define BROTLI_FALSE 0
54
+ /** @c bool to ::BROTLI_BOOL conversion macros. */
55
+ #define TO_BROTLI_BOOL(X) (!!(X) ? BROTLI_TRUE : BROTLI_FALSE)
56
+
57
+ #define BROTLI_MAKE_UINT64_T(high, low) ((((uint64_t)(high)) << 32) | low)
58
+
59
+ #define BROTLI_UINT32_MAX (~((uint32_t)0))
60
+ #define BROTLI_SIZE_MAX (~((size_t)0))
61
+
62
+ /**
63
+ * Allocating function pointer type.
64
+ *
65
+ * @param opaque custom memory manager handle provided by client
66
+ * @param size requested memory region size; can not be @c 0
67
+ * @returns @c 0 in the case of failure
68
+ * @returns a valid pointer to a memory region of at least @p size bytes
69
+ * long otherwise
70
+ */
71
+ typedef void* (*brotli_alloc_func)(void* opaque, size_t size);
72
+
73
+ /**
74
+ * Deallocating function pointer type.
75
+ *
76
+ * This function @b SHOULD do nothing if @p address is @c 0.
77
+ *
78
+ * @param opaque custom memory manager handle provided by client
79
+ * @param address memory region pointer returned by ::brotli_alloc_func, or @c 0
80
+ */
81
+ typedef void (*brotli_free_func)(void* opaque, void* address);
82
+
83
+ #endif /* BROTLI_COMMON_TYPES_H_ */
@@ -3,6 +3,7 @@ FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
3
3
  FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
4
4
  FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
5
5
  FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
6
+ FT_USE_MODULE( FT_Driver_ClassRec, hvf_driver_class )
6
7
  FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
7
8
  FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
8
9
  FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
@@ -334,6 +334,22 @@ FT_BEGIN_HEADER
334
334
  /* #define FT_CONFIG_OPTION_USE_BROTLI */
335
335
 
336
336
 
337
+ /**************************************************************************
338
+ *
339
+ * HVF support.
340
+ *
341
+ * FreeType can use Apple's HVF (Hierarchical Variable Font) library
342
+ * to render glyphs from fonts containing 'hvgl' tables.
343
+ *
344
+ * Define this macro if you want to enable this 'feature'.
345
+ *
346
+ * If you use a build system like cmake or the `configure` script,
347
+ * options set by those programs have precedence, overwriting the value
348
+ * here with the configured one.
349
+ */
350
+ /* #define FT_CONFIG_OPTION_HVF */
351
+
352
+
337
353
  /**************************************************************************
338
354
  *
339
355
  * Glyph Postscript Names handling
@@ -423,8 +439,10 @@ FT_BEGIN_HEADER
423
439
 
424
440
  /**************************************************************************
425
441
  *
426
- * The size in bytes of the render pool used by the scan-line converter to
427
- * do all of its work.
442
+ * The size in bytes of the stack render pool used by the scan-line
443
+ * converters. Use this option to limit the stack usage. The memory
444
+ * requirements are proportional to size and complexity of a given glyph.
445
+ * FreeType's rasterizers switch to dynamic allocations when necessary.
428
446
  */
429
447
  #define FT_RENDER_POOL_SIZE 16384L
430
448
 
@@ -651,6 +669,7 @@ FT_BEGIN_HEADER
651
669
  #define TT_CONFIG_CMAP_FORMAT_12
652
670
  #define TT_CONFIG_CMAP_FORMAT_13
653
671
  #define TT_CONFIG_CMAP_FORMAT_14
672
+ #define TT_CONFIG_CMAP_FORMAT_15
654
673
 
655
674
 
656
675
  /*************************************************************************/
@@ -756,6 +775,21 @@ FT_BEGIN_HEADER
756
775
  /* #define TT_CONFIG_OPTION_NO_BORING_EXPANSION */
757
776
 
758
777
 
778
+ /**************************************************************************
779
+ *
780
+ * Define `TT_CONFIG_OPTION_VARC` if you want to include support for
781
+ * variable composite glyphs (the 'VARC' table). This is part of the
782
+ * 'boring' OpenType specification expansions.
783
+ *
784
+ * https://github.com/harfbuzz/boring-expansion-spec/blob/main/VARC.md
785
+ *
786
+ * Variable composites enable more efficient encoding of variable glyphs
787
+ * by allowing glyphs to be composed from other glyphs with variable
788
+ * transformations and axis value overrides.
789
+ */
790
+ #define TT_CONFIG_OPTION_VARC
791
+
792
+
759
793
  /**************************************************************************
760
794
  *
761
795
  * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an
@@ -4134,7 +4134,7 @@ FT_BEGIN_HEADER
4134
4134
  * This function returns an error if the charmap is not part of the face
4135
4135
  * (i.e., if it is not listed in the `face->charmaps` table).
4136
4136
  *
4137
- * It also fails if an OpenType type~14 charmap is selected (which
4137
+ * It also fails if an OpenType type 14 or~15 charmap is selected (which
4138
4138
  * doesn't map character codes to glyph indices at all).
4139
4139
  */
4140
4140
  FT_EXPORT( FT_Error )
@@ -4700,7 +4700,7 @@ FT_BEGIN_HEADER
4700
4700
  *
4701
4701
  * @abstract:
4702
4702
  * The FreeType~2 interface to Unicode Variation Sequences (UVS), using
4703
- * the SFNT cmap format~14.
4703
+ * the SFNT cmap formats 14 and~15.
4704
4704
  *
4705
4705
  * @description:
4706
4706
  * Many characters, especially for CJK scripts, have variant forms. They
@@ -4730,9 +4730,10 @@ FT_BEGIN_HEADER
4730
4730
  * U+9089, you have to write the character sequence `U+9089 U+E0100`.
4731
4731
  *
4732
4732
  * Adobe and MS decided to support both standardized and ideographic VS
4733
- * with a new cmap subtable (format~14). It is an odd subtable because
4734
- * it is not a mapping of input code points to glyphs, but contains lists
4735
- * of all variations supported by the font.
4733
+ * with a new cmap subtable (format~14, or format~15 for glyph indices
4734
+ * above 65535). It is an odd subtable because it is not a mapping of
4735
+ * input code points to glyphs, but contains lists of all variations
4736
+ * supported by the font.
4736
4737
  *
4737
4738
  * A variation may be either 'default' or 'non-default' for a given font.
4738
4739
  * A default variation is the one you will get for that code point if you
@@ -5168,8 +5169,8 @@ FT_BEGIN_HEADER
5168
5169
  *
5169
5170
  */
5170
5171
  #define FREETYPE_MAJOR 2
5171
- #define FREETYPE_MINOR 14
5172
- #define FREETYPE_PATCH 3
5172
+ #define FREETYPE_MINOR 15
5173
+ #define FREETYPE_PATCH 0
5173
5174
 
5174
5175
 
5175
5176
  /**************************************************************************
@@ -471,7 +471,7 @@ FT_BEGIN_HEADER
471
471
 
472
472
  /* */
473
473
 
474
- #define FT_CURVE_TAG( flag ) ( flag & 0x03 )
474
+ #define FT_CURVE_TAG( flag ) ( ( flag & 0x01 ) ? 0x01 : ( flag & 0x03 ) )
475
475
 
476
476
  /* see the `tags` field in `FT_Outline` for a description of the values */
477
477
  #define FT_CURVE_TAG_ON 0x01
@@ -875,7 +875,7 @@ FT_BEGIN_HEADER
875
875
  */
876
876
  typedef struct FT_Span_
877
877
  {
878
- unsigned short x;
878
+ short x;
879
879
  unsigned short len;
880
880
  unsigned char coverage;
881
881
 
@@ -172,6 +172,7 @@
172
172
  FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
173
173
  FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" )
174
174
  FT_MODERRDEF( Sdf, 0x1700, "Signed distance field raster module" )
175
+ FT_MODERRDEF( HVF, 0x1800, "HVF module" )
175
176
 
176
177
 
177
178
  #ifdef FT_MODERR_END_LIST
@@ -25,8 +25,6 @@
25
25
  #include <freetype/ftsystem.h>
26
26
  #include <freetype/ftimage.h>
27
27
 
28
- #include <stddef.h>
29
-
30
28
 
31
29
  FT_BEGIN_HEADER
32
30