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

fontnik

Package Overview
Dependencies
Maintainers
36
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontnik

A library that delivers a range of glyphs rendered as SDFs (signed distance fields) in a protobuf.

  • 0.4.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
271
decreased by-1.81%
Maintainers
36
Weekly downloads
 
Created
Source

node-fontnik

NPM Build Status Coverage Status

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

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.

API

Installing

By default, installs binaries. On these platforms no external dependencies are needed.

  • 64 bit OS X or 64 bit Linux
  • Node v0.8.x or v0.10.x

Just run:

npm install

However, other platforms will fall back to a source compile: see building from source for details.

Building from source

Make sure you have boost, freetype, and protobuf installed. With Homebrew, you can type brew install boost --c++11 freetype protobuf --c++11. The Makefile uses pkg-config to find these libraries and links dynamically to them, so make sure that pkg-config can find them.

npm install --build-from-source

Background reading

Keywords

FAQs

Package last updated on 22 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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