Skip to content

luizbills/font4x6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4x6 monochrome bitmap font for rendering

A simple and tiny 4x6 bitmap font.

font4x6_basic.h contains unicode points U+0000 - U+007F.

That second image have been scaled in 400% to improve visualization.

Encoding

Every character in the font is encoded in 3 bytes.

Each byte represents 2 rows of a 4x6 grid and the least significant bit of each nibble corresponds to the first pixel in row.

E.g.: The character 'A' (0x41 / 65) is encoded as { 0x25, 0x75, 0x50 }

0x25 => 0010 0101 => .X..
                     X.X.
0x75 => 0111 0101 => XXX.
                     X.X.
0x50 => 0101 0000 => X.X.
                     ....

Renderer

To visualize the font, a simple renderer is included in render.c

$ gcc render.c -o render
$ ./render 65
 X
X X
XXX
X X
X X

Inspiration

This repository only exists thanks to:

Projects using this font

LICENSE

This repository is (un)licensed under Public Domain, so take it and do whatever you want with it. Credits are not required but much appreciated.

About

4x6 tiny monochrome bitmap font for rendering

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages