svg2ttf-new
Advanced tools
Comparing version 5.3.0-beta.1 to 5.3.0-beta.2
@@ -65,6 +65,13 @@ 'use strict'; | ||
buf.writeInt16(font.lineGap); // lineGap | ||
// Enlarge win acscent/descent to avoid clipping | ||
// TODO: Set os2 winAscent/winDescent to the same values as font bounding box. | ||
buf.writeInt16(font.ascent); // usWinAscent | ||
buf.writeInt16(-(font.descent)); // usWinDescent | ||
// In IE9, 10, 11, if usWinAscent=usWinDescent=0, IE will report an error and refuse to display. | ||
// Spec: https://docs.microsoft.com/en-us/typography/opentype/spec/os2#uswinascent | ||
// ufo2ft: https://github.com/googlefonts/ufo2ft/blob/a5267d135d5a8dba7e6a5d3ac44139afa6159429/Lib/ufo2ft/fontInfoData.py#L245-L246 | ||
buf.writeInt16(font.ascent + font.lineGap); // usWinAscent(Windows ascender), Fallback to ascender + typoLineGap. | ||
// Spec: https://docs.microsoft.com/en-us/typography/opentype/spec/os2#uswindescent | ||
// ufo2ft: https://github.com/googlefonts/ufo2ft/blob/a5267d135d5a8dba7e6a5d3ac44139afa6159429/Lib/ufo2ft/fontInfoData.py#L254 | ||
buf.writeInt16(Math.abs(font.descent)); // usWinDescent(Windows descender), Fallback to descender. | ||
buf.writeInt32(1); // ulCodePageRange1, Latin 1 | ||
@@ -71,0 +78,0 @@ buf.writeInt32(0); // ulCodePageRange2 |
{ | ||
"name": "svg2ttf-new", | ||
"version": "5.3.0-beta.1", | ||
"version": "5.3.0-beta.2", | ||
"description": "Converts SVG font to TTF font", | ||
@@ -29,3 +29,3 @@ "keywords": [ | ||
"argparse": "^2.0.1", | ||
"cubic2quad": "^1.0.0", | ||
"cubic2quad": "^1.2.0", | ||
"lodash": "^4.17.10", | ||
@@ -32,0 +32,0 @@ "microbuffer": "^1.0.0", |
@@ -1,2 +0,2 @@ | ||
svg2ttf | ||
svg2ttf-new | ||
======= | ||
@@ -3,0 +3,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
81160
2137
Updatedcubic2quad@^1.2.0