Automattic/node-canvas

Allow registering custom fonts from a buffer

Open

#386 aberto em 13 de fev. de 2014

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (1.140 forks)batch import
FeatureHelp wantedText & Fonts

Métricas do repositório

Stars
 (9.524 stars)
Métricas de merge de PR
 (Mesclagem média 34d 18h) (2 fundiu PRs em 30d)

Description

For use with jsdom package which simulates browser DOM in node.js and use node-canvas for canvas implementation a support to load fonts (truetype and openfont) from a buffer/content is needed. Because in HTML a custom font face can be specified as an URL, jsdom resolves this URL to a buffer/content by itself. So registration with buffer/content should be possible.

See https://github.com/tmpvar/jsdom/issues/744 for more details.

Guia do colaborador