Automattic/node-canvas

Allow registering custom fonts from a buffer

Open

#386 aperta il 13 feb 2014

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)JavaScript (1140 fork)batch import
FeatureHelp wantedText & Fonts

Metriche repository

Star
 (9524 star)
Metriche merge PR
 (Merge medio 34g 18h) (2 PR mergiate in 30 g)

Descrizione

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.

Guida contributor