Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

font-atlas

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-atlas

Populate a <canvas> element with a font texture atlas

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
161K
decreased by-12.68%
Maintainers
2
Weekly downloads
 
Created
Source

font-atlas experimental

Populate a <canvas> element with a font texture atlas – can be used to quickly generate bitmap fonts.

Usage

NPM

canvas = fontAtlas([options])

Populates and returns a <canvas> element with a font texture atlas. Takes the following options:

  • canvas: use an existing <canvas> element. By default, a new one will be created for you.
  • font: the font family to use when drawing the text. Can be a css font string or an object with font properties: size, family, style, weight, variant, stretch.
  • shape: an array containing the [width, height] for the canvas in pixels. Default: [512, 512].
  • step: an array containing the [width, height] for each cell in pixels. Default: [32, 32].
  • chars: may be one of either:
    • a string containing all of the characters to use.
    • an array of all the characters to use.
    • an array specifying the [start, end] character codes to use. By default, this is [32, 126].

See also

License

MIT. See LICENSE.md for details.

font-atlas

Keywords

FAQs

Package last updated on 20 Jun 2018

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