@ot-builder/io-bin-glyph-store 1.1.0 → 1.3.0

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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,361 @@
2
2
  "name": "@ot-builder/io-bin-glyph-store",
3
3
  "entries": [
4
4
  {
5
- "date": "Sun, 18 Jul 2021 02:11:53 GMT",
5
+ "date": "Sat, 16 Oct 2021 01:17:27 GMT",
6
+ "tag": "@ot-builder/io-bin-glyph-store_v1.3.0",
7
+ "version": "1.3.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@ot-builder/io-bin-glyph-store",
13
+ "comment": "Bump @ot-builder/bin-util to v1.3.0",
14
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@ot-builder/io-bin-glyph-store",
19
+ "comment": "Bump @ot-builder/common-impl to v1.3.0",
20
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ot-builder/io-bin-glyph-store",
25
+ "comment": "Bump @ot-builder/errors to v1.3.0",
26
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@ot-builder/io-bin-glyph-store",
31
+ "comment": "Bump @ot-builder/ot-glyphs to v1.3.0",
32
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@ot-builder/io-bin-glyph-store",
37
+ "comment": "Bump @ot-builder/ot-metadata to v1.3.0",
38
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@ot-builder/io-bin-glyph-store",
43
+ "comment": "Bump @ot-builder/io-bin-cff to v1.3.0",
44
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@ot-builder/io-bin-glyph-store",
49
+ "comment": "Bump @ot-builder/io-bin-metric to v1.3.0",
50
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@ot-builder/io-bin-glyph-store",
55
+ "comment": "Bump @ot-builder/io-bin-ttf to v1.3.0",
56
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@ot-builder/io-bin-glyph-store",
61
+ "comment": "Bump @ot-builder/prelude to v1.3.0",
62
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@ot-builder/io-bin-glyph-store",
67
+ "comment": "Bump @ot-builder/primitive to v1.3.0",
68
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@ot-builder/io-bin-glyph-store",
73
+ "comment": "Bump @ot-builder/stat-glyphs to v1.3.0",
74
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@ot-builder/io-bin-glyph-store",
79
+ "comment": "Bump @ot-builder/var-store to v1.3.0",
80
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@ot-builder/io-bin-glyph-store",
85
+ "comment": "Bump @ot-builder/variance to v1.3.0",
86
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@ot-builder/io-bin-glyph-store",
91
+ "comment": "Bump @ot-builder/ot-sfnt to v1.3.0",
92
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@ot-builder/io-bin-glyph-store",
97
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.3.0",
98
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@ot-builder/io-bin-glyph-store",
103
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.3.0",
104
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@ot-builder/io-bin-glyph-store",
109
+ "comment": "Bump @ot-builder/test-util to v1.3.0",
110
+ "commit": "1a40fcdec7a908d6498acd9a239f81236cd390c4"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ {
116
+ "date": "Sat, 09 Oct 2021 01:06:40 GMT",
117
+ "tag": "@ot-builder/io-bin-glyph-store_v1.2.0",
118
+ "version": "1.2.0",
119
+ "comments": {
120
+ "minor": [
121
+ {
122
+ "author": "otbbuilder-dev@users.noreply.github.com",
123
+ "package": "@ot-builder/io-bin-glyph-store",
124
+ "comment": "Add support for VTT private tables",
125
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@ot-builder/io-bin-glyph-store",
130
+ "comment": "Bump @ot-builder/bin-util to v1.2.0",
131
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@ot-builder/io-bin-glyph-store",
136
+ "comment": "Bump @ot-builder/common-impl to v1.2.0",
137
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
138
+ },
139
+ {
140
+ "author": "beachball",
141
+ "package": "@ot-builder/io-bin-glyph-store",
142
+ "comment": "Bump @ot-builder/errors to v1.2.0",
143
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
144
+ },
145
+ {
146
+ "author": "beachball",
147
+ "package": "@ot-builder/io-bin-glyph-store",
148
+ "comment": "Bump @ot-builder/ot-glyphs to v1.2.0",
149
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
150
+ },
151
+ {
152
+ "author": "beachball",
153
+ "package": "@ot-builder/io-bin-glyph-store",
154
+ "comment": "Bump @ot-builder/ot-metadata to v1.2.0",
155
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
156
+ },
157
+ {
158
+ "author": "beachball",
159
+ "package": "@ot-builder/io-bin-glyph-store",
160
+ "comment": "Bump @ot-builder/io-bin-cff to v1.2.0",
161
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
162
+ },
163
+ {
164
+ "author": "beachball",
165
+ "package": "@ot-builder/io-bin-glyph-store",
166
+ "comment": "Bump @ot-builder/io-bin-metric to v1.2.0",
167
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
168
+ },
169
+ {
170
+ "author": "beachball",
171
+ "package": "@ot-builder/io-bin-glyph-store",
172
+ "comment": "Bump @ot-builder/io-bin-ttf to v1.2.0",
173
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
174
+ },
175
+ {
176
+ "author": "beachball",
177
+ "package": "@ot-builder/io-bin-glyph-store",
178
+ "comment": "Bump @ot-builder/prelude to v1.2.0",
179
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
180
+ },
181
+ {
182
+ "author": "beachball",
183
+ "package": "@ot-builder/io-bin-glyph-store",
184
+ "comment": "Bump @ot-builder/primitive to v1.2.0",
185
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
186
+ },
187
+ {
188
+ "author": "beachball",
189
+ "package": "@ot-builder/io-bin-glyph-store",
190
+ "comment": "Bump @ot-builder/stat-glyphs to v1.2.0",
191
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
192
+ },
193
+ {
194
+ "author": "beachball",
195
+ "package": "@ot-builder/io-bin-glyph-store",
196
+ "comment": "Bump @ot-builder/var-store to v1.2.0",
197
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
198
+ },
199
+ {
200
+ "author": "beachball",
201
+ "package": "@ot-builder/io-bin-glyph-store",
202
+ "comment": "Bump @ot-builder/variance to v1.2.0",
203
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
204
+ },
205
+ {
206
+ "author": "beachball",
207
+ "package": "@ot-builder/io-bin-glyph-store",
208
+ "comment": "Bump @ot-builder/ot-sfnt to v1.2.0",
209
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
210
+ },
211
+ {
212
+ "author": "beachball",
213
+ "package": "@ot-builder/io-bin-glyph-store",
214
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.2.0",
215
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
216
+ },
217
+ {
218
+ "author": "beachball",
219
+ "package": "@ot-builder/io-bin-glyph-store",
220
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.2.0",
221
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
222
+ },
223
+ {
224
+ "author": "beachball",
225
+ "package": "@ot-builder/io-bin-glyph-store",
226
+ "comment": "Bump @ot-builder/test-util to v1.2.0",
227
+ "commit": "cd0361ffd9d2fc5081804b14f9bfddc7fe296008"
228
+ }
229
+ ]
230
+ }
231
+ },
232
+ {
233
+ "date": "Sat, 25 Sep 2021 01:08:03 GMT",
234
+ "tag": "@ot-builder/io-bin-glyph-store_v1.1.2",
235
+ "version": "1.1.2",
236
+ "comments": {
237
+ "patch": [
238
+ {
239
+ "author": "beachball",
240
+ "package": "@ot-builder/io-bin-glyph-store",
241
+ "comment": "Bump @ot-builder/bin-util to v1.1.2",
242
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
243
+ },
244
+ {
245
+ "author": "beachball",
246
+ "package": "@ot-builder/io-bin-glyph-store",
247
+ "comment": "Bump @ot-builder/common-impl to v1.1.2",
248
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
249
+ },
250
+ {
251
+ "author": "beachball",
252
+ "package": "@ot-builder/io-bin-glyph-store",
253
+ "comment": "Bump @ot-builder/errors to v1.1.2",
254
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
255
+ },
256
+ {
257
+ "author": "beachball",
258
+ "package": "@ot-builder/io-bin-glyph-store",
259
+ "comment": "Bump @ot-builder/ot-glyphs to v1.1.2",
260
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
261
+ },
262
+ {
263
+ "author": "beachball",
264
+ "package": "@ot-builder/io-bin-glyph-store",
265
+ "comment": "Bump @ot-builder/ot-metadata to v1.1.2",
266
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
267
+ },
268
+ {
269
+ "author": "beachball",
270
+ "package": "@ot-builder/io-bin-glyph-store",
271
+ "comment": "Bump @ot-builder/io-bin-cff to v1.1.2",
272
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
273
+ },
274
+ {
275
+ "author": "beachball",
276
+ "package": "@ot-builder/io-bin-glyph-store",
277
+ "comment": "Bump @ot-builder/io-bin-metric to v1.1.2",
278
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
279
+ },
280
+ {
281
+ "author": "beachball",
282
+ "package": "@ot-builder/io-bin-glyph-store",
283
+ "comment": "Bump @ot-builder/io-bin-ttf to v1.1.2",
284
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
285
+ },
286
+ {
287
+ "author": "beachball",
288
+ "package": "@ot-builder/io-bin-glyph-store",
289
+ "comment": "Bump @ot-builder/prelude to v1.1.2",
290
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
291
+ },
292
+ {
293
+ "author": "beachball",
294
+ "package": "@ot-builder/io-bin-glyph-store",
295
+ "comment": "Bump @ot-builder/primitive to v1.1.2",
296
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
297
+ },
298
+ {
299
+ "author": "beachball",
300
+ "package": "@ot-builder/io-bin-glyph-store",
301
+ "comment": "Bump @ot-builder/stat-glyphs to v1.1.2",
302
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
303
+ },
304
+ {
305
+ "author": "beachball",
306
+ "package": "@ot-builder/io-bin-glyph-store",
307
+ "comment": "Bump @ot-builder/var-store to v1.1.2",
308
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
309
+ },
310
+ {
311
+ "author": "beachball",
312
+ "package": "@ot-builder/io-bin-glyph-store",
313
+ "comment": "Bump @ot-builder/variance to v1.1.2",
314
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
315
+ },
316
+ {
317
+ "author": "beachball",
318
+ "package": "@ot-builder/io-bin-glyph-store",
319
+ "comment": "Bump @ot-builder/ot-sfnt to v1.1.2",
320
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
321
+ },
322
+ {
323
+ "author": "beachball",
324
+ "package": "@ot-builder/io-bin-glyph-store",
325
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.1.2",
326
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
327
+ },
328
+ {
329
+ "author": "beachball",
330
+ "package": "@ot-builder/io-bin-glyph-store",
331
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.1.2",
332
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
333
+ },
334
+ {
335
+ "author": "beachball",
336
+ "package": "@ot-builder/io-bin-glyph-store",
337
+ "comment": "Bump @ot-builder/test-util to v1.1.2",
338
+ "commit": "ef0cdbe0d09a64a7f2ed4f86c9158fa9d8fe699f"
339
+ }
340
+ ]
341
+ }
342
+ },
343
+ {
344
+ "date": "Sat, 11 Sep 2021 01:09:21 GMT",
345
+ "tag": "@ot-builder/io-bin-glyph-store_v1.1.1",
346
+ "version": "1.1.1",
347
+ "comments": {
348
+ "patch": [
349
+ {
350
+ "author": "otbbuilder-dev@users.noreply.github.com",
351
+ "package": "@ot-builder/io-bin-glyph-store",
352
+ "commit": "28bc4c48910f10dcabb090ab68e610ce499caa95",
353
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.1.1"
354
+ }
355
+ ]
356
+ }
357
+ },
358
+ {
359
+ "date": "Sun, 18 Jul 2021 02:14:19 GMT",
6
360
  "tag": "@ot-builder/io-bin-glyph-store_v1.1.0",
7
361
  "version": "1.1.0",
8
362
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,93 @@
1
1
  # Change Log - @ot-builder/io-bin-glyph-store
2
2
 
3
- This log was last generated on Sun, 18 Jul 2021 02:11:53 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 16 Oct 2021 01:17:27 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.3.0
8
+
9
+ Sat, 16 Oct 2021 01:17:27 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Bump @ot-builder/bin-util to v1.3.0
14
+ - Bump @ot-builder/common-impl to v1.3.0
15
+ - Bump @ot-builder/errors to v1.3.0
16
+ - Bump @ot-builder/ot-glyphs to v1.3.0
17
+ - Bump @ot-builder/ot-metadata to v1.3.0
18
+ - Bump @ot-builder/io-bin-cff to v1.3.0
19
+ - Bump @ot-builder/io-bin-metric to v1.3.0
20
+ - Bump @ot-builder/io-bin-ttf to v1.3.0
21
+ - Bump @ot-builder/prelude to v1.3.0
22
+ - Bump @ot-builder/primitive to v1.3.0
23
+ - Bump @ot-builder/stat-glyphs to v1.3.0
24
+ - Bump @ot-builder/var-store to v1.3.0
25
+ - Bump @ot-builder/variance to v1.3.0
26
+ - Bump @ot-builder/ot-sfnt to v1.3.0
27
+ - Bump @ot-builder/io-bin-sfnt to v1.3.0
28
+ - Bump @ot-builder/io-bin-metadata to v1.3.0
29
+ - Bump @ot-builder/test-util to v1.3.0
30
+
31
+ ## 1.2.0
32
+
33
+ Sat, 09 Oct 2021 01:06:40 GMT
34
+
35
+ ### Minor changes
36
+
37
+ - Add support for VTT private tables (otbbuilder-dev@users.noreply.github.com)
38
+ - Bump @ot-builder/bin-util to v1.2.0
39
+ - Bump @ot-builder/common-impl to v1.2.0
40
+ - Bump @ot-builder/errors to v1.2.0
41
+ - Bump @ot-builder/ot-glyphs to v1.2.0
42
+ - Bump @ot-builder/ot-metadata to v1.2.0
43
+ - Bump @ot-builder/io-bin-cff to v1.2.0
44
+ - Bump @ot-builder/io-bin-metric to v1.2.0
45
+ - Bump @ot-builder/io-bin-ttf to v1.2.0
46
+ - Bump @ot-builder/prelude to v1.2.0
47
+ - Bump @ot-builder/primitive to v1.2.0
48
+ - Bump @ot-builder/stat-glyphs to v1.2.0
49
+ - Bump @ot-builder/var-store to v1.2.0
50
+ - Bump @ot-builder/variance to v1.2.0
51
+ - Bump @ot-builder/ot-sfnt to v1.2.0
52
+ - Bump @ot-builder/io-bin-sfnt to v1.2.0
53
+ - Bump @ot-builder/io-bin-metadata to v1.2.0
54
+ - Bump @ot-builder/test-util to v1.2.0
55
+
56
+ ## 1.1.2
57
+
58
+ Sat, 25 Sep 2021 01:08:03 GMT
59
+
60
+ ### Patches
61
+
62
+ - Bump @ot-builder/bin-util to v1.1.2
63
+ - Bump @ot-builder/common-impl to v1.1.2
64
+ - Bump @ot-builder/errors to v1.1.2
65
+ - Bump @ot-builder/ot-glyphs to v1.1.2
66
+ - Bump @ot-builder/ot-metadata to v1.1.2
67
+ - Bump @ot-builder/io-bin-cff to v1.1.2
68
+ - Bump @ot-builder/io-bin-metric to v1.1.2
69
+ - Bump @ot-builder/io-bin-ttf to v1.1.2
70
+ - Bump @ot-builder/prelude to v1.1.2
71
+ - Bump @ot-builder/primitive to v1.1.2
72
+ - Bump @ot-builder/stat-glyphs to v1.1.2
73
+ - Bump @ot-builder/var-store to v1.1.2
74
+ - Bump @ot-builder/variance to v1.1.2
75
+ - Bump @ot-builder/ot-sfnt to v1.1.2
76
+ - Bump @ot-builder/io-bin-sfnt to v1.1.2
77
+ - Bump @ot-builder/io-bin-metadata to v1.1.2
78
+ - Bump @ot-builder/test-util to v1.1.2
79
+
80
+ ## 1.1.1
81
+
82
+ Sat, 11 Sep 2021 01:09:21 GMT
83
+
84
+ ### Patches
85
+
86
+ - Bump @ot-builder/io-bin-glyph-store to v1.1.1 (otbbuilder-dev@users.noreply.github.com)
87
+
7
88
  ## 1.1.0
8
89
 
9
- Sun, 18 Jul 2021 02:11:53 GMT
90
+ Sun, 18 Jul 2021 02:14:19 GMT
10
91
 
11
92
  ### Minor changes
12
93
 
@@ -7,10 +7,10 @@ const read_1 = require("../shared-metrics/read");
7
7
  function readGlyphStore(sfnt, cfg, md, gsf, cb) {
8
8
  const { head, maxp, fvar, hhea, vhea } = md;
9
9
  const designSpace = fvar ? fvar.getDesignSpace() : null;
10
- const hor = read_1.readHMetric(sfnt, maxp, hhea, designSpace);
10
+ const hor = (0, read_1.readHMetric)(sfnt, maxp, hhea, designSpace);
11
11
  const hmStartsAtZero = !!(head.flags & ot_metadata_1.Head.Flags.LeftSidebearingAtX0);
12
12
  let coStat = new stat_glyphs_1.HmtxCoStat(hmStartsAtZero, hor.hmtx, hor.hvar);
13
- const ver = read_1.readVMetric(sfnt, maxp, vhea, designSpace);
13
+ const ver = (0, read_1.readVMetric)(sfnt, maxp, vhea, designSpace);
14
14
  if (ver)
15
15
  coStat = new stat_glyphs_1.VmtxCoStat(ver.vmtx, ver.vvar, ver.vorg, coStat);
16
16
  const glyphs = gsf.createStoreFromSize(maxp.numGlyphs);
@@ -1,18 +1,22 @@
1
1
  import { SfntIoTableSink } from "@ot-builder/io-bin-sfnt";
2
+ import { TtfWritingExtraInfoSink } from "@ot-builder/io-bin-ttf";
2
3
  import { OtGlyph } from "@ot-builder/ot-glyphs";
3
4
  import { Head, Maxp, OtFontMetadata } from "@ot-builder/ot-metadata";
4
5
  import { Data } from "@ot-builder/prelude";
5
6
  import { OtVar } from "@ot-builder/variance";
6
7
  import { GlyphStoreCfg } from "../cfg/glyph-store-cfg";
8
+ export interface GlyphStoreWriteExtraInfoSink extends TtfWritingExtraInfoSink {
9
+ }
7
10
  export declare type GlyphStoreWriteImplCtx = {
8
11
  head: Head.Table;
9
12
  maxp: Maxp.Table;
10
13
  designSpace?: Data.Maybe<OtVar.DesignSpace>;
11
14
  stat: OtGlyph.Stat.Sink;
15
+ extraInfoSink: GlyphStoreWriteExtraInfoSink;
12
16
  };
13
17
  export interface WriteGlyphStoreImpl<C, T> {
14
18
  readonly writeMetricVariance: boolean;
15
19
  writeGlyphs(sink: SfntIoTableSink, cfg: C, coGlyphs: T, gOrd: Data.Order<OtGlyph>, ctx: GlyphStoreWriteImplCtx): void;
16
20
  }
17
- export declare function writeGlyphStore<C, T>(sink: SfntIoTableSink, cfg: C & GlyphStoreCfg, md: OtFontMetadata, coGlyphs: T, gOrd: Data.Order<OtGlyph>, cb: WriteGlyphStoreImpl<C, T>): void;
21
+ export declare function writeGlyphStore<C, T>(sink: SfntIoTableSink, cfg: C & GlyphStoreCfg, md: OtFontMetadata, coGlyphs: T, gOrd: Data.Order<OtGlyph>, extraInfoSink: GlyphStoreWriteExtraInfoSink, cb: WriteGlyphStoreImpl<C, T>): void;
18
22
  //# sourceMappingURL=write.d.ts.map
@@ -11,7 +11,7 @@ cfg,
11
11
  // inOut
12
12
  md,
13
13
  // in
14
- coGlyphs, gOrd, cb) {
14
+ coGlyphs, gOrd, extraInfoSink, cb) {
15
15
  const { head, maxp, fvar, os2, hhea, vhea } = md;
16
16
  const designSpace = fvar ? fvar.getDesignSpace() : null;
17
17
  // stat stages
@@ -29,11 +29,17 @@ coGlyphs, gOrd, cb) {
29
29
  stat = statVmtx;
30
30
  // Build glyphs and co-glyphs
31
31
  stat.setNumGlyphs(gOrd.length);
32
- cb.writeGlyphs(sink, cfg, coGlyphs, gOrd, { head, maxp, designSpace: designSpace, stat });
32
+ cb.writeGlyphs(sink, cfg, coGlyphs, gOrd, {
33
+ head,
34
+ maxp,
35
+ designSpace: designSpace,
36
+ stat,
37
+ extraInfoSink
38
+ });
33
39
  stat.settle();
34
40
  // Write metrics
35
- write_1.writeHMetrics(sink, cb.writeMetricVariance, hhea, statHmtx, gOrd, designSpace);
36
- write_1.writeVMetrics(sink, cb.writeMetricVariance, vhea, statVmtx, gOrd, designSpace);
41
+ (0, write_1.writeHMetrics)(sink, cb.writeMetricVariance, hhea, statHmtx, gOrd, designSpace);
42
+ (0, write_1.writeVMetrics)(sink, cb.writeMetricVariance, vhea, statVmtx, gOrd, designSpace);
37
43
  }
38
44
  exports.writeGlyphStore = writeGlyphStore;
39
45
  //# sourceMappingURL=write.js.map
package/lib/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  export { readGlyphStore } from "./general/read";
2
- export { writeGlyphStore } from "./general/write";
2
+ export { writeGlyphStore, GlyphStoreWriteExtraInfoSink } from "./general/write";
3
3
  export { ReadCffGlyphs, WriteCffGlyphs } from "./cff/index";
4
4
  export { ReadTtfGlyphs, WriteTtfGlyphs } from "./ttf/index";
5
5
  export { SkipReadGlyphs, SkipWriteGlyphs } from "./empty/index";
6
+ export { NopTtfWritingExtraInfoSink } from "@ot-builder/io-bin-ttf";
6
7
  export { TtfCfgProps, TtfCfg, TtfCfgPt, DefaultTtfCfgProps } from "@ot-builder/io-bin-ttf";
7
8
  export { CffCfgProps, CffCfg, CffCfgPt, DefaultCffCfgProps } from "@ot-builder/io-bin-cff";
8
9
  export * from "./cfg/glyph-store-cfg";
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultCffCfgProps = exports.DefaultTtfCfgProps = exports.SkipWriteGlyphs = exports.SkipReadGlyphs = exports.WriteTtfGlyphs = exports.ReadTtfGlyphs = exports.WriteCffGlyphs = exports.ReadCffGlyphs = exports.writeGlyphStore = exports.readGlyphStore = void 0;
3
+ exports.DefaultCffCfgProps = exports.DefaultTtfCfgProps = exports.NopTtfWritingExtraInfoSink = exports.SkipWriteGlyphs = exports.SkipReadGlyphs = exports.WriteTtfGlyphs = exports.ReadTtfGlyphs = exports.WriteCffGlyphs = exports.ReadCffGlyphs = exports.writeGlyphStore = exports.readGlyphStore = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var read_1 = require("./general/read");
6
6
  Object.defineProperty(exports, "readGlyphStore", { enumerable: true, get: function () { return read_1.readGlyphStore; } });
@@ -16,8 +16,10 @@ var index_3 = require("./empty/index");
16
16
  Object.defineProperty(exports, "SkipReadGlyphs", { enumerable: true, get: function () { return index_3.SkipReadGlyphs; } });
17
17
  Object.defineProperty(exports, "SkipWriteGlyphs", { enumerable: true, get: function () { return index_3.SkipWriteGlyphs; } });
18
18
  var io_bin_ttf_1 = require("@ot-builder/io-bin-ttf");
19
- Object.defineProperty(exports, "DefaultTtfCfgProps", { enumerable: true, get: function () { return io_bin_ttf_1.DefaultTtfCfgProps; } });
19
+ Object.defineProperty(exports, "NopTtfWritingExtraInfoSink", { enumerable: true, get: function () { return io_bin_ttf_1.NopTtfWritingExtraInfoSink; } });
20
+ var io_bin_ttf_2 = require("@ot-builder/io-bin-ttf");
21
+ Object.defineProperty(exports, "DefaultTtfCfgProps", { enumerable: true, get: function () { return io_bin_ttf_2.DefaultTtfCfgProps; } });
20
22
  var io_bin_cff_1 = require("@ot-builder/io-bin-cff");
21
23
  Object.defineProperty(exports, "DefaultCffCfgProps", { enumerable: true, get: function () { return io_bin_cff_1.DefaultCffCfgProps; } });
22
- tslib_1.__exportStar(require("./cfg/glyph-store-cfg"), exports);
24
+ (0, tslib_1.__exportStar)(require("./cfg/glyph-store-cfg"), exports);
23
25
  //# sourceMappingURL=index.js.map
package/lib/ttf/index.js CHANGED
@@ -24,7 +24,7 @@ exports.ReadTtfGlyphs = {
24
24
  };
25
25
  const gvar = new bin_util_1.BinaryView(bGvar).next(io_bin_ttf_1.Gvar.Read, gOrd, cfg, gvarIgnore, ctx.designSpace);
26
26
  }
27
- io_bin_ttf_1.rectifyGlyphOrder(gOrd);
27
+ (0, io_bin_ttf_1.rectifyGlyphOrder)(gOrd);
28
28
  // Co-glyphs
29
29
  const cog = {};
30
30
  const bFpgm = sfnt.tables.get(ot_glyphs_1.Fpgm.Tag);
@@ -66,7 +66,7 @@ exports.WriteTtfGlyphs = {
66
66
  sfnt.add(io_bin_ttf_1.Gvar.Tag, bGvar);
67
67
  }
68
68
  const loca1 = { glyphOffsets: [] };
69
- const bufGlyf = bin_util_1.Frag.packFrom(io_bin_ttf_1.Glyf.Write, gOrd, loca1, ctx.stat);
69
+ const bufGlyf = bin_util_1.Frag.packFrom(io_bin_ttf_1.Glyf.Write, gOrd, loca1, ctx.stat, ctx.extraInfoSink);
70
70
  sfnt.add(io_bin_ttf_1.Glyf.Tag, bufGlyf);
71
71
  const bufLoca = bin_util_1.Frag.packFrom(io_bin_ttf_1.Loca.Io, loca1, ctx.head);
72
72
  sfnt.add(io_bin_ttf_1.Loca.Tag, bufLoca);
package/package.json CHANGED
@@ -1,10 +1,20 @@
1
1
  {
2
2
  "name": "@ot-builder/io-bin-glyph-store",
3
3
  "description": "",
4
- "version": "1.1.0",
4
+ "version": "1.3.0",
5
5
  "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/ot-builder/monorepo.git",
9
+ "directory": "packages/io-bin-glyph-store"
10
+ },
6
11
  "main": "./lib/index.js",
7
12
  "types": "./lib/index.d.ts",
13
+ "files": [
14
+ "lib/**/*.js",
15
+ "lib/**/*.json",
16
+ "lib/**/*.d.ts"
17
+ ],
8
18
  "scripts": {
9
19
  "build": "tsc -b ./tsconfig.package.json",
10
20
  "clean": "rimraf lib .cache",
@@ -14,26 +24,26 @@
14
24
  "access": "public"
15
25
  },
16
26
  "dependencies": {
17
- "@ot-builder/bin-util": "1.1.0",
18
- "@ot-builder/common-impl": "1.1.0",
19
- "@ot-builder/errors": "1.1.0",
20
- "@ot-builder/ot-glyphs": "1.1.0",
21
- "@ot-builder/ot-metadata": "1.1.0",
22
- "@ot-builder/io-bin-cff": "1.1.0",
23
- "@ot-builder/io-bin-metric": "1.1.0",
24
- "@ot-builder/io-bin-ttf": "1.1.0",
25
- "@ot-builder/prelude": "1.1.0",
26
- "@ot-builder/primitive": "1.1.0",
27
- "@ot-builder/stat-glyphs": "1.1.0",
28
- "@ot-builder/var-store": "1.1.0",
29
- "@ot-builder/variance": "1.1.0",
30
- "@ot-builder/ot-sfnt": "1.1.0",
31
- "@ot-builder/io-bin-sfnt": "1.1.0",
27
+ "@ot-builder/bin-util": "1.3.0",
28
+ "@ot-builder/common-impl": "1.3.0",
29
+ "@ot-builder/errors": "1.3.0",
30
+ "@ot-builder/ot-glyphs": "1.3.0",
31
+ "@ot-builder/ot-metadata": "1.3.0",
32
+ "@ot-builder/io-bin-cff": "1.3.0",
33
+ "@ot-builder/io-bin-metric": "1.3.0",
34
+ "@ot-builder/io-bin-ttf": "1.3.0",
35
+ "@ot-builder/prelude": "1.3.0",
36
+ "@ot-builder/primitive": "1.3.0",
37
+ "@ot-builder/stat-glyphs": "1.3.0",
38
+ "@ot-builder/var-store": "1.3.0",
39
+ "@ot-builder/variance": "1.3.0",
40
+ "@ot-builder/ot-sfnt": "1.3.0",
41
+ "@ot-builder/io-bin-sfnt": "1.3.0",
32
42
  "tslib": "^2.0.0"
33
43
  },
34
44
  "devDependencies": {
35
- "@ot-builder/io-bin-metadata": "1.1.0",
36
- "@ot-builder/test-util": "1.1.0",
45
+ "@ot-builder/io-bin-metadata": "1.3.0",
46
+ "@ot-builder/test-util": "1.3.0",
37
47
  "@types/jest": "^26.0.23",
38
48
  "jest": "^27.0.6"
39
49
  }