svg2ttf-new
Advanced tools
Comparing version 6.1.0-beta.1 to 6.1.0-beta.2
@@ -0,1 +1,13 @@ | ||
6.0.2 / 2021-07-01 | ||
------------------ | ||
- Glyphs that don't fit in int32 now throw an error instead of generating invalid font, #113. | ||
6.0.1 / 2021-06-17 | ||
------------------ | ||
- `OS/2` table version reduced (5 => 4), #110. | ||
6.0.0 / 2021-05-27 | ||
@@ -2,0 +14,0 @@ ------------------ |
@@ -104,2 +104,3 @@ /* | ||
glyph.name = svgGlyph.name; | ||
glyph.codes = svgGlyph.ligatureCodes || svgGlyph.unicode; // needed for nice validator error output | ||
glyph.d = svgGlyph.d; | ||
@@ -106,0 +107,0 @@ glyph.height = !isNaN(svgGlyph.height) ? svgGlyph.height : font.height; |
@@ -267,2 +267,3 @@ 'use strict'; | ||
this.id = ''; | ||
this.codes = []; // needed for nice validator error output | ||
this.height = 0; | ||
@@ -285,2 +286,7 @@ this.name = ''; | ||
}); | ||
if (xMin < -32768) { | ||
throw new Error('xMin value for glyph ' + (this.name ? ('"' + this.name + '"') : JSON.stringify(this.codes)) + | ||
' is out of bounds (actual ' + xMin + ', expected -32768..32767, d="' + this.d + '")'); | ||
} | ||
return hasPoints ? xMin : 0; | ||
@@ -302,2 +308,7 @@ } | ||
}); | ||
if (xMax > 32767) { | ||
throw new Error('xMax value for glyph ' + (this.name ? ('"' + this.name + '"') : JSON.stringify(this.codes)) + | ||
' is out of bounds (actual ' + xMax + ', expected -32768..32767, d="' + this.d + '")'); | ||
} | ||
return hasPoints ? xMax : this.width; | ||
@@ -319,2 +330,7 @@ } | ||
}); | ||
if (yMin < -32768) { | ||
throw new Error('yMin value for glyph ' + (this.name ? ('"' + this.name + '"') : JSON.stringify(this.codes)) + | ||
' is out of bounds (actual ' + yMin + ', expected -32768..32767, d="' + this.d + '")'); | ||
} | ||
return hasPoints ? yMin : 0; | ||
@@ -336,2 +352,7 @@ } | ||
}); | ||
if (yMax > 32767) { | ||
throw new Error('yMax value for glyph ' + (this.name ? ('"' + this.name + '"') : JSON.stringify(this.codes)) + | ||
' is out of bounds (actual ' + yMax + ', expected -32768..32767, d="' + this.d + '")'); | ||
} | ||
return hasPoints ? yMax : 0; | ||
@@ -338,0 +359,0 @@ } |
@@ -15,3 +15,3 @@ 'use strict'; | ||
// Non zero lineGap causes offset in IE, https://github.com/fontello/svg2ttf/issues/37 | ||
buf.writeInt16(0); // lineGap | ||
buf.writeInt16(font.lineGap); // lineGap | ||
buf.writeUint16(font.maxWidth); // advanceWidthMax | ||
@@ -18,0 +18,0 @@ buf.writeInt16(font.minLsb); // minLeftSideBearing |
@@ -73,3 +73,3 @@ 'use strict'; | ||
buf.writeInt16(font.descent); // sTypoDescender | ||
buf.writeInt16(font.lineGap); // lineGap | ||
buf.writeInt16(0); // lineGap | ||
// Enlarge win acscent/descent to avoid clipping | ||
@@ -76,0 +76,0 @@ // WinAscent - WinDecent should at least be equal to TypoAscender - TypoDescender + TypoLineGap: |
{ | ||
"name": "svg2ttf-new", | ||
"version": "6.1.0-beta.1", | ||
"version": "6.1.0-beta.2", | ||
"description": "Converts SVG font to TTF font", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,2 +0,2 @@ | ||
svg2ttf | ||
svg2ttf-new | ||
======= | ||
@@ -25,3 +25,3 @@ | ||
``` bash | ||
npm install -g svg2ttf | ||
npm install -g svg2ttf-new | ||
``` | ||
@@ -28,0 +28,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83471
2172