New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fontnik

Package Overview
Dependencies
Maintainers
14
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontnik - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0-dev.1

glyphs/0-255.pbf

8

CHANGELOG.md

@@ -0,1 +1,9 @@

# 0.6.0
- Adds node v12 and v14 support
- Adds `fontnik.composite`
- Drops `libprotobuf` dependency, uses `protozero` instead
- Requires c++14 compatible compiler
- Binaries are published using clang++ 10.0.0
# 0.5.2

@@ -2,0 +10,0 @@

16

package.json
{
"name": "fontnik",
"version": "0.5.3",
"version": "0.6.0-dev.1",
"description": "A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protobuf.",

@@ -26,7 +26,7 @@ "keywords": [

"dependencies": {
"glob": "^7.1.1",
"minimist": "^0.2.0",
"nan": "~2.10.0",
"node-pre-gyp": "^0.12.0",
"queue-async": "^1.0.7"
"glob": "^7.1.6",
"minimist": "^1.2.5",
"nan": "^2.14.1",
"node-pre-gyp": "^0.14.0",
"queue-async": "^1.2.1"
},

@@ -39,2 +39,3 @@ "devDependencies": {

"pbf": "^1.3.5",
"protocol-buffers": "^4.1.0",
"tape": "^4.2.2"

@@ -48,4 +49,3 @@ },

"install": "node-pre-gyp install --fallback-to-build=true",
"test": "./node_modules/.bin/tape test/**/*.test.js",
"prepublishOnly": "npm ls"
"test": "./node_modules/.bin/tape test/**/*.test.js"
},

@@ -52,0 +52,0 @@ "binary": {

@@ -7,6 +7,8 @@ # node-fontnik

A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protocol buffer. We use these encoded glyphs as the basic blocks of font rendering in [Mapbox GL](https://github.com/mapbox/mapbox-gl-js). SDF encoding is superior to traditional fonts for our usecase terms of scaling, rotation, and quickly deriving halos - WebGL doesn't have built-in font rendering, so the decision is between vectorization, which tends to be slow, and SDF generation.
A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protocol buffer. We use these encoded glyphs as the basic blocks of font rendering in [Mapbox GL](https://github.com/mapbox/mapbox-gl-js). SDF encoding is superior to traditional fonts for our usecase in terms of scaling, rotation, and quickly deriving halos - WebGL doesn't have built-in font rendering, so the decision is between vectorization, which tends to be slow, and SDF generation.
The approach this library takes is to parse and rasterize the font with Freetype (hence the C++ requirement), and then generate a distance field from that rasterized image.
See also [TinySDF](https://github.com/mapbox/tiny-sdf), which is a faster but less precise approach to generating SDFs for fonts.
## [API](API.md)

@@ -19,3 +21,3 @@

- 64 bit OS X or 64 bit Linux
- Node.js v0.10.x, v0.12.x, v4.x or v6.x
- Node.js v8-v14

@@ -35,4 +37,20 @@ Just run:

```
Building from source should automatically install `boost`, `freetype` and `protobuf` locally using [mason](https://github.com/mapbox/mason). These dependencies can be installed manually by running `./scripts/install_mason.sh`.
Building from source should automatically install `boost`, `freetype` and `protozero` locally using [mason](https://github.com/mapbox/mason). These dependencies can be installed manually by running `./scripts/install_deps.sh`.
## Local testing
Run tests with
```
npm test
```
If you make any changes to the C++ files in the `src/` directory, you'll need to recompile the node bindings (`fontnik.node`) before testing locally:
```
make
```
See the `Makefile` for additional tasks you can run, such as `make coverage`.
## Background reading

@@ -39,0 +57,0 @@ - [Drawing Text with Signed Distance Fields in Mapbox GL](https://www.mapbox.com/blog/text-signed-distance-fields/)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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