Socket
Socket
Sign inDemoInstall

@foliojs-fork/fontkit

Package Overview
Dependencies
103
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.9.0 to 1.9.1

4

package.json
{
"name": "@foliojs-fork/fontkit",
"version": "1.9.0",
"version": "1.9.1",
"description": "An advanced font engine for Node and the browser",

@@ -54,3 +54,3 @@ "keywords": [

"dfa": "^1.2.0",
"@foliojs-fork/restructure": "^2.0.1",
"@foliojs-fork/restructure": "^2.0.2",
"tiny-inflate": "^1.0.2",

@@ -57,0 +57,0 @@ "unicode-properties": "^1.2.2",

@@ -1,5 +0,8 @@

# fontkit
# Fork of fontkit [![npm][npm_img]][npm_url]
Fontkit is an advanced font engine for Node and the browser, used by [PDFKit](https://github.com/devongovett/pdfkit). It supports many font formats, advanced glyph substitution and layout features, glyph path extraction, color emoji glyphs, font subsetting, and more.
[npm_img]: https://img.shields.io/npm/v/@foliojs-fork/fontkit.svg
[npm_url]: https://www.npmjs.com/package/@foliojs-fork/fontkit
Fontkit is an advanced font engine for Node and the browser, used by [PDFKit](https://github.com/foliojs-fork/pdfkit). It supports many font formats, advanced glyph substitution and layout features, glyph path extraction, color emoji glyphs, font subsetting, and more.
## Features

@@ -18,5 +21,18 @@

## Why fork?
Because the original repo is no longer maintained and exists a lot of PRs with improvements/fixes.
This forks contains these changes:
- [Update build to babel 7](https://github.com/foliojs/fontkit/pull/196)
- [Fix deprecated usage new Buffer](https://github.com/foliojs/fontkit/pull/227)
- [Mocha: non-existent fonts report as pending](https://github.com/foliojs/fontkit/pull/226)
- [Update restructure to v2](https://github.com/foliojs/fontkit/pull/225)
- Move to [foliojs-fork/restructure](https://github.com/foliojs-fork/restructure) (see [Why fork?](https://github.com/foliojs-fork/restructure#why-fork))
- [Migrate do GitHub Actions](https://github.com/foliojs-fork/fontkit/pull/4)
- [Fix Noto font bug](https://github.com/foliojs/fontkit/pull/230)
## Installation
npm install fontkit
npm install @foliojs-fork/fontkit

@@ -23,0 +39,0 @@ ## Example

@@ -58,2 +58,3 @@ import Subset from './Subset';

let used_subrs = [];
let fd_select = {};
for (let gid of this.glyphs) {

@@ -68,6 +69,7 @@ let fd = this.cff.fdForGlyph(gid);

used_subrs.push({});
fd_select[fd] = topDict.FDArray.length - 1;
}
used_fds[fd] = true;
topDict.FDSelect.fds.push(topDict.FDArray.length - 1);
topDict.FDSelect.fds.push(fd_select[fd]);

@@ -77,3 +79,3 @@ let glyph = this.font.getGlyph(gid);

for (let subr in glyph._usedSubrs) {
used_subrs[used_subrs.length - 1][subr] = true;
used_subrs[fd_select[fd]][subr] = true;
}

@@ -80,0 +82,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc