https://github.com/apidcloud/msdf-bmfont-experiments
Several experiments with MSDF BMFont texture and spec generation
https://github.com/apidcloud/msdf-bmfont-experiments
Last synced: 8 months ago
JSON representation
Several experiments with MSDF BMFont texture and spec generation
- Host: GitHub
- URL: https://github.com/apidcloud/msdf-bmfont-experiments
- Owner: Apidcloud
- License: mit
- Created: 2018-01-17T21:53:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T23:47:15.000Z (about 7 years ago)
- Last Synced: 2025-02-01T16:48:42.146Z (over 1 year ago)
- Language: JavaScript
- Size: 1.87 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MSDF BMFont Experiments

This repo basically takes a truetype font (e.g., OpenSans-Regular.ttf), generates a corresponding MSDF BMFont texture and spec, which are then used to render text using three.js on top of electron.
Based on the following:
- [msdfgen](https://github.com/Chlumsky/msdfgen)
- [msdf-bmfont](https://github.com/Jam3/msdf-bmfont)
- [msdf-bmfont-xml](https://github.com/soimy/msdf-bmfont-xml)
- [electron-quick-start](https://github.com/electron/electron-quick-start)
## Setup
Install dependencies
```sh
$ yarn install
```
## Basic usage
1. Run with prebuilt BMFont texture and spec (already inside `/fnt` folder)
```sh
$ npm start
```
2. Generate a new BMFont texture and spec
```sh
$ npm test
```
3. Generate and run
```sh
$ npm run debug
```