Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/andormade/spritefont-loader
- Owner: andormade
- License: mit
- Created: 2017-11-12T19:25:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-18T20:48:36.000Z (over 6 years ago)
- Last Synced: 2024-10-08T10:14:50.232Z (about 1 month ago)
- Language: JavaScript
- Size: 65.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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