Skip to content
/ font2c Public

Generate C code for TrueType, OpenType and others supported by FreeType

Notifications You must be signed in to change notification settings

haaln/font2c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

font2c

sample

font2c.py is a small Python script that generates C code for TrueType, OpenType and other fonts supported by FreeType. The generated code can be compiled and linked directly into C programs to enable text drawing without any external libraries. Example C code for using the generated code is included. This is mainly intended for use in embedded systems. Based on another library that needed fixing.

Dependencies

  • Any C compiler
  • python3
  • pip3

Installation

./install.sh

Usage

./font2c.py [-h] -f FILE [-s SIZE]

where FILE is the font file you wish to convert and SIZE its size in pixels.

NOTE

To see the result just compile main.c after running the script.

gcc -std=c99 src/main.c

About

Generate C code for TrueType, OpenType and others supported by FreeType

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published