Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svg2ttf-new

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg2ttf-new - npm Package Compare versions

Comparing version 5.3.0-beta.1 to 5.3.0-beta.2

13

lib/ttf/tables/os2.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc