Source

vectorscope / asteroids-font.c

Trammell Hudson 81272f0 
















Trammell Hudson b49c121 
Trammell Hudson 81272f0 


Trammell Hudson b49c121 
Trammell Hudson 81272f0 

Trammell Hudson 388ec51 
Trammell Hudson 81272f0 
Trammell Hudson b49c121 





Trammell Hudson 5b13454 
Trammell Hudson b49c121 

























Trammell Hudson 388ec51 
Trammell Hudson a78c927 
Trammell Hudson 388ec51 















Trammell Hudson 52734a0 
Trammell Hudson 388ec51 
Trammell Hudson a78c927 
Trammell Hudson 388ec51 

Trammell Hudson 52734a0 
Trammell Hudson 388ec51 

Trammell Hudson 81272f0 
/** \file
 * Super simple font from Asteroids.
 *
 * http://www.edge-online.com/wp-content/uploads/edgeonline/oldfiles/images/feature_article/2009/05/asteroids2.jpg
 */

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <stdint.h>
#include "asteroids-font.h"

#define P(x,y)	((((x) & 0xF) << 4) | (((y) & 0xF) << 0))
#define UP 0xFE
#define LAST 0xFF
 
const PROGMEM asteroids_char_t asteroids_font[] = {
	['0' - 0x20] = { P(0,0), P(8,0), P(8,12), P(0,12), P(0,0), P(8,12), LAST },
	['1' - 0x20] = { P(4,0), P(4,12), P(3,10), LAST },
	['2' - 0x20] = { P(0,12), P(8,12), P(8,7), P(0,5), P(0,0), P(8,0), LAST },
	['3' - 0x20] = { P(0,12), P(8,12), P(8,0), P(0,0), UP, P(0,6), P(8,6), LAST },
	['4' - 0x20] = { P(0,12), P(0,6), P(8,6), UP, P(8,12), P(8,0), LAST },
	['5' - 0x20] = { P(0,0), P(8,0), P(8,6), P(0,7), P(0,12), P(8,12), LAST },
	['6' - 0x20] = { P(0,12), P(0,0), P(8,0), P(8,5), P(0,7), LAST },
	['7' - 0x20] = { P(0,12), P(8,12), P(8,6), P(4,0), LAST },
	['8' - 0x20] = { P(0,0), P(8,0), P(8,12), P(0,12), P(0,0), UP, P(0,6), P(8,6), },
	['9' - 0x20] = { P(8,0), P(8,12), P(0,12), P(0,7), P(8,5), LAST },
	[' ' - 0x20] = { LAST },
	['.' - 0x20] = { P(3,0), P(4,0), LAST },
	[',' - 0x20] = { P(2,0), P(4,2), LAST },
	['-' - 0x20] = { P(2,6), P(6,6), LAST },
	['+' - 0x20] = { P(1,6), P(7,6), UP, P(4,9), P(4,3), LAST },
	['!' - 0x20] = { P(4,0), P(3,2), P(5,2), P(4,0), UP, P(4,4), P(4,12), LAST },
	['#' - 0x20] = { P(0,4), P(8,4), P(6,2), P(6,10), P(8,8), P(0,8), P(2,10), P(2,2) },
	['^' - 0x20] = { P(2,6), P(4,12), P(6,6), LAST },
	['=' - 0x20] = { P(1,4), P(7,4), UP, P(1,8), P(7,8), LAST },
	['*' - 0x20] = { P(0,0), P(4,12), P(8,0), P(0,8), P(8,8), P(0,0), LAST },
	['_' - 0x20] = { P(0,0), P(8,0), LAST },
	['/' - 0x20] = { P(0,0), P(8,12), LAST },
	['\\' - 0x20] = { P(0,12), P(8,0), LAST },
	['@' - 0x20] = { P(8,4), P(4,0), P(0,4), P(0,8), P(4,12), P(8,8), P(4,4), P(3,6) },
	['$' - 0x20] = { P(6,2), P(2,6), P(6,10), UP, P(4,12), P(4,0), LAST },
	['&' - 0x20] = { P(8,0), P(4,12), P(8,8), P(0,4), P(4,0), P(8,4), LAST },
	['[' - 0x20] = { P(6,0), P(2,0), P(2,12), P(6,12), LAST },
	[']' - 0x20] = { P(2,0), P(6,0), P(6,12), P(2,12), LAST },
	['(' - 0x20] = { P(6,0), P(2,4), P(2,8), P(6,12), LAST },
	[')' - 0x20] = { P(2,0), P(6,4), P(6,8), P(2,12), LAST },
	['{' - 0x20] = { P(6,0), P(4,2), P(4,10), P(6,12), UP, P(2,6), P(4,6), LAST },
	['}' - 0x20] = { P(4,0), P(6,2), P(6,10), P(4,12), UP, P(6,6), P(8,6), LAST },
	['%' - 0x20] = { P(0,0), P(8,12), UP, P(2,10), P(2,8), UP, P(6,4), P(6,2) },
	['<' - 0x20] = { P(6,0), P(2,6), P(6,12), LAST },
	['>' - 0x20] = { P(2,0), P(6,6), P(2,12), LAST },
	['|' - 0x20] = { P(4,0), P(4,5), UP, P(4,6), P(4,12), LAST },
	[':' - 0x20] = { P(4,9), P(4,7), UP, P(4,5), P(4,3), LAST },
	[';' - 0x20] = { P(4,9), P(4,7), UP, P(4,5), P(1,2), LAST },
	['"' - 0x20] = { P(2,10), P(2,6), UP, P(6,10), P(6,6), LAST },
	['\'' - 0x20] = { P(2,6), P(6,10), LAST },
	['`' - 0x20] = { P(2,10), P(6,6), LAST },
	['~' - 0x20] = { P(0,4), P(2,8), P(6,4), P(8,8), LAST },
	['?' - 0x20] = { P(0,8), P(4,12), P(8,8), P(4,4), UP, P(4,1), P(4,0), LAST },
	['A' - 0x20] = { P(0,0), P(0,8), P(4,12), P(8,8), P(8,0), UP, P(0,4), P(8,4) },
	['B' - 0x20] = { P(0,0), P(0,12), P(4,12), P(8,10), P(4,6), P(8,2), P(4,0), P(0,0) },
	['C' - 0x20] = { P(8,0), P(0,0), P(0,12), P(8,12), LAST },
	['D' - 0x20] = { P(0,0), P(0,12), P(4,12), P(8,8), P(8,4), P(4,0), P(0,0), LAST },
	['E' - 0x20] = { P(8,0), P(0,0), P(0,12), P(8,12), UP, P(0,6), P(6,6), LAST },
	['F' - 0x20] = { P(0,0), P(0,12), P(8,12), UP, P(0,6), P(6,6), LAST },
	['G' - 0x20] = { P(6,6), P(8,4), P(8,0), P(0,0), P(0,12), P(8,12), LAST },
	['H' - 0x20] = { P(0,0), P(0,12), UP, P(0,6), P(8,6), UP, P(8,12), P(8,0) },
	['I' - 0x20] = { P(0,0), P(8,0), UP, P(4,0), P(4,12), UP, P(0,12), P(8,12) },
	['J' - 0x20] = { P(0,4), P(4,0), P(8,0), P(8,12), LAST },
	['K' - 0x20] = { P(0,0), P(0,12), UP, P(8,12), P(0,6), P(6,0), LAST },
	['L' - 0x20] = { P(8,0), P(0,0), P(0,12), LAST },
	['M' - 0x20] = { P(0,0), P(0,12), P(4,8), P(8,12), P(8,0), LAST },
	['N' - 0x20] = { P(0,0), P(0,12), P(8,0), P(8,12), LAST },
	['O' - 0x20] = { P(0,0), P(0,12), P(8,12), P(8,0), P(0,0), LAST },
	['P' - 0x20] = { P(0,0), P(0,12), P(8,12), P(8,6), P(0,5), LAST },
	['Q' - 0x20] = { P(0,0), P(0,12), P(8,12), P(8,4), P(0,0), UP, P(4,4), P(8,0) },
	['R' - 0x20] = { P(0,0), P(0,12), P(8,12), P(8,6), P(0,5), UP, P(4,5), P(8,0) },
	['S' - 0x20] = { P(0,2), P(2,0), P(8,0), P(8,5), P(0,7), P(0,12), P(6,12), P(8,10) },
	['T' - 0x20] = { P(0,12), P(8,12), UP, P(4,12), P(4,0), LAST },
	['U' - 0x20] = { P(0,12), P(0,2), P(4,0), P(8,2), P(8,12), LAST },
	['V' - 0x20] = { P(0,12), P(4,0), P(8,12), LAST },
	['W' - 0x20] = { P(0,12), P(2,0), P(4,4), P(6,0), P(8,12), LAST },
	['X' - 0x20] = { P(0,0), P(8,12), UP, P(0,12), P(8,0), LAST },
	['Y' - 0x20] = { P(0,12), P(4,6), P(8,12), UP, P(4,6), P(4,0), LAST },
	['Z' - 0x20] = { P(0,12), P(8,12), P(0,0), P(8,0), UP, P(2,6), P(6,6), LAST },
};