font-atlas

WebJar for font-atlas

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

font-atlas
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

font-atlas
WebJar for font-atlas
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/hughsk/font-atlas

Download font-atlas

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/font-atlas/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>font-atlas</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/font-atlas/
implementation 'org.webjars.npm:font-atlas:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/font-atlas/
implementation ("org.webjars.npm:font-atlas:2.1.0")
'org.webjars.npm:font-atlas:jar:2.1.0'
<dependency org="org.webjars.npm" name="font-atlas" rev="2.1.0">
  <artifact name="font-atlas" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='font-atlas', version='2.1.0')
)
libraryDependencies += "org.webjars.npm" % "font-atlas" % "2.1.0"
[org.webjars.npm/font-atlas "2.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : css-font jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

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

Versions

Version
2.1.0