Skip to content
forked from AriZuu/ttf2ugui

Simple utility to convert TTF fonts into uGUI bitmap fonts.

Notifications You must be signed in to change notification settings

fyyy4030/ttf2ugui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ttf2ugui

uGUI is a free open source graphics library for embedded systems. To display text, it uses bitmap/raster fonts, that are included in application as C-language structs & arrays. uGUI includes some fonts in itself, but I wanted to use some TrueType fonts.

I didn't find a tool that would convert a .ttf file into C structures used by uGUI easily, so I wrote one using Freetype library.

This is a simple utility to convert TrueType fonts into uGUI compatible structures. It reads font file, renders each character into bitmap and outputs it as uGUI compatible C structure.

Optionally it can display ascii art sample of font by using UGUI to render pixels as '*' with ansi escape sequences.

Please remember to respect font copyrights when converting.

Examples:

Convert font in Luna.ttf to 14 point size bitmap font for 140 DPI display:

ttf2ugui --font Luna.ttf --dpi 140 --size 14 --dump > luna.c

Show ascii art of same font:

ttf2ugui --font Luna.ttf --dpi 140 --size 14 --show

About

Simple utility to convert TTF fonts into uGUI bitmap fonts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%