Get The Pixel Data Of A Font Using JavaScript – fontpixels.js

Category: Javascript , Text | October 21, 2018
Author:TheGreatRambler
Views Total:284 views
Official Page:Go to website
Last Update:October 21, 2018
License:MIT

Preview:

Get The Pixel Data Of A Font Using JavaScript – fontpixels.js

Description:

fontpixels.js is a fancy JavaScrip library which makes use of JavaScript and Canvas to get the pixel data of any fonts you specify.

How to use it:

Import the fontpixels.js library into your document.

<script src="fontpixels.js"></script>

The JavaScript syntax.

var data = fontpixels.generatepixels(text, resolution, fontFamily, width, lines);

Parameters available.

  • text: text to output
  • resolution: the size and detail of the output
  • fontFamily: font family
  • width: line width in pixels
  • lines: whether to draw the text as lines

Changelog:

10/21/2018

  • JS update

You Might Be Interested In:


Leave a Reply