@web-padawan/wc-icons-tool 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-padawan/wc-icons-tool",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "./bin/wc-icons-tool",
5
5
  "bin": {
6
6
  "wc-icons-tool": "./bin/wc-icons-tool"
@@ -15,11 +15,16 @@
15
15
  "description": "Tool for building Vaadin icons",
16
16
  "files": [
17
17
  "bin",
18
+ "patches",
18
19
  "tasks"
19
20
  ],
21
+ "scripts": {
22
+ "postinstall": "patch-package"
23
+ },
20
24
  "dependencies": {
21
25
  "cheerio": "^1.0.0",
22
26
  "glob": "^13.0.0",
27
+ "patch-package": "^8.0.1",
23
28
  "svgicons2svgfont": "^14.0.2",
24
29
  "svg2ttf": "6.0.3",
25
30
  "ttf2woff": "3.0.0"
@@ -0,0 +1,35 @@
1
+ diff --git a/node_modules/svg2ttf/lib/sfnt.js b/node_modules/svg2ttf/lib/sfnt.js
2
+ index f303f2a..0907cbf 100644
3
+ --- a/node_modules/svg2ttf/lib/sfnt.js
4
+ +++ b/node_modules/svg2ttf/lib/sfnt.js
5
+ @@ -15,13 +15,7 @@ function Font() {
6
+ this.italicAngle = 0;
7
+ this.familyClass = 0; // No Classification
8
+ this.familyName = '';
9
+ -
10
+ - // 0x40 - REGULAR - Characters are in the standard weight/style for the font
11
+ - // 0x80 - USE_TYPO_METRICS - use OS/2.sTypoAscender - OS/2.sTypoDescender + OS/2.sTypoLineGap as the default line spacing
12
+ - // https://docs.microsoft.com/en-us/typography/opentype/spec/os2#fsselection
13
+ - // https://github.com/fontello/svg2ttf/issues/95
14
+ - this.fsSelection = 0x40 | 0x80;
15
+ -
16
+ + this.fsSelection = 0x40; // Characters are in the standard weight/style for the font.
17
+ // Non zero value can cause issues in IE, https://github.com/fontello/svg2ttf/issues/45
18
+ this.fsType = 0;
19
+ this.lowestRecPPEM = 8;
20
+ diff --git a/node_modules/svg2ttf/lib/ttf/tables/os2.js b/node_modules/svg2ttf/lib/ttf/tables/os2.js
21
+ index 197d4cf..8f1feae 100644
22
+ --- a/node_modules/svg2ttf/lib/ttf/tables/os2.js
23
+ +++ b/node_modules/svg2ttf/lib/ttf/tables/os2.js
24
+ @@ -71,10 +71,7 @@ function createOS2Table(font) {
25
+ buf.writeInt16(font.ascent); // sTypoAscender
26
+ buf.writeInt16(font.descent); // sTypoDescender
27
+ buf.writeInt16(font.lineGap); // lineGap
28
+ - // Enlarge win acscent/descent to avoid clipping
29
+ - // WinAscent - WinDecent should at least be equal to TypoAscender - TypoDescender + TypoLineGap:
30
+ - // https://www.high-logic.com/font-editor/fontcreator/tutorials/font-metrics-vertical-line-spacing
31
+ - buf.writeInt16(Math.max(font.yMax, font.ascent + font.lineGap)); // usWinAscent
32
+ + buf.writeInt16(Math.max(font.yMax, font.ascent)); // usWinAscent
33
+ buf.writeInt16(-Math.min(font.yMin, font.descent)); // usWinDescent
34
+ buf.writeInt32(1); // ulCodePageRange1, Latin 1
35
+ buf.writeInt32(0); // ulCodePageRange2