Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/superilu/grxfntconv
- Owner: SuperIlu
- License: other
- Created: 2021-08-15T15:32:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-01T17:08:54.000Z (over 2 years ago)
- Last Synced: 2024-10-29T14:00:01.548Z (3 months ago)
- Topics: allegro, bdf, bdf-font, converter, font, grx, ttf
- Language: C
- Homepage:
- Size: 211 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!