https://github.com/colleagueriley/rfont
Simple-to-use single header modular font rendering library written in C.
https://github.com/colleagueriley/rfont
font-library font-rendering fonts legacy-opengl lightweight linux macos modern-opengl modular opengl rgfw silicon simple-to-use single-header ttf windows
Last synced: 6 months ago
JSON representation
Simple-to-use single header modular font rendering library written in C.
- Host: GitHub
- URL: https://github.com/colleagueriley/rfont
- Owner: ColleagueRiley
- License: zlib
- Created: 2023-08-25T03:11:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-23T02:32:52.000Z (7 months ago)
- Last Synced: 2025-09-23T04:19:21.211Z (7 months ago)
- Topics: font-library, font-rendering, fonts, legacy-opengl, lightweight, linux, macos, modern-opengl, modular, opengl, rgfw, silicon, simple-to-use, single-header, ttf, windows
- Language: C
- Homepage:
- Size: 2.8 MB
- Stars: 45
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RFont


Simple single header modular library for font rendering and atlas management.\
The library is designed to be lightweight, `RFont.h` itself does not directly handle rendering calls, it passes raw data to the user defined renderer.
`RFont_gl` and `RFont_gl1` serve as examples of user defined renderers.
RFont is written in Pure C89. It uses `stdint.h` and `inline` by default.
Adding `#define RFONT_C89` will use fallbacks for `stdint.h` and `inline`.
## Build statuses



# Contacts
- email : ColleagueRiley@gmail.com
- discord : ColleagueRiley
- discord server : https://discord.gg/pXVNgVVbvh
# Documentation
For documentation read the `RFont.h` file and check out the example in `./example`
# uses
[A Terminal emulator created using RFont by Noxomix](https://github.com/noxomix/vterm_test)\
[RSGL (my GUI library)](https://github.com/ColleagueRiley/RSGL)
# Credits
# stb_truetype
RFont uses [stb_truetype](https://github.com/nothings/stb) for working with fonts.
A modified version of stb_truetype is included in the RFont header.\
But you can use an external copy by adding `#define RFONT_EXTERNAL_STB` to your code
# Fontstash
[Fontstash](https://github.com/memononen/fontstash) is another font rendering library with simular goals.
Fontash was used as a reference for some of this code.
However, this library is intended to have better perfromance and be more lightweight than fontstash.