Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andormade/spritefont-loader

Renders sprite fonts in the browser
https://github.com/andormade/spritefont-loader

Last synced: 9 days ago
JSON representation

Renders sprite fonts in the browser

Awesome Lists containing this project

README

        

[![npm version][npm-svg]][npm-url]
[![Build Status][travis-svg]][travis-url]
[![Dependency Status][david-deps-svg]][david-deps-url]
[![Dev dependency Status][david-devdeps-svg]][david-devdeps-url]

# spritefont-loader
Loads sprite fonts into the browser that were generated with the [sprite font generator](https://github.com/andormade/spritefont).

## Installation
This module is distributed via npm:
```
npm install spritefont-loader
```

## Usage
```
import SpritefontLoader from 'spritefont-loader';

const options = { rows: 8, cols: 4, colors: [#ffffff, #00000]};
const spriteFont = SpritefontLoader.load('spritefont.png', options);
```

This code is released under the MIT license, feel free to do whatever you want with it.

[npm-svg]: https://img.shields.io/npm/v/spritefont-loader.svg
[npm-url]: https://www.npmjs.com/package/spritefont-loader
[travis-svg]: https://travis-ci.org/andormade/spritefont-loader.svg?branch=master
[travis-url]: https://travis-ci.org/andormade/spritefont-loader
[david-deps-svg]: https://david-dm.org/andormade/spritefont-loader.svg
[david-deps-url]: https://david-dm.org/andormade/spritefont-loader
[david-devdeps-svg]: https://david-dm.org/andormade/spritefont-loader/dev-status.svg
[david-devdeps-url]: https://david-dm.org/andormade/spritefont-loader#info=devDependencies