@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.
Files changed (115) hide show
  1. package/dist/browser-module.mjs +28 -28
  2. package/dist/browser-module.mjs.map +1 -1
  3. package/dist/browser.cjs +28 -28
  4. package/dist/browser.cjs.map +1 -1
  5. package/dist/main.cjs +28 -28
  6. package/dist/main.cjs.map +1 -1
  7. package/dist/module.mjs +28 -28
  8. package/dist/module.mjs.map +1 -1
  9. package/package.json +2 -1
  10. package/src/CmapProcessor.js +2 -2
  11. package/src/DFont.js +5 -5
  12. package/src/TTFFont.js +11 -15
  13. package/src/TrueTypeCollection.js +10 -10
  14. package/src/WOFF2Font.js +0 -6
  15. package/src/aat/AATFeatureMap.js +21 -22
  16. package/src/aat/AATLayoutEngine.js +1 -1
  17. package/src/aat/AATLookupTable.js +2 -2
  18. package/src/aat/AATMorxProcessor.js +14 -14
  19. package/src/aat/AATStateMachine.js +3 -3
  20. package/src/base.js +1 -1
  21. package/src/cff/CFFDict.js +2 -2
  22. package/src/cff/CFFFont.js +1 -1
  23. package/src/cff/CFFIndex.js +4 -4
  24. package/src/cff/CFFOperand.js +1 -11
  25. package/src/cff/CFFPrivateDict.js +20 -20
  26. package/src/cff/CFFStandardStrings.js +67 -67
  27. package/src/cff/CFFTop.js +58 -58
  28. package/src/decorators.js +3 -3
  29. package/src/encodings.js +111 -111
  30. package/src/glyph/CFFGlyph.js +3 -4
  31. package/src/glyph/COLRGlyph.js +2 -2
  32. package/src/glyph/Glyph.js +4 -4
  33. package/src/glyph/GlyphVariationProcessor.js +23 -28
  34. package/src/glyph/Path.js +14 -14
  35. package/src/glyph/SBIXGlyph.js +2 -2
  36. package/src/glyph/TTFGlyph.js +31 -38
  37. package/src/glyph/TTFGlyphEncoder.js +26 -26
  38. package/src/glyph/WOFF2Glyph.js +2 -2
  39. package/src/layout/GlyphRun.js +3 -3
  40. package/src/layout/KernProcessor.js +1 -1
  41. package/src/layout/LayoutEngine.js +13 -14
  42. package/src/layout/Script.js +25 -25
  43. package/src/layout/UnicodeLayoutEngine.js +5 -6
  44. package/src/opentype/GlyphInfo.js +1 -1
  45. package/src/opentype/GlyphIterator.js +2 -2
  46. package/src/opentype/OTProcessor.js +8 -8
  47. package/src/opentype/ShapingPlan.js +1 -2
  48. package/src/opentype/shapers/ArabicShaper.js +8 -8
  49. package/src/opentype/shapers/DefaultShaper.js +3 -3
  50. package/src/opentype/shapers/HangulShaper.js +35 -35
  51. package/src/opentype/shapers/HebrewShaper.js +5 -5
  52. package/src/opentype/shapers/IndicShaper.js +20 -20
  53. package/src/opentype/shapers/ThaiShaper.js +15 -15
  54. package/src/opentype/shapers/UniversalShaper.js +2 -2
  55. package/src/opentype/shapers/index.js +33 -33
  56. package/src/opentype/shapers/indic-data.js +2 -2
  57. package/src/packages/unicode-properties/data-trie.js +1 -1
  58. package/src/packages/unicode-properties/data.js +1 -1
  59. package/src/packages/unicode-properties/dist/index.cjs +1 -1
  60. package/src/packages/unicode-properties/dist/index.cjs.map +2 -2
  61. package/src/packages/unicode-properties/dist/index.mjs +1 -1
  62. package/src/packages/unicode-properties/dist/index.mjs.map +2 -2
  63. package/src/packages/unicode-properties/generate.js +3 -4
  64. package/src/packages/unicode-properties/index.js +30 -30
  65. package/src/packages/unicode-properties/package.json +1 -1
  66. package/src/packages/unicode-trie/builder.js +18 -22
  67. package/src/packages/unicode-trie/dist/builder.cjs +6 -9
  68. package/src/packages/unicode-trie/dist/builder.cjs.map +2 -2
  69. package/src/packages/unicode-trie/dist/builder.mjs +6 -9
  70. package/src/packages/unicode-trie/dist/builder.mjs.map +2 -2
  71. package/src/packages/unicode-trie/dist/index.cjs.map +2 -2
  72. package/src/packages/unicode-trie/dist/index.mjs.map +2 -2
  73. package/src/packages/unicode-trie/index.js +1 -2
  74. package/src/packages/unicode-trie/package.json +1 -1
  75. package/src/packages/unicode-trie/swap.js +2 -2
  76. package/src/subset/Subset.js +2 -2
  77. package/src/subset/TTFSubset.js +5 -5
  78. package/src/tables/BASE.js +27 -27
  79. package/src/tables/COLR.js +9 -9
  80. package/src/tables/CPAL.js +1 -1
  81. package/src/tables/DSIG.js +7 -7
  82. package/src/tables/EBDT.js +0 -1
  83. package/src/tables/EBLC.js +3 -3
  84. package/src/tables/GDEF.js +17 -17
  85. package/src/tables/GPOS.js +74 -74
  86. package/src/tables/GSUB.js +37 -37
  87. package/src/tables/JSTF.js +16 -16
  88. package/src/tables/LTSH.js +3 -3
  89. package/src/tables/OS2.js +49 -49
  90. package/src/tables/PCLT.js +15 -15
  91. package/src/tables/VDMX.js +17 -17
  92. package/src/tables/VORG.js +7 -7
  93. package/src/tables/WOFF2Directory.js +2 -2
  94. package/src/tables/WOFFDirectory.js +18 -18
  95. package/src/tables/aat.js +2 -2
  96. package/src/tables/cmap.js +63 -63
  97. package/src/tables/directory.js +14 -14
  98. package/src/tables/gasp.js +5 -5
  99. package/src/tables/glyf.js +1 -1
  100. package/src/tables/hdmx.js +7 -7
  101. package/src/tables/head.js +16 -16
  102. package/src/tables/hhea.js +14 -14
  103. package/src/tables/hmtx.js +2 -2
  104. package/src/tables/index.js +0 -5
  105. package/src/tables/just.js +1 -1
  106. package/src/tables/kern.js +42 -42
  107. package/src/tables/loca.js +2 -2
  108. package/src/tables/maxp.js +15 -15
  109. package/src/tables/morx.js +16 -16
  110. package/src/tables/name.js +18 -18
  111. package/src/tables/opentype.js +91 -91
  112. package/src/tables/post.js +10 -10
  113. package/src/tables/variations.js +6 -6
  114. package/src/tables/vhea.js +14 -14
  115. 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
- ".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"
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([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));
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([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));
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, '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],
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], '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],
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], '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]
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], '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]
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: 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
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: r.uint8,
230
- length: r.uint16,
231
- topDict: CFF2TopDict,
232
- globalSubrIndex: new CFFIndex
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
  };