@cantoo/fontkit 2.0.4 → 2.0.5
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/dist/browser-module.mjs +28 -28
- package/dist/browser-module.mjs.map +1 -1
- package/dist/browser.cjs +28 -28
- package/dist/browser.cjs.map +1 -1
- package/dist/main.cjs +28 -28
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +28 -28
- package/dist/module.mjs.map +1 -1
- package/package.json +2 -1
- package/src/CmapProcessor.js +2 -2
- package/src/DFont.js +5 -5
- package/src/TTFFont.js +11 -15
- package/src/TrueTypeCollection.js +10 -10
- package/src/WOFF2Font.js +0 -6
- package/src/aat/AATFeatureMap.js +21 -22
- package/src/aat/AATLayoutEngine.js +1 -1
- package/src/aat/AATLookupTable.js +2 -2
- package/src/aat/AATMorxProcessor.js +14 -14
- package/src/aat/AATStateMachine.js +3 -3
- package/src/base.js +1 -1
- package/src/cff/CFFDict.js +2 -2
- package/src/cff/CFFFont.js +1 -1
- package/src/cff/CFFIndex.js +4 -4
- package/src/cff/CFFOperand.js +1 -11
- package/src/cff/CFFPrivateDict.js +20 -20
- package/src/cff/CFFStandardStrings.js +67 -67
- package/src/cff/CFFTop.js +58 -58
- package/src/decorators.js +3 -3
- package/src/encodings.js +111 -111
- package/src/glyph/CFFGlyph.js +3 -4
- package/src/glyph/COLRGlyph.js +2 -2
- package/src/glyph/Glyph.js +4 -4
- package/src/glyph/GlyphVariationProcessor.js +23 -28
- package/src/glyph/Path.js +14 -14
- package/src/glyph/SBIXGlyph.js +2 -2
- package/src/glyph/TTFGlyph.js +31 -38
- package/src/glyph/TTFGlyphEncoder.js +26 -26
- package/src/glyph/WOFF2Glyph.js +2 -2
- package/src/layout/GlyphRun.js +3 -3
- package/src/layout/KernProcessor.js +1 -1
- package/src/layout/LayoutEngine.js +13 -14
- package/src/layout/Script.js +25 -25
- package/src/layout/UnicodeLayoutEngine.js +5 -6
- package/src/opentype/GlyphInfo.js +1 -1
- package/src/opentype/GlyphIterator.js +2 -2
- package/src/opentype/OTProcessor.js +8 -8
- package/src/opentype/ShapingPlan.js +1 -2
- package/src/opentype/shapers/ArabicShaper.js +8 -8
- package/src/opentype/shapers/DefaultShaper.js +3 -3
- package/src/opentype/shapers/HangulShaper.js +35 -35
- package/src/opentype/shapers/HebrewShaper.js +5 -5
- package/src/opentype/shapers/IndicShaper.js +20 -20
- package/src/opentype/shapers/ThaiShaper.js +15 -15
- package/src/opentype/shapers/UniversalShaper.js +2 -2
- package/src/opentype/shapers/index.js +33 -33
- package/src/opentype/shapers/indic-data.js +2 -2
- package/src/packages/unicode-properties/data-trie.js +1 -1
- package/src/packages/unicode-properties/data.js +1 -1
- package/src/packages/unicode-properties/dist/index.cjs +1 -1
- package/src/packages/unicode-properties/dist/index.cjs.map +2 -2
- package/src/packages/unicode-properties/dist/index.mjs +1 -1
- package/src/packages/unicode-properties/dist/index.mjs.map +2 -2
- package/src/packages/unicode-properties/generate.js +3 -4
- package/src/packages/unicode-properties/index.js +30 -30
- package/src/packages/unicode-properties/package.json +1 -1
- package/src/packages/unicode-trie/builder.js +18 -22
- package/src/packages/unicode-trie/dist/builder.cjs +6 -9
- package/src/packages/unicode-trie/dist/builder.cjs.map +2 -2
- package/src/packages/unicode-trie/dist/builder.mjs +6 -9
- package/src/packages/unicode-trie/dist/builder.mjs.map +2 -2
- package/src/packages/unicode-trie/dist/index.cjs.map +2 -2
- package/src/packages/unicode-trie/dist/index.mjs.map +2 -2
- package/src/packages/unicode-trie/index.js +1 -2
- package/src/packages/unicode-trie/package.json +1 -1
- package/src/packages/unicode-trie/swap.js +2 -2
- package/src/subset/Subset.js +2 -2
- package/src/subset/TTFSubset.js +5 -5
- package/src/tables/BASE.js +27 -27
- package/src/tables/COLR.js +9 -9
- package/src/tables/CPAL.js +1 -1
- package/src/tables/DSIG.js +7 -7
- package/src/tables/EBDT.js +0 -1
- package/src/tables/EBLC.js +3 -3
- package/src/tables/GDEF.js +17 -17
- package/src/tables/GPOS.js +74 -74
- package/src/tables/GSUB.js +37 -37
- package/src/tables/JSTF.js +16 -16
- package/src/tables/LTSH.js +3 -3
- package/src/tables/OS2.js +49 -49
- package/src/tables/PCLT.js +15 -15
- package/src/tables/VDMX.js +17 -17
- package/src/tables/VORG.js +7 -7
- package/src/tables/WOFF2Directory.js +2 -2
- package/src/tables/WOFFDirectory.js +18 -18
- package/src/tables/aat.js +2 -2
- package/src/tables/cmap.js +63 -63
- package/src/tables/directory.js +14 -14
- package/src/tables/gasp.js +5 -5
- package/src/tables/glyf.js +1 -1
- package/src/tables/hdmx.js +7 -7
- package/src/tables/head.js +16 -16
- package/src/tables/hhea.js +14 -14
- package/src/tables/hmtx.js +2 -2
- package/src/tables/index.js +0 -5
- package/src/tables/just.js +1 -1
- package/src/tables/kern.js +42 -42
- package/src/tables/loca.js +2 -2
- package/src/tables/maxp.js +15 -15
- package/src/tables/morx.js +16 -16
- package/src/tables/name.js +18 -18
- package/src/tables/opentype.js +91 -91
- package/src/tables/post.js +10 -10
- package/src/tables/variations.js +6 -6
- package/src/tables/vhea.js +14 -14
- package/src/tables/vmtx.js +3 -3
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
// Automatically generated from Appendix A of the CFF specification; do
|
|
2
2
|
// not edit. Length should be 391.
|
|
3
3
|
export default [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
4
|
+
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
|
|
5
|
+
'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
|
|
6
|
+
'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one',
|
|
7
|
+
'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon',
|
|
8
|
+
'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C',
|
|
9
|
+
'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
|
10
|
+
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash',
|
|
11
|
+
'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c',
|
|
12
|
+
'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
|
|
13
|
+
's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright',
|
|
14
|
+
'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen',
|
|
15
|
+
'florin', 'section', 'currency', 'quotesingle', 'quotedblleft',
|
|
16
|
+
'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash',
|
|
17
|
+
'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet',
|
|
18
|
+
'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright',
|
|
19
|
+
'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex',
|
|
20
|
+
'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',
|
|
21
|
+
'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash',
|
|
22
|
+
'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe',
|
|
23
|
+
'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth',
|
|
24
|
+
'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar',
|
|
25
|
+
'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus',
|
|
26
|
+
'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex',
|
|
27
|
+
'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute',
|
|
28
|
+
'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis',
|
|
29
|
+
'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve',
|
|
30
|
+
'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave',
|
|
31
|
+
'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis',
|
|
32
|
+
'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex',
|
|
33
|
+
'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave',
|
|
34
|
+
'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde',
|
|
35
|
+
'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute',
|
|
36
|
+
'ydieresis', 'zcaron', 'exclamsmall', 'Hungarumlautsmall',
|
|
37
|
+
'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall',
|
|
38
|
+
'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
|
|
39
|
+
'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle',
|
|
40
|
+
'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle',
|
|
41
|
+
'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior',
|
|
42
|
+
'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior',
|
|
43
|
+
'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior',
|
|
44
|
+
'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior',
|
|
45
|
+
'ssuperior', 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior',
|
|
46
|
+
'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
|
|
47
|
+
'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
|
|
48
|
+
'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
|
|
49
|
+
'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
|
|
50
|
+
'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
|
|
51
|
+
'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',
|
|
52
|
+
'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall',
|
|
53
|
+
'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash',
|
|
54
|
+
'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall',
|
|
55
|
+
'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
|
|
56
|
+
'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'foursuperior',
|
|
57
|
+
'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior',
|
|
58
|
+
'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',
|
|
59
|
+
'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior',
|
|
60
|
+
'seveninferior', 'eightinferior', 'nineinferior', 'centinferior',
|
|
61
|
+
'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',
|
|
62
|
+
'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall',
|
|
63
|
+
'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
|
|
64
|
+
'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
|
|
65
|
+
'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
|
|
66
|
+
'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
|
|
67
|
+
'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
|
|
68
|
+
'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
|
|
69
|
+
'Ydieresissmall', '001.000', '001.001', '001.002', '001.003', 'Black',
|
|
70
|
+
'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold'
|
|
71
71
|
];
|
package/src/cff/CFFTop.js
CHANGED
|
@@ -72,7 +72,7 @@ let CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {
|
|
|
72
72
|
// TODO: supplement?
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
let CFFEncoding = new PredefinedOp([
|
|
75
|
+
let CFFEncoding = new PredefinedOp([StandardEncoding, ExpertEncoding], new CFFPointer(CFFCustomEncoding, { lazy: true }));
|
|
76
76
|
|
|
77
77
|
// Decodes an array of ranges until the total
|
|
78
78
|
// length is equal to the provided length.
|
|
@@ -106,7 +106,7 @@ let CFFCustomCharset = new r.VersionedStruct(r.uint8, {
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
let CFFCharset = new PredefinedOp([
|
|
109
|
+
let CFFCharset = new PredefinedOp([ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset], new CFFPointer(CFFCustomCharset, { lazy: true }));
|
|
110
110
|
|
|
111
111
|
let FDRange3 = new r.Struct({
|
|
112
112
|
first: r.uint16,
|
|
@@ -154,82 +154,82 @@ class CFFPrivateOp {
|
|
|
154
154
|
|
|
155
155
|
let FontDict = new CFFDict([
|
|
156
156
|
// key name type(s) default
|
|
157
|
-
[18,
|
|
158
|
-
[[12, 38],
|
|
159
|
-
[[12, 7],
|
|
160
|
-
[[12, 5],
|
|
157
|
+
[18, 'Private', new CFFPrivateOp(), null],
|
|
158
|
+
[[12, 38], 'FontName', 'sid', null],
|
|
159
|
+
[[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],
|
|
160
|
+
[[12, 5], 'PaintType', 'number', 0]
|
|
161
161
|
]);
|
|
162
162
|
|
|
163
163
|
let CFFTopDict = new CFFDict([
|
|
164
164
|
// key name type(s) default
|
|
165
|
-
[[12, 30],
|
|
166
|
-
|
|
167
|
-
[0,
|
|
168
|
-
[1,
|
|
169
|
-
[[12, 0],
|
|
170
|
-
[2,
|
|
171
|
-
[3,
|
|
172
|
-
[4,
|
|
173
|
-
[[12, 1],
|
|
174
|
-
[[12, 2],
|
|
175
|
-
[[12, 3],
|
|
176
|
-
[[12, 4],
|
|
177
|
-
[[12, 5],
|
|
178
|
-
[[12, 6],
|
|
179
|
-
[[12, 7],
|
|
180
|
-
[13,
|
|
181
|
-
[5,
|
|
182
|
-
[[12, 8],
|
|
183
|
-
[14,
|
|
184
|
-
[15,
|
|
185
|
-
[16,
|
|
186
|
-
[17,
|
|
187
|
-
[18,
|
|
188
|
-
[[12, 20],
|
|
189
|
-
[[12, 21],
|
|
190
|
-
[[12, 22],
|
|
191
|
-
[[12, 23],
|
|
165
|
+
[[12, 30], 'ROS', ['sid', 'sid', 'number'], null],
|
|
166
|
+
|
|
167
|
+
[0, 'version', 'sid', null],
|
|
168
|
+
[1, 'Notice', 'sid', null],
|
|
169
|
+
[[12, 0], 'Copyright', 'sid', null],
|
|
170
|
+
[2, 'FullName', 'sid', null],
|
|
171
|
+
[3, 'FamilyName', 'sid', null],
|
|
172
|
+
[4, 'Weight', 'sid', null],
|
|
173
|
+
[[12, 1], 'isFixedPitch', 'boolean', false],
|
|
174
|
+
[[12, 2], 'ItalicAngle', 'number', 0],
|
|
175
|
+
[[12, 3], 'UnderlinePosition', 'number', -100],
|
|
176
|
+
[[12, 4], 'UnderlineThickness', 'number', 50],
|
|
177
|
+
[[12, 5], 'PaintType', 'number', 0],
|
|
178
|
+
[[12, 6], 'CharstringType', 'number', 2],
|
|
179
|
+
[[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],
|
|
180
|
+
[13, 'UniqueID', 'number', null],
|
|
181
|
+
[5, 'FontBBox', 'array', [0, 0, 0, 0]],
|
|
182
|
+
[[12, 8], 'StrokeWidth', 'number', 0],
|
|
183
|
+
[14, 'XUID', 'array', null],
|
|
184
|
+
[15, 'charset', CFFCharset, ISOAdobeCharset],
|
|
185
|
+
[16, 'Encoding', CFFEncoding, StandardEncoding],
|
|
186
|
+
[17, 'CharStrings', new CFFPointer(new CFFIndex()), null],
|
|
187
|
+
[18, 'Private', new CFFPrivateOp(), null],
|
|
188
|
+
[[12, 20], 'SyntheticBase', 'number', null],
|
|
189
|
+
[[12, 21], 'PostScript', 'sid', null],
|
|
190
|
+
[[12, 22], 'BaseFontName', 'sid', null],
|
|
191
|
+
[[12, 23], 'BaseFontBlend', 'delta', null],
|
|
192
192
|
|
|
193
193
|
// CID font specific
|
|
194
|
-
[[12, 31],
|
|
195
|
-
[[12, 32],
|
|
196
|
-
[[12, 33],
|
|
197
|
-
[[12, 34],
|
|
198
|
-
[[12, 35],
|
|
199
|
-
[[12, 37],
|
|
200
|
-
[[12, 36],
|
|
201
|
-
[[12, 38],
|
|
194
|
+
[[12, 31], 'CIDFontVersion', 'number', 0],
|
|
195
|
+
[[12, 32], 'CIDFontRevision', 'number', 0],
|
|
196
|
+
[[12, 33], 'CIDFontType', 'number', 0],
|
|
197
|
+
[[12, 34], 'CIDCount', 'number', 8720],
|
|
198
|
+
[[12, 35], 'UIDBase', 'number', null],
|
|
199
|
+
[[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],
|
|
200
|
+
[[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],
|
|
201
|
+
[[12, 38], 'FontName', 'sid', null]
|
|
202
202
|
]);
|
|
203
203
|
|
|
204
204
|
let VariationStore = new r.Struct({
|
|
205
205
|
length: r.uint16,
|
|
206
206
|
itemVariationStore: ItemVariationStore
|
|
207
|
-
})
|
|
207
|
+
});
|
|
208
208
|
|
|
209
209
|
let CFF2TopDict = new CFFDict([
|
|
210
|
-
[[12, 7],
|
|
211
|
-
[17,
|
|
212
|
-
[[12, 37],
|
|
213
|
-
[[12, 36],
|
|
214
|
-
[24,
|
|
215
|
-
[25,
|
|
210
|
+
[[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],
|
|
211
|
+
[17, 'CharStrings', new CFFPointer(new CFFIndex()), null],
|
|
212
|
+
[[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],
|
|
213
|
+
[[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],
|
|
214
|
+
[24, 'vstore', new CFFPointer(VariationStore), null],
|
|
215
|
+
[25, 'maxstack', 'number', 193]
|
|
216
216
|
]);
|
|
217
217
|
|
|
218
218
|
let CFFTop = new r.VersionedStruct(r.fixed16, {
|
|
219
219
|
1: {
|
|
220
|
-
hdrSize:
|
|
221
|
-
offSize:
|
|
222
|
-
nameIndex:
|
|
223
|
-
topDictIndex:
|
|
224
|
-
stringIndex:
|
|
225
|
-
globalSubrIndex:
|
|
220
|
+
hdrSize: r.uint8,
|
|
221
|
+
offSize: r.uint8,
|
|
222
|
+
nameIndex: new CFFIndex(new r.String('length')),
|
|
223
|
+
topDictIndex: new CFFIndex(CFFTopDict),
|
|
224
|
+
stringIndex: new CFFIndex(new r.String('length')),
|
|
225
|
+
globalSubrIndex: new CFFIndex()
|
|
226
226
|
},
|
|
227
227
|
|
|
228
228
|
2: {
|
|
229
|
-
hdrSize:
|
|
230
|
-
length:
|
|
231
|
-
topDict:
|
|
232
|
-
globalSubrIndex:
|
|
229
|
+
hdrSize: r.uint8,
|
|
230
|
+
length: r.uint16,
|
|
231
|
+
topDict: CFF2TopDict,
|
|
232
|
+
globalSubrIndex: new CFFIndex()
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
235
|
|
package/src/decorators.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export function cache(target, key, descriptor) {
|
|
7
7
|
if (descriptor.get) {
|
|
8
8
|
let get = descriptor.get;
|
|
9
|
-
descriptor.get = function() {
|
|
9
|
+
descriptor.get = function () {
|
|
10
10
|
let value = get.call(this);
|
|
11
11
|
Object.defineProperty(this, key, { value });
|
|
12
12
|
return value;
|
|
@@ -16,7 +16,7 @@ export function cache(target, key, descriptor) {
|
|
|
16
16
|
|
|
17
17
|
return {
|
|
18
18
|
get() {
|
|
19
|
-
let cache = new Map;
|
|
19
|
+
let cache = new Map();
|
|
20
20
|
function memoized(...args) {
|
|
21
21
|
let key = args.length > 0 ? args[0] : 'value';
|
|
22
22
|
if (cache.has(key)) {
|
|
@@ -28,7 +28,7 @@ export function cache(target, key, descriptor) {
|
|
|
28
28
|
return result;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
Object.defineProperty(this, key, {value: memoized});
|
|
31
|
+
Object.defineProperty(this, key, { value: memoized });
|
|
32
32
|
return memoized;
|
|
33
33
|
}
|
|
34
34
|
};
|