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

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: 5 months ago
JSON representation

Simple-to-use single header modular font rendering library written in C.

Awesome Lists containing this project

README

        

# RFont
![logo](logo.png)
![image](Screenshot.png)

Simple single header modular font rendering library\
The library is designed to be lightweight while also supporting the ablitiy to add your own rendering system.\

## Build statuses
![cplus workflow](https://github.com/ColleagueRiley/RFont/actions/workflows/linux.yml/badge.svg)
![cplus workflow windows](https://github.com/ColleagueRiley/RFont/actions/workflows/windows.yml/badge.svg)
![cplus workflow windows](https://github.com/ColleagueRiley/RFont/actions/workflows/macos.yml/badge.svg)

# Native supported rendering APIs

- OpenGL Legacy
- Modern OpenGL (opengl 3.3 +)
- RGL (OPENGL version abstraction layer)

# Contacts
- email : [email protected]
- discord : ColleagueRiley
- discord server : https://discord.gg/pXVNgVVbvh

# Documentation
For documentation read the `RFont.h` file and check out the example in `./example`

# todo
- backup font system for when a character is not supported by the main font

# 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.