Socket
Socket
Sign inDemoInstall

ttfjs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ttfjs - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

lib/subset.js
var Subset = module.exports = function(font) {
this.font = font
this.subset = {}
this.mapping = {}
this.subset = { '32': 32 }
this.mapping = { '32': 32 }
this.pos = 33

@@ -11,2 +11,3 @@ }

var code = chars.charCodeAt(i)
if (code in this.mapping || code < 33) continue
this.subset[this.pos] = code

@@ -13,0 +14,0 @@ this.mapping[code] = this.pos++

2

lib/table/cmap.js

@@ -27,3 +27,3 @@ var Struct = require('structjs')

glyphIndexArray: Struct.Array(Struct.Uint16, function() {
var length = (this.length - (7 + this.segCount * 4) * 2) / 2
var length = (this.length - (8 + this.segCount * 4) * 2) / 2
return length

@@ -30,0 +30,0 @@ })

@@ -27,2 +27,16 @@ var Directory = require('./directory')

// workaround for browserify
if (false) {
require('./table/cmap')
require('./table/head')
require('./table/hhea')
require('./table/maxp')
require('./table/hmtx')
require('./table/loca')
require('./table/glyf')
require('./table/name')
require('./table/post')
require('./table/os2')
}
unpackTable('cmap')

@@ -92,3 +106,3 @@ for (var i = 0, len = this.tables.cmap.subtables.length; i < len; ++i) {

}
return width * this.scaleFactor * scale
return width * scale
}

@@ -95,0 +109,0 @@

@@ -7,3 +7,3 @@ {

},
"version": "0.1.0",
"version": "0.1.1",
"main": "./lib/ttf",

@@ -14,3 +14,3 @@ "homepage": "https://github.com/rkusa/ttfjs",

"dependencies": {
"structjs": "0.1.x"
"structjs": "0.2.x"
},

@@ -17,0 +17,0 @@ "bugs": "https://github.com/rkusa/ttfjs/issues",

@@ -7,3 +7,3 @@ # ttfjs

{ "name": "ttfjs",
"version": "0.1.0" }
"version": "0.1.1" }
```

@@ -13,3 +13,3 @@

The following tables are implemented: **cmap** (currently only format 4), **glyf** (glyphs are not actually decompose, only rewritten), **head**, **hhea**, **hmtx**, **loca**, **maxp**, **name**, **os2**, **post** (currently only format 3).
The following tables are implemented: **cmap** (currently only format 4), **glyf** (glyphs are not actually decomposed, only rewritten), **head**, **hhea**, **hmtx**, **loca**, **maxp**, **name**, **os2**, **post** (currently only format 3).

@@ -16,0 +16,0 @@ **TrueType Font Specification:** [Apple](https://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html), [Microsoft](http://www.microsoft.com/typography/specs/default.htm)

Sorry, the diff of this file is not supported yet

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