Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/superilu/grxfntconv

Convert TTF or BDF fonts to GRX format used by (M)GRX, Allegro, etc
https://github.com/superilu/grxfntconv

allegro bdf bdf-font converter font grx ttf

Last synced: 26 days ago
JSON representation

Convert TTF or BDF fonts to GRX format used by (M)GRX, Allegro, etc

Awesome Lists containing this project

README

        

# GrxFntConv
This tool (aka "dirty hack") can be used to convert TTF or BDF fonts to the GRX format used by [DOjS](https://github.com/SuperIlu/DOjS), [Allegro](https://liballeg.org/), [MGRX](http://www.fgrim.com/mgrx/) and [GRX](http://grx.gnu.de/).

It uses [libschrift](https://github.com/tomolt/libschrift) for loading and rendering TTFs and MGRX code to write out GRX, FNA and GRX-as-C-source output. The BDF parser was cobbled together by me w/o documentation just using some examples and the english Wikipedia page.

When converting fonts make sure the resuting filename ends with ".FNT", other extensions do not work with Allegro.

I might provide pre-compiled DOS, Linux and Win32 binaries later...

## Usage
```
Usage:
fntconv [-cf]
```
Please note: the `-f` flag is only for testing purposes and `-c` generates C code to be compiled into you program. Both flags should not be used when converting fonts to be loaded from disk with Allegro or GRX. Also: both flags are quite untested!

## License
My code and everything MGRX is licensed under GPLv2 (see LICENSE).
Libschrift is licensed under ISC (see libschrift/LICENSE).

## Disclaimer
Because I have absolutely no clue about font rendering I took several shortcuts when calculation offsets, sizes and other stuff. So expect weird results and warning messages when using this!