@ot-builder/io-bin-layout 1.4.0 → 1.5.2

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,364 @@
2
2
  "name": "@ot-builder/io-bin-layout",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 26 Feb 2022 01:26:05 GMT",
5
+ "date": "Sat, 30 Apr 2022 01:51:45 GMT",
6
+ "tag": "@ot-builder/io-bin-layout_v1.5.2",
7
+ "version": "1.5.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@ot-builder/io-bin-layout",
13
+ "comment": "Bump @ot-builder/bin-composite-types to v1.5.2",
14
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@ot-builder/io-bin-layout",
19
+ "comment": "Bump @ot-builder/bin-util to v1.5.2",
20
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ot-builder/io-bin-layout",
25
+ "comment": "Bump @ot-builder/errors to v1.5.2",
26
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@ot-builder/io-bin-layout",
31
+ "comment": "Bump @ot-builder/ot-glyphs to v1.5.2",
32
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@ot-builder/io-bin-layout",
37
+ "comment": "Bump @ot-builder/ot-layout to v1.5.2",
38
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@ot-builder/io-bin-layout",
43
+ "comment": "Bump @ot-builder/ot-metadata to v1.5.2",
44
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@ot-builder/io-bin-layout",
49
+ "comment": "Bump @ot-builder/prelude to v1.5.2",
50
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@ot-builder/io-bin-layout",
55
+ "comment": "Bump @ot-builder/primitive to v1.5.2",
56
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@ot-builder/io-bin-layout",
61
+ "comment": "Bump @ot-builder/var-store to v1.5.2",
62
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@ot-builder/io-bin-layout",
67
+ "comment": "Bump @ot-builder/variance to v1.5.2",
68
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@ot-builder/io-bin-layout",
73
+ "comment": "Bump @ot-builder/common-impl to v1.5.2",
74
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@ot-builder/io-bin-layout",
79
+ "comment": "Bump @ot-builder/ot-sfnt to v1.5.2",
80
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@ot-builder/io-bin-layout",
85
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.5.2",
86
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@ot-builder/io-bin-layout",
91
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.5.2",
92
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@ot-builder/io-bin-layout",
97
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.5.2",
98
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@ot-builder/io-bin-layout",
103
+ "comment": "Bump @ot-builder/ot-encoding to v1.5.2",
104
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@ot-builder/io-bin-layout",
109
+ "comment": "Bump @ot-builder/io-bin-encoding to v1.5.2",
110
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
111
+ },
112
+ {
113
+ "author": "beachball",
114
+ "package": "@ot-builder/io-bin-layout",
115
+ "comment": "Bump @ot-builder/test-util to v1.5.2",
116
+ "commit": "5a0c2cbaa1e9aa34821a913004e8c8ae0f4cb1d7"
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ {
122
+ "date": "Sat, 02 Apr 2022 01:40:06 GMT",
123
+ "tag": "@ot-builder/io-bin-layout_v1.5.1",
124
+ "version": "1.5.1",
125
+ "comments": {
126
+ "patch": [
127
+ {
128
+ "author": "beachball",
129
+ "package": "@ot-builder/io-bin-layout",
130
+ "comment": "Bump @ot-builder/bin-composite-types to v1.5.1",
131
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@ot-builder/io-bin-layout",
136
+ "comment": "Bump @ot-builder/bin-util to v1.5.1",
137
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
138
+ },
139
+ {
140
+ "author": "beachball",
141
+ "package": "@ot-builder/io-bin-layout",
142
+ "comment": "Bump @ot-builder/errors to v1.5.1",
143
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
144
+ },
145
+ {
146
+ "author": "beachball",
147
+ "package": "@ot-builder/io-bin-layout",
148
+ "comment": "Bump @ot-builder/ot-glyphs to v1.5.1",
149
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
150
+ },
151
+ {
152
+ "author": "beachball",
153
+ "package": "@ot-builder/io-bin-layout",
154
+ "comment": "Bump @ot-builder/ot-layout to v1.5.1",
155
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
156
+ },
157
+ {
158
+ "author": "beachball",
159
+ "package": "@ot-builder/io-bin-layout",
160
+ "comment": "Bump @ot-builder/ot-metadata to v1.5.1",
161
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
162
+ },
163
+ {
164
+ "author": "beachball",
165
+ "package": "@ot-builder/io-bin-layout",
166
+ "comment": "Bump @ot-builder/prelude to v1.5.1",
167
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
168
+ },
169
+ {
170
+ "author": "beachball",
171
+ "package": "@ot-builder/io-bin-layout",
172
+ "comment": "Bump @ot-builder/primitive to v1.5.1",
173
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
174
+ },
175
+ {
176
+ "author": "beachball",
177
+ "package": "@ot-builder/io-bin-layout",
178
+ "comment": "Bump @ot-builder/var-store to v1.5.1",
179
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
180
+ },
181
+ {
182
+ "author": "beachball",
183
+ "package": "@ot-builder/io-bin-layout",
184
+ "comment": "Bump @ot-builder/variance to v1.5.1",
185
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
186
+ },
187
+ {
188
+ "author": "beachball",
189
+ "package": "@ot-builder/io-bin-layout",
190
+ "comment": "Bump @ot-builder/common-impl to v1.5.1",
191
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
192
+ },
193
+ {
194
+ "author": "beachball",
195
+ "package": "@ot-builder/io-bin-layout",
196
+ "comment": "Bump @ot-builder/ot-sfnt to v1.5.1",
197
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
198
+ },
199
+ {
200
+ "author": "beachball",
201
+ "package": "@ot-builder/io-bin-layout",
202
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.5.1",
203
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
204
+ },
205
+ {
206
+ "author": "beachball",
207
+ "package": "@ot-builder/io-bin-layout",
208
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.5.1",
209
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
210
+ },
211
+ {
212
+ "author": "beachball",
213
+ "package": "@ot-builder/io-bin-layout",
214
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.5.1",
215
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
216
+ },
217
+ {
218
+ "author": "beachball",
219
+ "package": "@ot-builder/io-bin-layout",
220
+ "comment": "Bump @ot-builder/ot-encoding to v1.5.1",
221
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
222
+ },
223
+ {
224
+ "author": "beachball",
225
+ "package": "@ot-builder/io-bin-layout",
226
+ "comment": "Bump @ot-builder/io-bin-encoding to v1.5.1",
227
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
228
+ },
229
+ {
230
+ "author": "beachball",
231
+ "package": "@ot-builder/io-bin-layout",
232
+ "comment": "Bump @ot-builder/test-util to v1.5.1",
233
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
234
+ }
235
+ ]
236
+ }
237
+ },
238
+ {
239
+ "date": "Sat, 26 Mar 2022 01:37:00 GMT",
240
+ "tag": "@ot-builder/io-bin-layout_v1.5.0",
241
+ "version": "1.5.0",
242
+ "comments": {
243
+ "minor": [
244
+ {
245
+ "author": "otbbuilder-dev@users.noreply.github.com",
246
+ "package": "@ot-builder/io-bin-layout",
247
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357",
248
+ "comment": "Add AvoidUsingContextualLookup trick"
249
+ },
250
+ {
251
+ "author": "beachball",
252
+ "package": "@ot-builder/io-bin-layout",
253
+ "comment": "Bump @ot-builder/bin-composite-types to v1.5.0",
254
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
255
+ },
256
+ {
257
+ "author": "beachball",
258
+ "package": "@ot-builder/io-bin-layout",
259
+ "comment": "Bump @ot-builder/bin-util to v1.5.0",
260
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
261
+ },
262
+ {
263
+ "author": "beachball",
264
+ "package": "@ot-builder/io-bin-layout",
265
+ "comment": "Bump @ot-builder/errors to v1.5.0",
266
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
267
+ },
268
+ {
269
+ "author": "beachball",
270
+ "package": "@ot-builder/io-bin-layout",
271
+ "comment": "Bump @ot-builder/ot-glyphs to v1.5.0",
272
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
273
+ },
274
+ {
275
+ "author": "beachball",
276
+ "package": "@ot-builder/io-bin-layout",
277
+ "comment": "Bump @ot-builder/ot-layout to v1.5.0",
278
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
279
+ },
280
+ {
281
+ "author": "beachball",
282
+ "package": "@ot-builder/io-bin-layout",
283
+ "comment": "Bump @ot-builder/ot-metadata to v1.5.0",
284
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
285
+ },
286
+ {
287
+ "author": "beachball",
288
+ "package": "@ot-builder/io-bin-layout",
289
+ "comment": "Bump @ot-builder/prelude to v1.5.0",
290
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
291
+ },
292
+ {
293
+ "author": "beachball",
294
+ "package": "@ot-builder/io-bin-layout",
295
+ "comment": "Bump @ot-builder/primitive to v1.5.0",
296
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
297
+ },
298
+ {
299
+ "author": "beachball",
300
+ "package": "@ot-builder/io-bin-layout",
301
+ "comment": "Bump @ot-builder/var-store to v1.5.0",
302
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
303
+ },
304
+ {
305
+ "author": "beachball",
306
+ "package": "@ot-builder/io-bin-layout",
307
+ "comment": "Bump @ot-builder/variance to v1.5.0",
308
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
309
+ },
310
+ {
311
+ "author": "beachball",
312
+ "package": "@ot-builder/io-bin-layout",
313
+ "comment": "Bump @ot-builder/common-impl to v1.5.0",
314
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
315
+ },
316
+ {
317
+ "author": "beachball",
318
+ "package": "@ot-builder/io-bin-layout",
319
+ "comment": "Bump @ot-builder/ot-sfnt to v1.5.0",
320
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
321
+ },
322
+ {
323
+ "author": "beachball",
324
+ "package": "@ot-builder/io-bin-layout",
325
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.5.0",
326
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
327
+ },
328
+ {
329
+ "author": "beachball",
330
+ "package": "@ot-builder/io-bin-layout",
331
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.5.0",
332
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
333
+ },
334
+ {
335
+ "author": "beachball",
336
+ "package": "@ot-builder/io-bin-layout",
337
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.5.0",
338
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
339
+ },
340
+ {
341
+ "author": "beachball",
342
+ "package": "@ot-builder/io-bin-layout",
343
+ "comment": "Bump @ot-builder/ot-encoding to v1.5.0",
344
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
345
+ },
346
+ {
347
+ "author": "beachball",
348
+ "package": "@ot-builder/io-bin-layout",
349
+ "comment": "Bump @ot-builder/io-bin-encoding to v1.5.0",
350
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
351
+ },
352
+ {
353
+ "author": "beachball",
354
+ "package": "@ot-builder/io-bin-layout",
355
+ "comment": "Bump @ot-builder/test-util to v1.5.0",
356
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
357
+ }
358
+ ]
359
+ }
360
+ },
361
+ {
362
+ "date": "Sat, 26 Feb 2022 01:27:19 GMT",
6
363
  "tag": "@ot-builder/io-bin-layout_v1.4.0",
7
364
  "version": "1.4.0",
8
365
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,88 @@
1
1
  # Change Log - @ot-builder/io-bin-layout
2
2
 
3
- This log was last generated on Sat, 26 Feb 2022 01:26:05 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 30 Apr 2022 01:51:45 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.5.2
8
+
9
+ Sat, 30 Apr 2022 01:51:45 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @ot-builder/bin-composite-types to v1.5.2
14
+ - Bump @ot-builder/bin-util to v1.5.2
15
+ - Bump @ot-builder/errors to v1.5.2
16
+ - Bump @ot-builder/ot-glyphs to v1.5.2
17
+ - Bump @ot-builder/ot-layout to v1.5.2
18
+ - Bump @ot-builder/ot-metadata to v1.5.2
19
+ - Bump @ot-builder/prelude to v1.5.2
20
+ - Bump @ot-builder/primitive to v1.5.2
21
+ - Bump @ot-builder/var-store to v1.5.2
22
+ - Bump @ot-builder/variance to v1.5.2
23
+ - Bump @ot-builder/common-impl to v1.5.2
24
+ - Bump @ot-builder/ot-sfnt to v1.5.2
25
+ - Bump @ot-builder/io-bin-sfnt to v1.5.2
26
+ - Bump @ot-builder/io-bin-glyph-store to v1.5.2
27
+ - Bump @ot-builder/io-bin-metadata to v1.5.2
28
+ - Bump @ot-builder/ot-encoding to v1.5.2
29
+ - Bump @ot-builder/io-bin-encoding to v1.5.2
30
+ - Bump @ot-builder/test-util to v1.5.2
31
+
32
+ ## 1.5.1
33
+
34
+ Sat, 02 Apr 2022 01:40:06 GMT
35
+
36
+ ### Patches
37
+
38
+ - Bump @ot-builder/bin-composite-types to v1.5.1
39
+ - Bump @ot-builder/bin-util to v1.5.1
40
+ - Bump @ot-builder/errors to v1.5.1
41
+ - Bump @ot-builder/ot-glyphs to v1.5.1
42
+ - Bump @ot-builder/ot-layout to v1.5.1
43
+ - Bump @ot-builder/ot-metadata to v1.5.1
44
+ - Bump @ot-builder/prelude to v1.5.1
45
+ - Bump @ot-builder/primitive to v1.5.1
46
+ - Bump @ot-builder/var-store to v1.5.1
47
+ - Bump @ot-builder/variance to v1.5.1
48
+ - Bump @ot-builder/common-impl to v1.5.1
49
+ - Bump @ot-builder/ot-sfnt to v1.5.1
50
+ - Bump @ot-builder/io-bin-sfnt to v1.5.1
51
+ - Bump @ot-builder/io-bin-glyph-store to v1.5.1
52
+ - Bump @ot-builder/io-bin-metadata to v1.5.1
53
+ - Bump @ot-builder/ot-encoding to v1.5.1
54
+ - Bump @ot-builder/io-bin-encoding to v1.5.1
55
+ - Bump @ot-builder/test-util to v1.5.1
56
+
57
+ ## 1.5.0
58
+
59
+ Sat, 26 Mar 2022 01:37:00 GMT
60
+
61
+ ### Minor changes
62
+
63
+ - Add AvoidUsingContextualLookup trick (otbbuilder-dev@users.noreply.github.com)
64
+ - Bump @ot-builder/bin-composite-types to v1.5.0
65
+ - Bump @ot-builder/bin-util to v1.5.0
66
+ - Bump @ot-builder/errors to v1.5.0
67
+ - Bump @ot-builder/ot-glyphs to v1.5.0
68
+ - Bump @ot-builder/ot-layout to v1.5.0
69
+ - Bump @ot-builder/ot-metadata to v1.5.0
70
+ - Bump @ot-builder/prelude to v1.5.0
71
+ - Bump @ot-builder/primitive to v1.5.0
72
+ - Bump @ot-builder/var-store to v1.5.0
73
+ - Bump @ot-builder/variance to v1.5.0
74
+ - Bump @ot-builder/common-impl to v1.5.0
75
+ - Bump @ot-builder/ot-sfnt to v1.5.0
76
+ - Bump @ot-builder/io-bin-sfnt to v1.5.0
77
+ - Bump @ot-builder/io-bin-glyph-store to v1.5.0
78
+ - Bump @ot-builder/io-bin-metadata to v1.5.0
79
+ - Bump @ot-builder/ot-encoding to v1.5.0
80
+ - Bump @ot-builder/io-bin-encoding to v1.5.0
81
+ - Bump @ot-builder/test-util to v1.5.0
82
+
7
83
  ## 1.4.0
8
84
 
9
- Sat, 26 Feb 2022 01:26:05 GMT
85
+ Sat, 26 Feb 2022 01:27:19 GMT
10
86
 
11
87
  ### Minor changes
12
88
 
@@ -1,7 +1,7 @@
1
1
  import { GsubGpos } from "@ot-builder/ot-layout";
2
2
  export interface LayoutCfgProps {
3
3
  gdefWriteTrick?: number;
4
- lookupWriteTricks?: Map<GsubGpos.LookupProp, number>;
4
+ lookupWriteTricks?: Map<GsubGpos.LookupProp, LookupWriteTrick>;
5
5
  }
6
6
  export interface LayoutCfg {
7
7
  layout: LayoutCfgProps;
@@ -10,4 +10,13 @@ export interface LayoutCfgPt {
10
10
  layout?: Partial<LayoutCfgProps>;
11
11
  }
12
12
  export declare const DefaultLayoutProps: LayoutCfgProps;
13
+ export declare enum LookupWriteTrick {
14
+ AvoidUseExtension = 1,
15
+ AvoidBreakSubtable = 2,
16
+ UseFlatCoverage = 4,
17
+ UseFastCoverage = 8,
18
+ AvoidUsingContextualLookup = 16,
19
+ ContextualForceFormat3 = 65536,
20
+ ContextualForceFormat2 = 131072
21
+ }
13
22
  //# sourceMappingURL=index.d.ts.map
package/lib/cfg/index.js CHANGED
@@ -1,5 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultLayoutProps = void 0;
3
+ exports.LookupWriteTrick = exports.DefaultLayoutProps = void 0;
4
4
  exports.DefaultLayoutProps = {};
5
+ var LookupWriteTrick;
6
+ (function (LookupWriteTrick) {
7
+ LookupWriteTrick[LookupWriteTrick["AvoidUseExtension"] = 1] = "AvoidUseExtension";
8
+ LookupWriteTrick[LookupWriteTrick["AvoidBreakSubtable"] = 2] = "AvoidBreakSubtable";
9
+ LookupWriteTrick[LookupWriteTrick["UseFlatCoverage"] = 4] = "UseFlatCoverage";
10
+ LookupWriteTrick[LookupWriteTrick["UseFastCoverage"] = 8] = "UseFastCoverage";
11
+ LookupWriteTrick[LookupWriteTrick["AvoidUsingContextualLookup"] = 16] = "AvoidUsingContextualLookup";
12
+ LookupWriteTrick[LookupWriteTrick["ContextualForceFormat3"] = 65536] = "ContextualForceFormat3";
13
+ LookupWriteTrick[LookupWriteTrick["ContextualForceFormat2"] = 131072] = "ContextualForceFormat2";
14
+ })(LookupWriteTrick = exports.LookupWriteTrick || (exports.LookupWriteTrick = {}));
5
15
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,7 @@ import { BinaryView, Frag } from "@ot-builder/bin-util";
2
2
  import { OtGlyph } from "@ot-builder/ot-glyphs";
3
3
  import { Data } from "@ot-builder/prelude";
4
4
  import { ReadTimeIVS, WriteTimeIVS } from "@ot-builder/var-store";
5
+ import { LookupWriteTrick } from "../cfg";
5
6
  import { OtlStat } from "../stat";
6
7
  export interface SubtableReadingContext<L> {
7
8
  crossReferences: Data.Order<L>;
@@ -9,7 +10,7 @@ export interface SubtableReadingContext<L> {
9
10
  ivs: Data.Maybe<ReadTimeIVS>;
10
11
  }
11
12
  export interface SubtableWriteContext<L> {
12
- trick: number;
13
+ trick: LookupWriteTrick;
13
14
  crossReferences: Data.Order<L>;
14
15
  gOrd: Data.Order<OtGlyph>;
15
16
  ivs: Data.Maybe<WriteTimeIVS>;
@@ -21,7 +22,7 @@ export interface LookupReader<L, C extends L> {
21
22
  }
22
23
  export interface LookupWriter<L, C extends L> {
23
24
  canBeUsed(lookup: L): lookup is L & C;
24
- getLookupType(lookup: C): number;
25
+ getLookupType(lookup: C, context: SubtableWriteContext<L>): number;
25
26
  getLookupTypeSymbol(lookup: C): symbol;
26
27
  createSubtableFragments(lookup: C, context: SubtableWriteContext<L>): Frag[];
27
28
  }
@@ -43,12 +44,4 @@ export declare enum LookupFlag {
43
44
  UseMarkFilteringSet = 16,
44
45
  MarkAttachmentType = 65280
45
46
  }
46
- export declare enum SubtableWriteTrick {
47
- AvoidUseExtension = 1,
48
- AvoidBreakSubtable = 2,
49
- UseFlatCoverage = 4,
50
- UseFastCoverage = 8,
51
- ChainingForceFormat3 = 65536,
52
- ChainingForceFormat2 = 131072
53
- }
54
47
  //# sourceMappingURL=general.d.ts.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubtableWriteTrick = exports.LookupFlag = exports.SubtableSizeLimit = void 0;
3
+ exports.LookupFlag = exports.SubtableSizeLimit = void 0;
4
4
  exports.SubtableSizeLimit = 0xf000;
5
5
  var LookupFlag;
6
6
  (function (LookupFlag) {
@@ -11,13 +11,4 @@ var LookupFlag;
11
11
  LookupFlag[LookupFlag["UseMarkFilteringSet"] = 16] = "UseMarkFilteringSet";
12
12
  LookupFlag[LookupFlag["MarkAttachmentType"] = 65280] = "MarkAttachmentType";
13
13
  })(LookupFlag = exports.LookupFlag || (exports.LookupFlag = {}));
14
- var SubtableWriteTrick;
15
- (function (SubtableWriteTrick) {
16
- SubtableWriteTrick[SubtableWriteTrick["AvoidUseExtension"] = 1] = "AvoidUseExtension";
17
- SubtableWriteTrick[SubtableWriteTrick["AvoidBreakSubtable"] = 2] = "AvoidBreakSubtable";
18
- SubtableWriteTrick[SubtableWriteTrick["UseFlatCoverage"] = 4] = "UseFlatCoverage";
19
- SubtableWriteTrick[SubtableWriteTrick["UseFastCoverage"] = 8] = "UseFastCoverage";
20
- SubtableWriteTrick[SubtableWriteTrick["ChainingForceFormat3"] = 65536] = "ChainingForceFormat3";
21
- SubtableWriteTrick[SubtableWriteTrick["ChainingForceFormat2"] = 131072] = "ChainingForceFormat2";
22
- })(SubtableWriteTrick = exports.SubtableWriteTrick || (exports.SubtableWriteTrick = {}));
23
14
  //# sourceMappingURL=general.js.map
@@ -1,4 +1,4 @@
1
1
  import { GsubGpos } from "@ot-builder/ot-layout";
2
- import { LayoutCfg } from "../cfg";
3
- export declare function setLookupTricks<L>(table: GsubGpos.TableT<L>, cfg: LayoutCfg): Map<L, number>;
2
+ import { LayoutCfg, LookupWriteTrick } from "../cfg";
3
+ export declare function setLookupTricks<L>(table: GsubGpos.TableT<L>, cfg: LayoutCfg): Map<L, LookupWriteTrick>;
4
4
  //# sourceMappingURL=trick.d.ts.map
@@ -3,13 +3,14 @@ import { OtGlyph } from "@ot-builder/ot-glyphs";
3
3
  import { Gdef, GsubGpos } from "@ot-builder/ot-layout";
4
4
  import { Data } from "@ot-builder/prelude";
5
5
  import { WriteTimeIVS } from "@ot-builder/var-store";
6
+ import { LookupWriteTrick } from "../cfg";
6
7
  import { OtlStat } from "../stat";
7
8
  import { LookupWriterFactory } from "./general";
8
9
  export interface LookupWriteContext<L> {
9
10
  gOrd: Data.Order<OtGlyph>;
10
11
  gdef?: Data.Maybe<Gdef.Table>;
11
12
  ivs?: Data.Maybe<WriteTimeIVS>;
12
- tricks?: Data.Maybe<Map<L, number>>;
13
+ tricks?: Data.Maybe<Map<L, LookupWriteTrick>>;
13
14
  stat?: Data.Maybe<OtlStat>;
14
15
  }
15
16
  export declare const WriteLookupList: Write<GsubGpos.LookupProp[], [lwf: LookupWriterFactory<GsubGpos.LookupProp>, lwc: LookupWriteContext<GsubGpos.LookupProp>]>;
@@ -6,6 +6,7 @@ const ImpLib = require("@ot-builder/common-impl");
6
6
  const errors_1 = require("@ot-builder/errors");
7
7
  const ot_layout_1 = require("@ot-builder/ot-layout");
8
8
  const primitive_1 = require("@ot-builder/primitive");
9
+ const cfg_1 = require("../cfg");
9
10
  const stat_1 = require("../stat");
10
11
  const decide_ignore_flags_1 = require("./decide-ignore-flags");
11
12
  const general_1 = require("./general");
@@ -58,7 +59,7 @@ class LookupListWriter {
58
59
  continue;
59
60
  const header = {
60
61
  origLookupType: writer.getLookupTypeSymbol(lookup),
61
- lookupType: writer.getLookupType(lookup),
62
+ lookupType: writer.getLookupType(lookup, context),
62
63
  flags,
63
64
  markFilteringSet,
64
65
  rank: this.getLookupRank(writer.getLookupTypeSymbol(lookup), lookupIsDependency, context.trick),
@@ -71,7 +72,7 @@ class LookupListWriter {
71
72
  }
72
73
  }
73
74
  getLookupRank(origType, isDependency, trick) {
74
- const rankTrick = 16 * (trick & general_1.SubtableWriteTrick.AvoidUseExtension ? 1 : 2);
75
+ const rankTrick = 16 * (trick & cfg_1.LookupWriteTrick.AvoidUseExtension ? 1 : 2);
75
76
  const rankType = origType === ot_layout_1.Gsub.LookupType.Reverse
76
77
  ? 1
77
78
  : origType === ot_layout_1.Gsub.LookupType.Chaining || origType === ot_layout_1.Gpos.LookupType.Chaining
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.writeOtl = exports.readOtl = void 0;
4
4
  const tslib_1 = require("tslib");
5
- (0, tslib_1.__exportStar)(require("./cfg"), exports);
5
+ tslib_1.__exportStar(require("./cfg"), exports);
6
6
  var read_1 = require("./main/read");
7
7
  Object.defineProperty(exports, "readOtl", { enumerable: true, get: function () { return read_1.readOtl; } });
8
8
  var write_1 = require("./main/write");
@@ -4,8 +4,8 @@ import { LookupWriter, SubtableWriteContext } from "../gsub-gpos-shared/general"
4
4
  declare abstract class ChainingContextualWriter<L, C extends L & GsubGpos.ChainingProp<L>> implements LookupWriter<L, C> {
5
5
  private wCoverageRule;
6
6
  private wClassRuleSet;
7
- protected useChainingLookup(lookup: C): boolean;
8
- abstract getLookupType(lookup: C): number;
7
+ protected useChainingLookup(lookup: C, ctx: SubtableWriteContext<L>): boolean;
8
+ abstract getLookupType(lookup: C, ctx: SubtableWriteContext<L>): number;
9
9
  abstract getLookupTypeSymbol(lookup: C): symbol;
10
10
  abstract canBeUsed(l: L): l is C;
11
11
  private estimateCovRuleSize;
@@ -14,12 +14,12 @@ declare abstract class ChainingContextualWriter<L, C extends L & GsubGpos.Chaini
14
14
  createSubtableFragments(lookup: C, ctx: SubtableWriteContext<L>): Array<Frag>;
15
15
  }
16
16
  export declare class GsubChainingContextualWriter extends ChainingContextualWriter<Gsub.Lookup, Gsub.Chaining> {
17
- getLookupType(lookup: Gsub.Chaining): 6 | 5;
17
+ getLookupType(lookup: Gsub.Chaining, ctx: SubtableWriteContext<Gsub.Lookup>): 6 | 5;
18
18
  getLookupTypeSymbol(): symbol;
19
19
  canBeUsed(l: Gsub.Lookup): l is Gsub.Chaining;
20
20
  }
21
21
  export declare class GposChainingContextualWriter extends ChainingContextualWriter<Gpos.Lookup, Gpos.Chaining> {
22
- getLookupType(lookup: Gpos.Chaining): 8 | 7;
22
+ getLookupType(lookup: Gpos.Chaining, ctx: SubtableWriteContext<Gpos.Lookup>): 8 | 7;
23
23
  getLookupTypeSymbol(): symbol;
24
24
  canBeUsed(l: Gpos.Lookup): l is Gpos.Chaining;
25
25
  }
@@ -4,7 +4,7 @@ exports.GposChainingContextualWriter = exports.GsubChainingContextualWriter = vo
4
4
  const bin_util_1 = require("@ot-builder/bin-util");
5
5
  const ot_layout_1 = require("@ot-builder/ot-layout");
6
6
  const primitive_1 = require("@ot-builder/primitive");
7
- const general_1 = require("../gsub-gpos-shared/general");
7
+ const cfg_1 = require("../cfg");
8
8
  const class_def_1 = require("../shared/class-def");
9
9
  const coverage_1 = require("../shared/coverage");
10
10
  class ClassDefsAnalyzeState {
@@ -235,7 +235,9 @@ class ChainingContextualWriter {
235
235
  this.wCoverageRule = new CCoverageRule();
236
236
  this.wClassRuleSet = new CClassRuleSet();
237
237
  }
238
- useChainingLookup(lookup) {
238
+ useChainingLookup(lookup, ctx) {
239
+ if (ctx.trick & cfg_1.LookupWriteTrick.AvoidUsingContextualLookup)
240
+ return true;
239
241
  let chain = false;
240
242
  for (const rule of lookup.rules) {
241
243
  if (rule.inputBegins > 0 || rule.inputEnds < rule.match.length) {
@@ -259,14 +261,14 @@ class ChainingContextualWriter {
259
261
  return bin_util_1.Frag.from(this.wClassRuleSet, isChaining, s, ctx);
260
262
  }
261
263
  createSubtableFragments(lookup, ctx) {
262
- const isChaining = this.useChainingLookup(lookup);
264
+ const isChaining = this.useChainingLookup(lookup, ctx);
263
265
  const covLookups = [];
264
266
  const covLookupSizes = [];
265
267
  for (const rule of lookup.rules) {
266
268
  covLookups.push(this.covSubtable(rule, isChaining, ctx));
267
269
  covLookupSizes.push(this.estimateCovRuleSize(rule));
268
270
  }
269
- if (ctx.trick & general_1.SubtableWriteTrick.ChainingForceFormat3)
271
+ if (ctx.trick & cfg_1.LookupWriteTrick.ContextualForceFormat3)
270
272
  return covLookups;
271
273
  // Do dynamic programming to find out an optimal arrangement
272
274
  const bestResults = [];
@@ -295,8 +297,8 @@ class ChainingContextualWriter {
295
297
  }
296
298
  }
297
299
  class GsubChainingContextualWriter extends ChainingContextualWriter {
298
- getLookupType(lookup) {
299
- return this.useChainingLookup(lookup) ? 6 : 5;
300
+ getLookupType(lookup, ctx) {
301
+ return this.useChainingLookup(lookup, ctx) ? 6 : 5;
300
302
  }
301
303
  getLookupTypeSymbol() {
302
304
  return ot_layout_1.Gsub.LookupType.Chaining;
@@ -307,8 +309,8 @@ class GsubChainingContextualWriter extends ChainingContextualWriter {
307
309
  }
308
310
  exports.GsubChainingContextualWriter = GsubChainingContextualWriter;
309
311
  class GposChainingContextualWriter extends ChainingContextualWriter {
310
- getLookupType(lookup) {
311
- return this.useChainingLookup(lookup) ? 8 : 7;
312
+ getLookupType(lookup, ctx) {
313
+ return this.useChainingLookup(lookup, ctx) ? 8 : 7;
312
314
  }
313
315
  getLookupTypeSymbol() {
314
316
  return ot_layout_1.Gpos.LookupType.Chaining;
@@ -5,6 +5,7 @@ const bin_util_1 = require("@ot-builder/bin-util");
5
5
  const errors_1 = require("@ot-builder/errors");
6
6
  const ot_layout_1 = require("@ot-builder/ot-layout");
7
7
  const primitive_1 = require("@ot-builder/primitive");
8
+ const cfg_1 = require("../cfg");
8
9
  const general_1 = require("../gsub-gpos-shared/general");
9
10
  const coverage_1 = require("../shared/coverage");
10
11
  const gpos_adjust_1 = require("../shared/gpos-adjust");
@@ -145,7 +146,7 @@ class GposSingleWriter {
145
146
  return data.length;
146
147
  }
147
148
  createSubtableFragments(lookup, ctx) {
148
- const singleLookup = !!(ctx.trick & general_1.SubtableWriteTrick.AvoidBreakSubtable);
149
+ const singleLookup = !!(ctx.trick & cfg_1.LookupWriteTrick.AvoidBreakSubtable);
149
150
  const st = new GsubSingleWriterState();
150
151
  for (const [from, to] of lookup.adjustments) {
151
152
  st.addRecord(ctx.gOrd.reverse(from), to, ctx);
@@ -5,6 +5,7 @@ const bin_util_1 = require("@ot-builder/bin-util");
5
5
  const errors_1 = require("@ot-builder/errors");
6
6
  const ot_layout_1 = require("@ot-builder/ot-layout");
7
7
  const primitive_1 = require("@ot-builder/primitive");
8
+ const cfg_1 = require("../cfg");
8
9
  const general_1 = require("../gsub-gpos-shared/general");
9
10
  const coverage_1 = require("../shared/coverage");
10
11
  const SubtableFormat1 = {
@@ -115,7 +116,7 @@ class GsubSingleWriter {
115
116
  return data.length;
116
117
  }
117
118
  createSubtableFragments(lookup, ctx) {
118
- const singleLookup = !!(ctx.trick & general_1.SubtableWriteTrick.AvoidBreakSubtable);
119
+ const singleLookup = !!(ctx.trick & cfg_1.LookupWriteTrick.AvoidBreakSubtable);
119
120
  const st = new GsubSingleWriterState();
120
121
  for (const [from, to] of lookup.mapping) {
121
122
  st.addGidDiff(ctx.gOrd.reverse(from), ctx.gOrd.reverse(to));
@@ -4,7 +4,7 @@ exports.GidClassDef = exports.EmptyAsNullPtr16ClassDef = exports.NullablePtr16Cl
4
4
  const bin_composite_types_1 = require("@ot-builder/bin-composite-types");
5
5
  const bin_util_1 = require("@ot-builder/bin-util");
6
6
  const errors_1 = require("@ot-builder/errors");
7
- const general_1 = require("../gsub-gpos-shared/general");
7
+ const cfg_1 = require("../cfg");
8
8
  exports.MaxClsDefItemWords = 3;
9
9
  var ClassDefUtil;
10
10
  (function (ClassDefUtil) {
@@ -109,7 +109,7 @@ exports.GidClassDef = {
109
109
  frag.push(OtGidClassDefFormat2, mapping);
110
110
  return;
111
111
  }
112
- if (trick & general_1.SubtableWriteTrick.UseFastCoverage) {
112
+ if (trick & cfg_1.LookupWriteTrick.UseFastCoverage) {
113
113
  const collector = new ClassRunCollector();
114
114
  for (const [gid, cls] of mapping)
115
115
  collector.update(gid, cls);
@@ -4,7 +4,7 @@ exports.Ptr16GidCoverage = exports.NullablePtr16GidCoverage = exports.GidCoverag
4
4
  const bin_composite_types_1 = require("@ot-builder/bin-composite-types");
5
5
  const bin_util_1 = require("@ot-builder/bin-util");
6
6
  const errors_1 = require("@ot-builder/errors");
7
- const general_1 = require("../gsub-gpos-shared/general");
7
+ const cfg_1 = require("../cfg");
8
8
  exports.MaxCovItemWords = 3;
9
9
  var CovUtils;
10
10
  (function (CovUtils) {
@@ -125,10 +125,10 @@ exports.GidCoverage = {
125
125
  }
126
126
  }),
127
127
  ...(0, bin_util_1.Write)((frag, gidList, trick = 0) => {
128
- if (trick & general_1.SubtableWriteTrick.UseFlatCoverage) {
128
+ if (trick & cfg_1.LookupWriteTrick.UseFlatCoverage) {
129
129
  frag.push(OtGidCoverageFormat1, gidList);
130
130
  }
131
- else if (trick & general_1.SubtableWriteTrick.UseFastCoverage) {
131
+ else if (trick & cfg_1.LookupWriteTrick.UseFastCoverage) {
132
132
  const collector = new CoverageRunCollector();
133
133
  for (let item = 0; item < gidList.length; item++) {
134
134
  collector.update(gidList[item], item);
package/lib/stat/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./interface"), exports);
5
- (0, tslib_1.__exportStar)(require("./os2-max-context"), exports);
4
+ tslib_1.__exportStar(require("./interface"), exports);
5
+ tslib_1.__exportStar(require("./os2-max-context"), exports);
6
6
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ot-builder/io-bin-layout",
3
- "version": "1.4.0",
3
+ "version": "1.5.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,27 +23,27 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
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",
26
+ "@ot-builder/bin-composite-types": "1.5.2",
27
+ "@ot-builder/bin-util": "1.5.2",
28
+ "@ot-builder/errors": "1.5.2",
29
+ "@ot-builder/ot-glyphs": "1.5.2",
30
+ "@ot-builder/ot-layout": "1.5.2",
31
+ "@ot-builder/ot-metadata": "1.5.2",
32
+ "@ot-builder/prelude": "1.5.2",
33
+ "@ot-builder/primitive": "1.5.2",
34
+ "@ot-builder/var-store": "1.5.2",
35
+ "@ot-builder/variance": "1.5.2",
36
+ "@ot-builder/common-impl": "1.5.2",
37
+ "@ot-builder/ot-sfnt": "1.5.2",
38
+ "@ot-builder/io-bin-sfnt": "1.5.2",
39
39
  "tslib": "^2.0.0"
40
40
  },
41
41
  "devDependencies": {
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",
42
+ "@ot-builder/io-bin-glyph-store": "1.5.2",
43
+ "@ot-builder/io-bin-metadata": "1.5.2",
44
+ "@ot-builder/ot-encoding": "1.5.2",
45
+ "@ot-builder/io-bin-encoding": "1.5.2",
46
+ "@ot-builder/test-util": "1.5.2",
47
47
  "@types/jest": "^26.0.23",
48
48
  "jest": "^27.5.1"
49
49
  }