@ot-builder/io-bin-layout 1.3.1 → 1.4.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,376 @@
2
2
  "name": "@ot-builder/io-bin-layout",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 13 Nov 2021 01:04:53 GMT",
5
+ "date": "Sat, 26 Feb 2022 01:26:05 GMT",
6
+ "tag": "@ot-builder/io-bin-layout_v1.4.0",
7
+ "version": "1.4.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "otbbuilder-dev@users.noreply.github.com",
12
+ "package": "@ot-builder/io-bin-layout",
13
+ "commit": "d5ef5ade3424ec81b7545c9967badddeb9cc8f1b",
14
+ "comment": "Enhance OTBCLI with better subset, drop and transform-glyphs"
15
+ },
16
+ {
17
+ "author": "otbbuilder-dev@users.noreply.github.com",
18
+ "package": "@ot-builder/io-bin-layout",
19
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59",
20
+ "comment": "Export Ot.GeometryUtil"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ot-builder/io-bin-layout",
25
+ "comment": "Bump @ot-builder/bin-composite-types to v1.4.0",
26
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@ot-builder/io-bin-layout",
31
+ "comment": "Bump @ot-builder/bin-util to v1.4.0",
32
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@ot-builder/io-bin-layout",
37
+ "comment": "Bump @ot-builder/errors to v1.4.0",
38
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@ot-builder/io-bin-layout",
43
+ "comment": "Bump @ot-builder/ot-glyphs to v1.4.0",
44
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@ot-builder/io-bin-layout",
49
+ "comment": "Bump @ot-builder/ot-layout to v1.4.0",
50
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@ot-builder/io-bin-layout",
55
+ "comment": "Bump @ot-builder/ot-metadata to v1.4.0",
56
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@ot-builder/io-bin-layout",
61
+ "comment": "Bump @ot-builder/prelude to v1.4.0",
62
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@ot-builder/io-bin-layout",
67
+ "comment": "Bump @ot-builder/primitive to v1.4.0",
68
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@ot-builder/io-bin-layout",
73
+ "comment": "Bump @ot-builder/var-store to v1.4.0",
74
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@ot-builder/io-bin-layout",
79
+ "comment": "Bump @ot-builder/variance to v1.4.0",
80
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@ot-builder/io-bin-layout",
85
+ "comment": "Bump @ot-builder/common-impl to v1.4.0",
86
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@ot-builder/io-bin-layout",
91
+ "comment": "Bump @ot-builder/ot-sfnt to v1.4.0",
92
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@ot-builder/io-bin-layout",
97
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.4.0",
98
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@ot-builder/io-bin-layout",
103
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.4.0",
104
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@ot-builder/io-bin-layout",
109
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.4.0",
110
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
111
+ },
112
+ {
113
+ "author": "beachball",
114
+ "package": "@ot-builder/io-bin-layout",
115
+ "comment": "Bump @ot-builder/ot-encoding to v1.4.0",
116
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
117
+ },
118
+ {
119
+ "author": "beachball",
120
+ "package": "@ot-builder/io-bin-layout",
121
+ "comment": "Bump @ot-builder/io-bin-encoding to v1.4.0",
122
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
123
+ },
124
+ {
125
+ "author": "beachball",
126
+ "package": "@ot-builder/io-bin-layout",
127
+ "comment": "Bump @ot-builder/test-util to v1.4.0",
128
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
129
+ }
130
+ ]
131
+ }
132
+ },
133
+ {
134
+ "date": "Sat, 18 Dec 2021 01:19:54 GMT",
135
+ "tag": "@ot-builder/io-bin-layout_v1.3.3",
136
+ "version": "1.3.3",
137
+ "comments": {
138
+ "patch": [
139
+ {
140
+ "author": "otbbuilder-dev@users.noreply.github.com",
141
+ "package": "@ot-builder/io-bin-layout",
142
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71",
143
+ "comment": "Optimize frag unifier"
144
+ },
145
+ {
146
+ "author": "beachball",
147
+ "package": "@ot-builder/io-bin-layout",
148
+ "comment": "Bump @ot-builder/bin-composite-types to v1.3.3",
149
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
150
+ },
151
+ {
152
+ "author": "beachball",
153
+ "package": "@ot-builder/io-bin-layout",
154
+ "comment": "Bump @ot-builder/bin-util to v1.3.3",
155
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
156
+ },
157
+ {
158
+ "author": "beachball",
159
+ "package": "@ot-builder/io-bin-layout",
160
+ "comment": "Bump @ot-builder/errors to v1.3.3",
161
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
162
+ },
163
+ {
164
+ "author": "beachball",
165
+ "package": "@ot-builder/io-bin-layout",
166
+ "comment": "Bump @ot-builder/ot-glyphs to v1.3.3",
167
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
168
+ },
169
+ {
170
+ "author": "beachball",
171
+ "package": "@ot-builder/io-bin-layout",
172
+ "comment": "Bump @ot-builder/ot-layout to v1.3.3",
173
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
174
+ },
175
+ {
176
+ "author": "beachball",
177
+ "package": "@ot-builder/io-bin-layout",
178
+ "comment": "Bump @ot-builder/ot-metadata to v1.3.3",
179
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
180
+ },
181
+ {
182
+ "author": "beachball",
183
+ "package": "@ot-builder/io-bin-layout",
184
+ "comment": "Bump @ot-builder/prelude to v1.3.3",
185
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
186
+ },
187
+ {
188
+ "author": "beachball",
189
+ "package": "@ot-builder/io-bin-layout",
190
+ "comment": "Bump @ot-builder/primitive to v1.3.3",
191
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
192
+ },
193
+ {
194
+ "author": "beachball",
195
+ "package": "@ot-builder/io-bin-layout",
196
+ "comment": "Bump @ot-builder/var-store to v1.3.3",
197
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
198
+ },
199
+ {
200
+ "author": "beachball",
201
+ "package": "@ot-builder/io-bin-layout",
202
+ "comment": "Bump @ot-builder/variance to v1.3.3",
203
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
204
+ },
205
+ {
206
+ "author": "beachball",
207
+ "package": "@ot-builder/io-bin-layout",
208
+ "comment": "Bump @ot-builder/common-impl to v1.3.3",
209
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
210
+ },
211
+ {
212
+ "author": "beachball",
213
+ "package": "@ot-builder/io-bin-layout",
214
+ "comment": "Bump @ot-builder/ot-sfnt to v1.3.3",
215
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
216
+ },
217
+ {
218
+ "author": "beachball",
219
+ "package": "@ot-builder/io-bin-layout",
220
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.3.3",
221
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
222
+ },
223
+ {
224
+ "author": "beachball",
225
+ "package": "@ot-builder/io-bin-layout",
226
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.3.3",
227
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
228
+ },
229
+ {
230
+ "author": "beachball",
231
+ "package": "@ot-builder/io-bin-layout",
232
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.3.3",
233
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
234
+ },
235
+ {
236
+ "author": "beachball",
237
+ "package": "@ot-builder/io-bin-layout",
238
+ "comment": "Bump @ot-builder/ot-encoding to v1.3.3",
239
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
240
+ },
241
+ {
242
+ "author": "beachball",
243
+ "package": "@ot-builder/io-bin-layout",
244
+ "comment": "Bump @ot-builder/io-bin-encoding to v1.3.3",
245
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
246
+ },
247
+ {
248
+ "author": "beachball",
249
+ "package": "@ot-builder/io-bin-layout",
250
+ "comment": "Bump @ot-builder/test-util to v1.3.3",
251
+ "commit": "df0486c2b6942815176c652a3150870ba8eacc71"
252
+ }
253
+ ]
254
+ }
255
+ },
256
+ {
257
+ "date": "Sat, 11 Dec 2021 01:10:33 GMT",
258
+ "tag": "@ot-builder/io-bin-layout_v1.3.2",
259
+ "version": "1.3.2",
260
+ "comments": {
261
+ "patch": [
262
+ {
263
+ "author": "beachball",
264
+ "package": "@ot-builder/io-bin-layout",
265
+ "comment": "Bump @ot-builder/bin-composite-types to v1.3.2",
266
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
267
+ },
268
+ {
269
+ "author": "beachball",
270
+ "package": "@ot-builder/io-bin-layout",
271
+ "comment": "Bump @ot-builder/bin-util to v1.3.2",
272
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
273
+ },
274
+ {
275
+ "author": "beachball",
276
+ "package": "@ot-builder/io-bin-layout",
277
+ "comment": "Bump @ot-builder/errors to v1.3.2",
278
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
279
+ },
280
+ {
281
+ "author": "beachball",
282
+ "package": "@ot-builder/io-bin-layout",
283
+ "comment": "Bump @ot-builder/ot-glyphs to v1.3.2",
284
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
285
+ },
286
+ {
287
+ "author": "beachball",
288
+ "package": "@ot-builder/io-bin-layout",
289
+ "comment": "Bump @ot-builder/ot-layout to v1.3.2",
290
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
291
+ },
292
+ {
293
+ "author": "beachball",
294
+ "package": "@ot-builder/io-bin-layout",
295
+ "comment": "Bump @ot-builder/ot-metadata to v1.3.2",
296
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
297
+ },
298
+ {
299
+ "author": "beachball",
300
+ "package": "@ot-builder/io-bin-layout",
301
+ "comment": "Bump @ot-builder/prelude to v1.3.2",
302
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
303
+ },
304
+ {
305
+ "author": "beachball",
306
+ "package": "@ot-builder/io-bin-layout",
307
+ "comment": "Bump @ot-builder/primitive to v1.3.2",
308
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
309
+ },
310
+ {
311
+ "author": "beachball",
312
+ "package": "@ot-builder/io-bin-layout",
313
+ "comment": "Bump @ot-builder/var-store to v1.3.2",
314
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
315
+ },
316
+ {
317
+ "author": "beachball",
318
+ "package": "@ot-builder/io-bin-layout",
319
+ "comment": "Bump @ot-builder/variance to v1.3.2",
320
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
321
+ },
322
+ {
323
+ "author": "beachball",
324
+ "package": "@ot-builder/io-bin-layout",
325
+ "comment": "Bump @ot-builder/common-impl to v1.3.2",
326
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
327
+ },
328
+ {
329
+ "author": "beachball",
330
+ "package": "@ot-builder/io-bin-layout",
331
+ "comment": "Bump @ot-builder/ot-sfnt to v1.3.2",
332
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
333
+ },
334
+ {
335
+ "author": "beachball",
336
+ "package": "@ot-builder/io-bin-layout",
337
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.3.2",
338
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
339
+ },
340
+ {
341
+ "author": "beachball",
342
+ "package": "@ot-builder/io-bin-layout",
343
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.3.2",
344
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
345
+ },
346
+ {
347
+ "author": "beachball",
348
+ "package": "@ot-builder/io-bin-layout",
349
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.3.2",
350
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
351
+ },
352
+ {
353
+ "author": "beachball",
354
+ "package": "@ot-builder/io-bin-layout",
355
+ "comment": "Bump @ot-builder/ot-encoding to v1.3.2",
356
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
357
+ },
358
+ {
359
+ "author": "beachball",
360
+ "package": "@ot-builder/io-bin-layout",
361
+ "comment": "Bump @ot-builder/io-bin-encoding to v1.3.2",
362
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
363
+ },
364
+ {
365
+ "author": "beachball",
366
+ "package": "@ot-builder/io-bin-layout",
367
+ "comment": "Bump @ot-builder/test-util to v1.3.2",
368
+ "commit": "16fbf473bb09d152080e6f8eaca772f2bf20299f"
369
+ }
370
+ ]
371
+ }
372
+ },
373
+ {
374
+ "date": "Sat, 13 Nov 2021 01:06:17 GMT",
6
375
  "tag": "@ot-builder/io-bin-layout_v1.3.1",
7
376
  "version": "1.3.1",
8
377
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,90 @@
1
1
  # Change Log - @ot-builder/io-bin-layout
2
2
 
3
- This log was last generated on Sat, 13 Nov 2021 01:04:53 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 26 Feb 2022 01:26:05 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.4.0
8
+
9
+ Sat, 26 Feb 2022 01:26:05 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Enhance OTBCLI with better subset, drop and transform-glyphs (otbbuilder-dev@users.noreply.github.com)
14
+ - Export Ot.GeometryUtil (otbbuilder-dev@users.noreply.github.com)
15
+ - Bump @ot-builder/bin-composite-types to v1.4.0
16
+ - Bump @ot-builder/bin-util to v1.4.0
17
+ - Bump @ot-builder/errors to v1.4.0
18
+ - Bump @ot-builder/ot-glyphs to v1.4.0
19
+ - Bump @ot-builder/ot-layout to v1.4.0
20
+ - Bump @ot-builder/ot-metadata to v1.4.0
21
+ - Bump @ot-builder/prelude to v1.4.0
22
+ - Bump @ot-builder/primitive to v1.4.0
23
+ - Bump @ot-builder/var-store to v1.4.0
24
+ - Bump @ot-builder/variance to v1.4.0
25
+ - Bump @ot-builder/common-impl to v1.4.0
26
+ - Bump @ot-builder/ot-sfnt to v1.4.0
27
+ - Bump @ot-builder/io-bin-sfnt to v1.4.0
28
+ - Bump @ot-builder/io-bin-glyph-store to v1.4.0
29
+ - Bump @ot-builder/io-bin-metadata to v1.4.0
30
+ - Bump @ot-builder/ot-encoding to v1.4.0
31
+ - Bump @ot-builder/io-bin-encoding to v1.4.0
32
+ - Bump @ot-builder/test-util to v1.4.0
33
+
34
+ ## 1.3.3
35
+
36
+ Sat, 18 Dec 2021 01:19:54 GMT
37
+
38
+ ### Patches
39
+
40
+ - Optimize frag unifier (otbbuilder-dev@users.noreply.github.com)
41
+ - Bump @ot-builder/bin-composite-types to v1.3.3
42
+ - Bump @ot-builder/bin-util to v1.3.3
43
+ - Bump @ot-builder/errors to v1.3.3
44
+ - Bump @ot-builder/ot-glyphs to v1.3.3
45
+ - Bump @ot-builder/ot-layout to v1.3.3
46
+ - Bump @ot-builder/ot-metadata to v1.3.3
47
+ - Bump @ot-builder/prelude to v1.3.3
48
+ - Bump @ot-builder/primitive to v1.3.3
49
+ - Bump @ot-builder/var-store to v1.3.3
50
+ - Bump @ot-builder/variance to v1.3.3
51
+ - Bump @ot-builder/common-impl to v1.3.3
52
+ - Bump @ot-builder/ot-sfnt to v1.3.3
53
+ - Bump @ot-builder/io-bin-sfnt to v1.3.3
54
+ - Bump @ot-builder/io-bin-glyph-store to v1.3.3
55
+ - Bump @ot-builder/io-bin-metadata to v1.3.3
56
+ - Bump @ot-builder/ot-encoding to v1.3.3
57
+ - Bump @ot-builder/io-bin-encoding to v1.3.3
58
+ - Bump @ot-builder/test-util to v1.3.3
59
+
60
+ ## 1.3.2
61
+
62
+ Sat, 11 Dec 2021 01:10:33 GMT
63
+
64
+ ### Patches
65
+
66
+ - Bump @ot-builder/bin-composite-types to v1.3.2
67
+ - Bump @ot-builder/bin-util to v1.3.2
68
+ - Bump @ot-builder/errors to v1.3.2
69
+ - Bump @ot-builder/ot-glyphs to v1.3.2
70
+ - Bump @ot-builder/ot-layout to v1.3.2
71
+ - Bump @ot-builder/ot-metadata to v1.3.2
72
+ - Bump @ot-builder/prelude to v1.3.2
73
+ - Bump @ot-builder/primitive to v1.3.2
74
+ - Bump @ot-builder/var-store to v1.3.2
75
+ - Bump @ot-builder/variance to v1.3.2
76
+ - Bump @ot-builder/common-impl to v1.3.2
77
+ - Bump @ot-builder/ot-sfnt to v1.3.2
78
+ - Bump @ot-builder/io-bin-sfnt to v1.3.2
79
+ - Bump @ot-builder/io-bin-glyph-store to v1.3.2
80
+ - Bump @ot-builder/io-bin-metadata to v1.3.2
81
+ - Bump @ot-builder/ot-encoding to v1.3.2
82
+ - Bump @ot-builder/io-bin-encoding to v1.3.2
83
+ - Bump @ot-builder/test-util to v1.3.2
84
+
7
85
  ## 1.3.1
8
86
 
9
- Sat, 13 Nov 2021 01:04:53 GMT
87
+ Sat, 13 Nov 2021 01:06:17 GMT
10
88
 
11
89
  ### Patches
12
90
 
@@ -39,7 +39,7 @@ function postReadCaretList(glyph, carets) {
39
39
  function computeCaretXFromPointAttachment(glyph, caret) {
40
40
  if (!caret.pointAttachment)
41
41
  return caret;
42
- const glyphPoints = ot_glyphs_1.OtGeometryHandler.stat(ot_glyphs_1.OtGeometryHandler.ListPoint, glyph.geometry);
42
+ const glyphPoints = ot_glyphs_1.OtGeometryUtil.apply(ot_glyphs_1.OtGeometryUtil.ListPoint, glyph.geometry);
43
43
  if (!glyphPoints || caret.pointAttachment.pointIndex >= glyphPoints.length)
44
44
  return caret;
45
45
  return { ...caret, x: glyphPoints[caret.pointAttachment.pointIndex].x };
package/lib/main/write.js CHANGED
@@ -20,14 +20,16 @@ otl, cfg, gOrd, md) {
20
20
  let { gsub, gpos, gdef } = otl;
21
21
  const designSpace = md.fvar ? md.fvar.getDesignSpace() : null;
22
22
  const ivs = md.fvar ? var_store_1.WriteTimeIVS.create(new variance_1.OtVar.MasterSet()) : null;
23
- if (ivs && !gdef)
24
- gdef = new ot_layout_1.Gdef.Table();
25
23
  const stat = md.os2 ? new stat_1.Os2MaxContextStat(md.os2) : new stat_1.EmptyStat();
26
- const twc = { gOrd, gdef, designSpace, ivs, stat };
27
- if (gsub)
28
- outSink.add(ot_layout_1.Gsub.Tag, bin_util_1.Frag.packFrom(gsub_1.GsubTableIo, gsub, cfg, twc));
29
- if (gpos)
30
- outSink.add(ot_layout_1.Gpos.Tag, bin_util_1.Frag.packFrom(gpos_1.GposTableIo, gpos, cfg, twc));
24
+ if (gsub || gpos) {
25
+ if (ivs && !gdef)
26
+ gdef = new ot_layout_1.Gdef.Table();
27
+ const twc = { gOrd, gdef, designSpace, ivs, stat };
28
+ if (gsub)
29
+ outSink.add(ot_layout_1.Gsub.Tag, bin_util_1.Frag.packFrom(gsub_1.GsubTableIo, gsub, cfg, twc));
30
+ if (gpos)
31
+ outSink.add(ot_layout_1.Gpos.Tag, bin_util_1.Frag.packFrom(gpos_1.GposTableIo, gpos, cfg, twc));
32
+ }
31
33
  if (gdef)
32
34
  outSink.add(ot_layout_1.Gdef.Tag, bin_util_1.Frag.packFrom(gdef_1.GdefTableIo, gdef, cfg, gOrd, ivs, designSpace));
33
35
  stat.settle();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hashVarVal = exports.GposAdjustment = exports.GposAdjustmentFormat = void 0;
4
- const crypto = require("crypto");
4
+ const Crypto = require("crypto");
5
5
  const ImpLib = require("@ot-builder/common-impl");
6
6
  const primitive_1 = require("@ot-builder/primitive");
7
7
  const variance_1 = require("@ot-builder/variance");
@@ -181,7 +181,7 @@ exports.GposAdjustment = {
181
181
  hashVarVal(hasher.begin(), ivs, adj.dY, adj.dYDevice);
182
182
  hashVarVal(hasher.begin(), ivs, adj.dWidth, adj.dWidthDevice);
183
183
  hashVarVal(hasher.begin(), ivs, adj.dHeight, adj.dHeightDevice);
184
- const sink = crypto.createHash("sha256");
184
+ const sink = Crypto.createHash("sha256");
185
185
  hasher.transfer(sink);
186
186
  return sink.digest("hex");
187
187
  },
@@ -195,7 +195,7 @@ exports.GposAdjustment = {
195
195
  hashVarVal(hasher.begin(), ivs, adj[1].dY, adj[1].dYDevice);
196
196
  hashVarVal(hasher.begin(), ivs, adj[1].dWidth, adj[1].dWidthDevice);
197
197
  hashVarVal(hasher.begin(), ivs, adj[1].dHeight, adj[1].dHeightDevice);
198
- const sink = crypto.createHash("sha256");
198
+ const sink = Crypto.createHash("sha256");
199
199
  hasher.transfer(sink);
200
200
  return sink.digest("hex");
201
201
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Ptr16GposAnchor = exports.NullablePtr16GposAnchor = exports.GposAnchor = void 0;
4
- const crypto = require("crypto");
4
+ const Crypto = require("crypto");
5
5
  const bin_composite_types_1 = require("@ot-builder/bin-composite-types");
6
6
  const ImpLib = require("@ot-builder/common-impl");
7
7
  const errors_1 = require("@ot-builder/errors");
@@ -90,7 +90,7 @@ exports.GposAnchor = {
90
90
  if (a.attachToPoint) {
91
91
  hasher.beginSubObj("attachToPoint").number(a.attachToPoint.pointIndex);
92
92
  }
93
- const sink = crypto.createHash("sha256");
93
+ const sink = Crypto.createHash("sha256");
94
94
  hasher.transfer(sink);
95
95
  return sink.digest("hex");
96
96
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ot-builder/io-bin-layout",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,28 +23,28 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@ot-builder/bin-composite-types": "1.3.1",
27
- "@ot-builder/bin-util": "1.3.1",
28
- "@ot-builder/errors": "1.3.1",
29
- "@ot-builder/ot-glyphs": "1.3.1",
30
- "@ot-builder/ot-layout": "1.3.1",
31
- "@ot-builder/ot-metadata": "1.3.1",
32
- "@ot-builder/prelude": "1.3.1",
33
- "@ot-builder/primitive": "1.3.1",
34
- "@ot-builder/var-store": "1.3.1",
35
- "@ot-builder/variance": "1.3.1",
36
- "@ot-builder/common-impl": "1.3.1",
37
- "@ot-builder/ot-sfnt": "1.3.1",
38
- "@ot-builder/io-bin-sfnt": "1.3.1",
26
+ "@ot-builder/bin-composite-types": "1.4.0",
27
+ "@ot-builder/bin-util": "1.4.0",
28
+ "@ot-builder/errors": "1.4.0",
29
+ "@ot-builder/ot-glyphs": "1.4.0",
30
+ "@ot-builder/ot-layout": "1.4.0",
31
+ "@ot-builder/ot-metadata": "1.4.0",
32
+ "@ot-builder/prelude": "1.4.0",
33
+ "@ot-builder/primitive": "1.4.0",
34
+ "@ot-builder/var-store": "1.4.0",
35
+ "@ot-builder/variance": "1.4.0",
36
+ "@ot-builder/common-impl": "1.4.0",
37
+ "@ot-builder/ot-sfnt": "1.4.0",
38
+ "@ot-builder/io-bin-sfnt": "1.4.0",
39
39
  "tslib": "^2.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@ot-builder/io-bin-glyph-store": "1.3.1",
43
- "@ot-builder/io-bin-metadata": "1.3.1",
44
- "@ot-builder/ot-encoding": "1.3.1",
45
- "@ot-builder/io-bin-encoding": "1.3.1",
46
- "@ot-builder/test-util": "1.3.1",
42
+ "@ot-builder/io-bin-glyph-store": "1.4.0",
43
+ "@ot-builder/io-bin-metadata": "1.4.0",
44
+ "@ot-builder/ot-encoding": "1.4.0",
45
+ "@ot-builder/io-bin-encoding": "1.4.0",
46
+ "@ot-builder/test-util": "1.4.0",
47
47
  "@types/jest": "^26.0.23",
48
- "jest": "^27.0.6"
48
+ "jest": "^27.5.1"
49
49
  }
50
50
  }