Git Product home page Git Product logo

fontmachine's Introduction

DEPRECATED @mapbox/fontmachine

Build Status codecov

โš ๏ธ This code is deprecated, which means it is no longer maintained and will not receive updates. Instead of this library, we recommend using node-fontnik directly.

Make GL-ready pbfs and metadata for usage in fontstack API.

makeGlyphs(opts, callback)

Make all metadata (codepoints) and SDF PBFs necessary for Mapbox GL fontstacks.

Parameters

parameter type description
opts Object Options object with required font and filetype properties, and any optional parameters.
opts.font Buffer The font file as a Buffer.
opts.filetype string Type of font (e.g. '.ttf' or '.otf').
[opts.concurrency] number optional: Concurrency to use when processing font into PBFs. If undefined, concurrency is unbounded.
callback function(err, result) Callback takes arguments (error, result).

Callback result

property type description
name string The name of this font (concatenated family_name + style_name).
stack Array<{name: string, data: Buffer}> An array of 256 {name: filename, data: buffer} objects with SDF PBFs covering points 0-65535.
metadata {family_name: string, style_name: string} Metadata about the font.
codepoints Array<int> Array of codepoints covered by the font.
original {name: string, data: Buffer} An object containing the original font file (named 'original<filetype>')

Installation

Requires nodejs.

$ npm install @mapbox/fontmachine

Tests

$ npm test

fontmachine's People

Contributors

ian29 avatar jingsam avatar jseppi avatar mikemorris avatar springmeyer avatar tmcw avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fontmachine's Issues

can't donwload gz from aws

Trying to install fontmachine to produce our own glyphs, all I get is

node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://mapbo
x-node-binary.s3.amazonaws.com/fontnik/v0.4.4/node-v46-win32-ia32.tar.gz

Pasting the failing URL
AccessDeniedAccess Denied825BE3E4E7398F362JPlI2GfGByQ1bGkFSAA3iyUF49JbHZUufYzFt0bmrGVYqy+f6VszPbFA90oTVpP

Usage

How do we actually use this to turn a TTF into PBF's for MapBox?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.