Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/webfreak001/bmfont-d

BMFont parser & encoder
https://github.com/webfreak001/bmfont-d

angelcode-bitmap-fonts angelcode-bmfont bmfont font parser

Last synced: 25 days ago
JSON representation

BMFont parser & encoder

Awesome Lists containing this project

README

        

# bmfont

Parser & generator for font files generated using AngelCode Bitmap Font Generator

## Usage

### Parsing files
```d
import bmfont;

import std.file;
import std.stdio : writeln;

auto font = parseFnt(cast(ubyte[]) read("fonts/roboto.fnt"));

writeln(font.info.fontName);
```

### Generating files
```d
import bmfont;

Font font; // ... set somewhere

string text = font.toString();
ubyte[] binary = font.toBinary();
```