Hopefully finished
This commit is contained in:
parent
940d2835b4
commit
648a59c83a
1081
NokiaBold.sfd
Normal file
1081
NokiaBold.sfd
Normal file
File diff suppressed because it is too large
Load Diff
BIN
NokiaBold.ttf
Normal file
BIN
NokiaBold.ttf
Normal file
Binary file not shown.
1295
NokiaMedium.sfd
Normal file
1295
NokiaMedium.sfd
Normal file
File diff suppressed because it is too large
Load Diff
BIN
NokiaMedium.ttf
Normal file
BIN
NokiaMedium.ttf
Normal file
Binary file not shown.
17
README
17
README
@ -2,17 +2,22 @@ These are the fonts used on the Nokia 3310 phone. I've reconstructed them by
|
||||
hand, by looking at the screen and drawing the characters as I see them into
|
||||
GIMP, and then done some processing to make this actually useful.
|
||||
|
||||
Use the .c files, as the textual representation doesn't have all the information
|
||||
in it (some characters don't have a 1px space to the right of them). I've added
|
||||
it back in manually.
|
||||
nokia-fonts.png is the original image I've drawn with some colour-coded
|
||||
information you shouldn't need to care about.
|
||||
|
||||
Accented characters not included. Some of them are over here, should you wish
|
||||
to add them yourself: http://www.dafont.com/nokia-cellphone.font
|
||||
|
||||
Use the nokia-fonts.c, as the textual representation doesn't specify the real
|
||||
horizontal advance for the characters (some of them don't have a 1px space to
|
||||
the right of them). I've fixed this manually.
|
||||
|
||||
I've found this useful in VIM to highlight the zeros:
|
||||
:highlight mygroup ctermbg=red
|
||||
:match mygroup /0/
|
||||
|
||||
If you intend to render the fonts in your application, see nokia-fonts.c and the
|
||||
related tools that use this file.
|
||||
|
||||
There are also some BDF files provided, so that you can e.g. create a TTF file
|
||||
by converting them using fontforge and happily use the fonts wherever you like.
|
||||
|
||||
I've compiled two example TTF files for your convenience.
|
||||
|
||||
|
2152
nokia-big.bdf
Normal file
2152
nokia-big.bdf
Normal file
File diff suppressed because it is too large
Load Diff
111
nokia-big.c
111
nokia-big.c
@ -1,111 +0,0 @@
|
||||
struct
|
||||
{
|
||||
int width;
|
||||
int advance;
|
||||
int rows[13];
|
||||
}
|
||||
font_data[] =
|
||||
{
|
||||
{ 3, 4, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // space
|
||||
{ 2, 3, { 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // !
|
||||
{ 6, 7, { 0x4800, 0x4800, 0x4800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // "
|
||||
{ 7, 8, { 0x0000, 0x0000, 0x6c00, 0x6c00, 0x6c00, 0xfe00, 0x6c00, 0xfe00, 0x6c00, 0x6c00, 0x6c00, 0x0000, 0x0000 } }, // #
|
||||
{ 7, 8, { 0x1000, 0x7c00, 0xd600, 0xd000, 0xd000, 0x7c00, 0x1600, 0x1600, 0x1600, 0xd600, 0x7c00, 0x1000, 0x1000 } }, // $
|
||||
{ 7, 8, { 0x4600, 0xa400, 0xac00, 0x4800, 0x1800, 0x1000, 0x3000, 0x2400, 0x6a00, 0x4a00, 0xc400, 0x0000, 0x0000 } }, // %
|
||||
{ 8, 9, { 0x7000, 0xd800, 0xd800, 0xd800, 0xd800, 0x7200, 0xf600, 0xdc00, 0xcc00, 0xde00, 0x7300, 0x0000, 0x0000 } }, // &
|
||||
{ 1, 2, { 0x8000, 0x8000, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // '
|
||||
{ 3, 4, { 0x2000, 0x6000, 0x4000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x4000, 0x6000, 0x2000 } }, // (
|
||||
{ 3, 4, { 0x8000, 0xc000, 0x4000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x4000, 0xc000, 0x8000 } }, // )
|
||||
{ 7, 8, { 0x0000, 0x0000, 0x0000, 0x4400, 0x6c00, 0x3800, 0xfe00, 0x3800, 0x6c00, 0x4400, 0x0000, 0x0000, 0x0000 } }, // *
|
||||
{ 7, 8, { 0x0000, 0x0000, 0x0000, 0x0000, 0x1800, 0x1800, 0x7e00, 0x1800, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000 } }, // +
|
||||
{ 3, 4, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6000, 0x6000, 0xc000, 0x0000 } }, // ,
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf800, 0xf800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // -
|
||||
{ 3, 4, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // .
|
||||
{ 5, 6, { 0x1800, 0x1800, 0x3000, 0x3000, 0x3000, 0x6000, 0x6000, 0x6000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // /
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // 0
|
||||
{ 7, 8, { 0x1800, 0x3800, 0x7800, 0x5800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000 } }, // 1
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc600, 0x0600, 0x0600, 0x1c00, 0x7000, 0xc000, 0xc000, 0xc000, 0xfe00, 0x0000, 0x0000 } }, // 2
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0x0600, 0x0600, 0x3c00, 0x0600, 0x0600, 0x0600, 0x0600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // 3
|
||||
{ 7, 8, { 0x0400, 0x0c00, 0x1c00, 0x2c00, 0x4c00, 0xcc00, 0xcc00, 0xfe00, 0x0c00, 0x0c00, 0x0c00, 0x0000, 0x0000 } }, // 4
|
||||
{ 7, 8, { 0xfc00, 0xc000, 0xc000, 0xc000, 0xfc00, 0xc600, 0x0600, 0x0600, 0x0600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // 5
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc000, 0xc000, 0xfc00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // 6
|
||||
{ 7, 8, { 0xfe00, 0x0600, 0x0600, 0x0c00, 0x0c00, 0x1800, 0x1800, 0x3000, 0x3000, 0x3000, 0x3000, 0x0000, 0x0000 } }, // 7
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc600, 0xc600, 0x7c00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // 8
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0x7e00, 0x0600, 0x0600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // 9
|
||||
{ 3, 4, { 0x0000, 0x0000, 0x0000, 0x0000, 0x6000, 0x6000, 0x0000, 0x0000, 0x0000, 0x6000, 0x6000, 0x0000, 0x0000 } }, // :
|
||||
{ 3, 4, { 0x0000, 0x0000, 0x0000, 0x0000, 0x6000, 0x6000, 0x0000, 0x0000, 0x0000, 0x6000, 0x6000, 0xc000, 0x0000 } }, // ;
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x0800, 0x1800, 0x3000, 0x6000, 0xc000, 0x6000, 0x3000, 0x1800, 0x0800, 0x0000, 0x0000 } }, // <
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf800, 0x0000, 0x0000, 0xf800, 0x0000, 0x0000, 0x0000, 0x0000 } }, // =
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x8000, 0xc000, 0x6000, 0x3000, 0x1800, 0x3000, 0x6000, 0xc000, 0x8000, 0x0000, 0x0000 } }, // >
|
||||
{ 6, 7, { 0x7800, 0x8c00, 0x8c00, 0x0c00, 0x0c00, 0x1800, 0x3000, 0x3000, 0x0000, 0x3000, 0x3000, 0x0000, 0x0000 } }, // ?
|
||||
{ 9, 10, { 0x0000, 0x3e00, 0x4100, 0x9480, 0xac80, 0xa480, 0xa480, 0xa500, 0x9a00, 0x4080, 0x3f00, 0x0000, 0x0000 } }, // @
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xfe00, 0xc600, 0xc600, 0xc600, 0x0000, 0x0000 } }, // A
|
||||
{ 7, 8, { 0xfc00, 0xc600, 0xc600, 0xc600, 0xf800, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xfc00, 0x0000, 0x0000 } }, // B
|
||||
{ 6, 7, { 0x7800, 0xcc00, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xcc00, 0x7800, 0x0000, 0x0000 } }, // C
|
||||
{ 7, 8, { 0xf800, 0xcc00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xcc00, 0xf800, 0x0000, 0x0000 } }, // D
|
||||
{ 7, 8, { 0xfe00, 0xc000, 0xc000, 0xc000, 0xf800, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xfe00, 0x0000, 0x0000 } }, // E
|
||||
{ 7, 8, { 0xfe00, 0xc000, 0xc000, 0xc000, 0xf800, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // F
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc000, 0xc000, 0xc000, 0xce00, 0xc600, 0xc600, 0xc600, 0xc600, 0x7e00, 0x0000, 0x0000 } }, // G
|
||||
{ 7, 8, { 0xc600, 0xc600, 0xc600, 0xc600, 0xfe00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0x0000, 0x0000 } }, // H
|
||||
{ 2, 3, { 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // I
|
||||
{ 5, 6, { 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x9800, 0x7000, 0x0000, 0x0000 } }, // J
|
||||
{ 8, 9, { 0xc600, 0xcc00, 0xd800, 0xf000, 0xe000, 0xe000, 0xf000, 0xd800, 0xcc00, 0xc600, 0xc300, 0x0000, 0x0000 } }, // K
|
||||
{ 6, 7, { 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xfc00, 0x0000, 0x0000 } }, // L
|
||||
{ 9, 10, { 0x8080, 0xc180, 0xe380, 0xf780, 0xdd80, 0xc980, 0xc180, 0xc180, 0xc180, 0xc180, 0xc180, 0x0000, 0x0000 } }, // M
|
||||
{ 7, 8, { 0xc600, 0xc600, 0xe600, 0xe600, 0xf600, 0xd600, 0xde00, 0xce00, 0xce00, 0xc600, 0xc600, 0x0000, 0x0000 } }, // N
|
||||
{ 8, 9, { 0x7e00, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0x7e00, 0x0000, 0x0000 } }, // O
|
||||
{ 7, 8, { 0xfc00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xfc00, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // P
|
||||
{ 8, 9, { 0x7e00, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xd300, 0xdb00, 0x7e00, 0x0600, 0x0000 } }, // Q
|
||||
{ 8, 8, { 0xfc00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xfc00, 0xd800, 0xcc00, 0xc600, 0xc300, 0x0000, 0x0000 } }, // R
|
||||
{ 6, 7, { 0x7800, 0xcc00, 0xc000, 0xc000, 0xc000, 0x7800, 0x0c00, 0x0c00, 0x0c00, 0xcc00, 0x7800, 0x0000, 0x0000 } }, // S
|
||||
{ 6, 7, { 0xfc00, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x0000, 0x0000 } }, // T
|
||||
{ 7, 8, { 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0x7c00, 0x0000, 0x0000 } }, // U
|
||||
{ 8, 9, { 0xc300, 0xc300, 0xc300, 0xc300, 0x6600, 0x6600, 0x6600, 0x2400, 0x3c00, 0x1800, 0x1800, 0x0000, 0x0000 } }, // V
|
||||
{ 10, 11, { 0xc0c0, 0xc0c0, 0xc0c0, 0xc0c0, 0x6180, 0x6d80, 0x6d80, 0x6d80, 0x3f00, 0x3300, 0x3300, 0x0000, 0x0000 } }, // W
|
||||
{ 7, 8, { 0xc600, 0xc600, 0xc600, 0x6c00, 0x6c00, 0x3800, 0x6c00, 0x6c00, 0xc600, 0xc600, 0xc600, 0x0000, 0x0000 } }, // X
|
||||
{ 8, 9, { 0xc300, 0xc300, 0x6600, 0x6600, 0x3c00, 0x3c00, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000 } }, // Y
|
||||
{ 7, 8, { 0xfe00, 0x0600, 0x0e00, 0x1c00, 0x3800, 0x7000, 0xe000, 0xc000, 0xc000, 0xc000, 0xfe00, 0x0000, 0x0000 } }, // Z
|
||||
{ 4, 5, { 0xf000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xf000 } }, // [
|
||||
{ 5, 6, { 0xc000, 0xc000, 0x6000, 0x6000, 0x6000, 0x3000, 0x3000, 0x3000, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000 } }, // backslash
|
||||
{ 4, 5, { 0xf000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0xf000 } }, // ]
|
||||
{ 5, 6, { 0x2000, 0x7000, 0xd800, 0x8800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // ^
|
||||
{ 8, 8, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xff00, 0x0000 } }, // _
|
||||
{ 3, 4, { 0x8000, 0x4000, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // `
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0x7800, 0x0c00, 0x0c00, 0x7c00, 0xcc00, 0xcc00, 0xcc00, 0x7c00, 0x0000, 0x0000 } }, // a
|
||||
{ 6, 7, { 0xc000, 0xc000, 0xc000, 0xf800, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xf800, 0x0000, 0x0000 } }, // b
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x0000, 0x7000, 0xc800, 0xc000, 0xc000, 0xc000, 0xc000, 0xc800, 0x7000, 0x0000, 0x0000 } }, // c
|
||||
{ 6, 7, { 0x0c00, 0x0c00, 0x0c00, 0x7c00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x7c00, 0x0000, 0x0000 } }, // d
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0x7800, 0xcc00, 0xcc00, 0xfc00, 0xc000, 0xc000, 0xc400, 0x7800, 0x0000, 0x0000 } }, // e
|
||||
{ 4, 5, { 0x3000, 0x6000, 0x6000, 0xf000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x0000, 0x0000 } }, // f
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0x7c00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x7c00, 0x0c00, 0x7800 } }, // g
|
||||
{ 6, 7, { 0xc000, 0xc000, 0xc000, 0xf800, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x0000, 0x0000 } }, // h
|
||||
{ 2, 3, { 0xc000, 0xc000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // i
|
||||
{ 3, 4, { 0x6000, 0x6000, 0x0000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0xc000 } }, // j
|
||||
{ 6, 7, { 0xc000, 0xc000, 0xc000, 0xcc00, 0xd800, 0xf000, 0xe000, 0xe000, 0xf000, 0xd800, 0xcc00, 0x0000, 0x0000 } }, // k
|
||||
{ 2, 3, { 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // l
|
||||
{ 8, 9, { 0x0000, 0x0000, 0x0000, 0xfe00, 0xdb00, 0xdb00, 0xdb00, 0xdb00, 0xdb00, 0xdb00, 0xdb00, 0x0000, 0x0000 } }, // m
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xf800, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x0000, 0x0000 } }, // n
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0x7800, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x7800, 0x0000, 0x0000 } }, // o
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xf800, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xf800, 0xc000, 0xc000 } }, // p
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0x7c00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x7c00, 0x0c00, 0x0c00 } }, // q
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x0000, 0xd800, 0xf800, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // r
|
||||
{ 5, 6, { 0x0000, 0x0000, 0x0000, 0x7800, 0xc000, 0xe000, 0x7000, 0x3800, 0x1800, 0x1800, 0xf000, 0x0000, 0x0000 } }, // s
|
||||
{ 4, 5, { 0x6000, 0x6000, 0x6000, 0xf000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x3000, 0x0000, 0x0000 } }, // t
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x7c00, 0x0000, 0x0000 } }, // u
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x4800, 0x7800, 0x3000, 0x3000, 0x0000, 0x0000 } }, // v
|
||||
{ 9, 10, { 0x0000, 0x0000, 0x0000, 0xc180, 0xc180, 0xc180, 0x6300, 0x6b00, 0x7f00, 0x3600, 0x3600, 0x0000, 0x0000 } }, // w
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xcc00, 0xcc00, 0x7800, 0x3000, 0x3000, 0x7800, 0xcc00, 0xcc00, 0x0000, 0x0000 } }, // x
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0xcc00, 0x7c00, 0x0c00, 0x7800 } }, // y
|
||||
{ 6, 7, { 0x0000, 0x0000, 0x0000, 0xfc00, 0x0c00, 0x1c00, 0x3800, 0x7000, 0xe000, 0xc000, 0xfc00, 0x0000, 0x0000 } }, // z
|
||||
{ 3, 4, { 0x2000, 0x6000, 0x4000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x4000, 0x6000, 0x2000 } }, // {
|
||||
{ 3, 4, { 0x8000, 0xc000, 0x4000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x4000, 0xc000, 0x8000 } }, // |
|
||||
{ 2, 3, { 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000 } }, // }
|
||||
{ 7, 8, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3200, 0x7e00, 0x4c00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, // ~
|
||||
{ 11, 12, { 0x0780, 0x1ce0, 0x3820, 0x3000, 0xffc0, 0x3000, 0xff80, 0x3000, 0x3820, 0x1ce0, 0x0780, 0x0000, 0x0000 } }, // euro
|
||||
{ 7, 8, { 0x3800, 0x6c00, 0x6000, 0x6000, 0x6000, 0xf800, 0x6000, 0x6000, 0x6000, 0x6600, 0xfc00, 0x0000, 0x0000 } }, // pound
|
||||
{ 8, 9, { 0xc300, 0xc300, 0x6600, 0x6600, 0xff00, 0x1800, 0xff00, 0x1800, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000 } }, // yen
|
||||
{ 9, 10, { 0x0000, 0x8080, 0x5d00, 0x2200, 0x4100, 0x4100, 0x4100, 0x2200, 0x5d00, 0x8080, 0x0000, 0x0000, 0x0000 } }, // currency
|
||||
{ 6, 7, { 0x3000, 0x3000, 0x0000, 0x3000, 0x3000, 0x6000, 0xc000, 0xc000, 0xc400, 0xc400, 0x7800, 0x0000, 0x0000 } }, // inverted ?
|
||||
{ 2, 3, { 0xc000, 0xc000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // inverted !
|
||||
{ 6, 7, { 0x3800, 0x6c00, 0x6c00, 0x6000, 0xf000, 0xd800, 0xcc00, 0x6c00, 0x3c00, 0x1800, 0xd800, 0xd800, 0x7000 } }, // section
|
||||
};
|
@ -481,7 +481,7 @@
|
||||
0011100
|
||||
0011100
|
||||
0011100
|
||||
0000011
|
||||
0000001
|
||||
0011100
|
||||
0011100
|
||||
0011100
|
||||
@ -1289,33 +1289,33 @@
|
||||
100
|
||||
110
|
||||
|
||||
011
|
||||
001
|
||||
101
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
101
|
||||
001
|
||||
011
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
011
|
||||
001
|
||||
101
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
100
|
||||
101
|
||||
001
|
||||
011
|
||||
|
||||
1111111
|
||||
1111111
|
||||
|
116
nokia-fonts.c
116
nokia-fonts.c
@ -1,16 +1,27 @@
|
||||
struct nokia_menu_char
|
||||
{
|
||||
short width;
|
||||
short advance;
|
||||
unsigned char rows[6];
|
||||
};
|
||||
/*
|
||||
* nokia-fonts.c: Nokia 3310 fonts
|
||||
*
|
||||
* Copyright (c) 2013, Přemysl Janouch <p.janouch@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
struct nokia_small_char
|
||||
{
|
||||
short width;
|
||||
short advance;
|
||||
unsigned char rows[8];
|
||||
};
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "nokia-fonts.h"
|
||||
|
||||
struct nokia_small_char_wide
|
||||
{
|
||||
@ -18,20 +29,13 @@ struct nokia_small_char_wide
|
||||
struct nokia_small_char ch;
|
||||
};
|
||||
|
||||
struct nokia_big_char
|
||||
{
|
||||
short width;
|
||||
short advance;
|
||||
unsigned short rows[13];
|
||||
};
|
||||
|
||||
struct nokia_big_char_wide
|
||||
{
|
||||
wchar_t code;
|
||||
struct nokia_big_char ch;
|
||||
};
|
||||
|
||||
struct nokia_big_char
|
||||
static struct nokia_big_char
|
||||
nokia_big_data[] =
|
||||
{
|
||||
{ 3, 4, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
@ -102,7 +106,7 @@ nokia_big_data[] =
|
||||
0xa500, 0x9a00, 0x4080, 0x3f00, 0x0000, 0x0000 } }, // @
|
||||
{ 7, 8, { 0x7c00, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600,
|
||||
0xfe00, 0xc600, 0xc600, 0xc600, 0x0000, 0x0000 } }, // A
|
||||
{ 7, 8, { 0xfc00, 0xc600, 0xc600, 0xc600, 0xf800, 0xc600, 0xc600,
|
||||
{ 7, 8, { 0xfc00, 0xc600, 0xc600, 0xc600, 0xfc00, 0xc600, 0xc600,
|
||||
0xc600, 0xc600, 0xc600, 0xfc00, 0x0000, 0x0000 } }, // B
|
||||
{ 6, 7, { 0x7800, 0xcc00, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000,
|
||||
0xc000, 0xc000, 0xcc00, 0x7800, 0x0000, 0x0000 } }, // C
|
||||
@ -226,27 +230,27 @@ nokia_big_data[] =
|
||||
0x4c00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } } // ~
|
||||
};
|
||||
|
||||
struct nokia_big_char_wide
|
||||
static struct nokia_big_char_wide
|
||||
nokia_big_wide_data[] =
|
||||
{
|
||||
{ L'€', { 11, 12, { 0x0780, 0x1ce0, 0x3820, 0x3000, 0xffc0, 0x3000, 0xff80,
|
||||
0x3000, 0x3820, 0x1ce0, 0x0780, 0x0000, 0x0000 } }, // euro
|
||||
0x3000, 0x3820, 0x1ce0, 0x0780, 0x0000, 0x0000 } } }, // euro
|
||||
{ L'£', { 7, 8, { 0x3800, 0x6c00, 0x6000, 0x6000, 0x6000, 0xf800, 0x6000,
|
||||
0x6000, 0x6000, 0x6600, 0xfc00, 0x0000, 0x0000 } }, // pound
|
||||
0x6000, 0x6000, 0x6600, 0xfc00, 0x0000, 0x0000 } } }, // pound
|
||||
{ L'¥', { 8, 9, { 0xc300, 0xc300, 0x6600, 0x6600, 0xff00, 0x1800, 0xff00,
|
||||
0x1800, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000 } }, // yen
|
||||
0x1800, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000 } } }, // yen
|
||||
{ L'¤', { 9, 10, { 0x0000, 0x8080, 0x5d00, 0x2200, 0x4100, 0x4100, 0x4100,
|
||||
0x2200, 0x5d00, 0x8080, 0x0000, 0x0000, 0x0000 } }, // currency
|
||||
0x2200, 0x5d00, 0x8080, 0x0000, 0x0000, 0x0000 } } }, // currency
|
||||
{ L'¿', { 6, 7, { 0x3000, 0x3000, 0x0000, 0x3000, 0x3000, 0x6000, 0xc000,
|
||||
0xc000, 0xc400, 0xc400, 0x7800, 0x0000, 0x0000 } }, // inverted ?
|
||||
0xc000, 0xc400, 0xc400, 0x7800, 0x0000, 0x0000 } } }, // inverted ?
|
||||
{ L'¡', { 2, 3, { 0xc000, 0xc000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000,
|
||||
0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } }, // inverted !
|
||||
0xc000, 0xc000, 0xc000, 0xc000, 0x0000, 0x0000 } } }, // inverted !
|
||||
{ L'§', { 6, 7, { 0x3800, 0x6c00, 0x6c00, 0x6000, 0xf000, 0xd800, 0xcc00,
|
||||
0x6c00, 0x3c00, 0x1800, 0xd800, 0xd800, 0x7000 } } // section
|
||||
0x6c00, 0x3c00, 0x1800, 0xd800, 0xd800, 0x7000 } } } // section
|
||||
};
|
||||
|
||||
struct nokia_menu_char
|
||||
nokia_menu_char_data[] =
|
||||
static struct nokia_menu_char
|
||||
nokia_menu_data[] =
|
||||
{
|
||||
{ 2, 3, { 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00 } }, // -
|
||||
{ 1, 2, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 } }, // .
|
||||
@ -263,8 +267,8 @@ nokia_menu_char_data[] =
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0x78, 0x18, 0x70 } } // 9
|
||||
};
|
||||
|
||||
struct nokia_small_char
|
||||
nokia_small_char_data[] =
|
||||
static struct nokia_small_char
|
||||
nokia_small_data[] =
|
||||
{
|
||||
{ 3, 4, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // space
|
||||
{ 1, 2, { 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x00 } }, // !
|
||||
@ -363,7 +367,7 @@ nokia_small_char_data[] =
|
||||
{ 6, 7, { 0x00, 0x00, 0x00, 0x64, 0x98, 0x00, 0x00, 0x00 } } // ~
|
||||
};
|
||||
|
||||
struct nokia_small_char_wide
|
||||
static struct nokia_small_char_wide
|
||||
nokia_small_wide_data[] =
|
||||
{
|
||||
{ L'€', { 6, 7, { 0x00, 0x38, 0x44, 0xf8, 0xf0, 0x44, 0x38, 0x00 } } }, // euro
|
||||
@ -375,7 +379,7 @@ nokia_small_wide_data[] =
|
||||
{ L'§', { 3, 4, { 0x40, 0xa0, 0xc0, 0xa0, 0xa0, 0x60, 0xa0, 0x40 } } }, // section
|
||||
};
|
||||
|
||||
struct nokia_small_char
|
||||
static struct nokia_small_char
|
||||
nokia_small_bold_data[] =
|
||||
{
|
||||
{ 3, 4, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // space
|
||||
@ -470,10 +474,10 @@ nokia_small_bold_data[] =
|
||||
{ 5, 6, { 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0x78, 0x18, 0x70 } }, // y
|
||||
{ 5, 6, { 0x00, 0x00, 0xf8, 0x30, 0x60, 0xc0, 0xf8, 0x00 } }, // z
|
||||
{ 3, 4, { 0x20, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x20 } }, // {
|
||||
{ 2, 3, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 } }, // |
|
||||
{ 3, 4, { 0x80, 0x40, 0x60, 0x60, 0x60, 0x60, 0x40, 0x80 } }, // }
|
||||
{ 3, 4, { 0x80, 0x40, 0x60, 0x60, 0x60, 0x60, 0x40, 0x80 } }, // |
|
||||
{ 2, 3, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 } }, // }
|
||||
{ 6, 7, { 0x00, 0x00, 0x00, 0x64, 0xfc, 0x98, 0x00, 0x00 } } // ~
|
||||
}
|
||||
};
|
||||
|
||||
struct nokia_small_char_wide
|
||||
nokia_small_bold_wide_data[] =
|
||||
@ -486,3 +490,39 @@ nokia_small_bold_wide_data[] =
|
||||
{ L'¡', { 2, 3, { 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } } }, // inverted !
|
||||
{ L'§', { 4, 5, { 0x60, 0xd0, 0xe0, 0xb0, 0xd0, 0x70, 0xb0, 0x60 } } }, // section
|
||||
};
|
||||
|
||||
#define NOKIA_DEFINE_GETTER(type, name, from, to) \
|
||||
type * \
|
||||
nokia_get_ ## name ## _char (char ch) \
|
||||
{ \
|
||||
if (ch < from || ch > to) \
|
||||
return NULL; \
|
||||
return &nokia_ ## name ## _data[ch - from]; \
|
||||
}
|
||||
|
||||
#define NOKIA_DEFINE_WIDE_GETTER(type, name) \
|
||||
type * \
|
||||
nokia_get_ ## name ## _char_wide (wchar_t ch) \
|
||||
{ \
|
||||
unsigned i; \
|
||||
int c; \
|
||||
for (i = 0; i < sizeof nokia_ ## name ## _wide_data \
|
||||
/ sizeof nokia_ ## name ## _wide_data[0]; i++) \
|
||||
if (nokia_ ## name ## _wide_data[i].code == ch) \
|
||||
return &nokia_ ## name ## _wide_data[i].ch; \
|
||||
c = wctob (ch); \
|
||||
return c == EOF ? NULL : nokia_get_ ## name ## _char (c); \
|
||||
}
|
||||
|
||||
NOKIA_DEFINE_GETTER (struct nokia_menu_char, menu, '-', '9')
|
||||
NOKIA_DEFINE_GETTER (struct nokia_small_char, small, ' ', '~')
|
||||
NOKIA_DEFINE_GETTER (struct nokia_small_char, small_bold, ' ', '~')
|
||||
NOKIA_DEFINE_GETTER (struct nokia_big_char, big, ' ', '~')
|
||||
|
||||
NOKIA_DEFINE_WIDE_GETTER (struct nokia_small_char, small)
|
||||
NOKIA_DEFINE_WIDE_GETTER (struct nokia_small_char, small_bold)
|
||||
NOKIA_DEFINE_WIDE_GETTER (struct nokia_big_char, big)
|
||||
|
||||
#undef NOKIA_DEFINE_GETTER
|
||||
#undef NOKIA_DEFINE_WIDE_GETTER
|
||||
|
||||
|
61
nokia-fonts.h
Normal file
61
nokia-fonts.h
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* nokia-fonts.h: Nokia 3310 fonts
|
||||
*
|
||||
* Copyright (c) 2013, Přemysl Janouch <p.janouch@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NOKIA_FONTS_H
|
||||
#define NOKIA_FONTS_H
|
||||
|
||||
struct nokia_menu_char
|
||||
{
|
||||
short width;
|
||||
short advance;
|
||||
unsigned char rows[6];
|
||||
};
|
||||
|
||||
struct nokia_small_char
|
||||
{
|
||||
short width;
|
||||
short advance;
|
||||
|
||||
// This font seems to have one additional line above and one
|
||||
// under to have the proper line height for display.
|
||||
unsigned char rows[8];
|
||||
};
|
||||
|
||||
struct nokia_big_char
|
||||
{
|
||||
short width;
|
||||
short advance;
|
||||
|
||||
// This font seems to have one additional line above
|
||||
// to have the proper line height for display.
|
||||
unsigned short rows[13];
|
||||
};
|
||||
|
||||
struct nokia_menu_char *nokia_get_menu_char (char ch);
|
||||
struct nokia_small_char *nokia_get_small_char (char ch);
|
||||
struct nokia_small_char *nokia_get_small_bold_char (char ch);
|
||||
struct nokia_big_char *nokia_get_big_char (char ch);
|
||||
|
||||
struct nokia_small_char *nokia_get_small_char_wide (wchar_t ch);
|
||||
struct nokia_small_char *nokia_get_small_bold_char_wide (wchar_t ch);
|
||||
struct nokia_big_char *nokia_get_big_char_wide (wchar_t ch);
|
||||
|
||||
#endif // ! NOKIA_FONTS_H
|
||||
|
BIN
nokia-fonts.png
BIN
nokia-fonts.png
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
222
nokia-generate-bdf.c
Normal file
222
nokia-generate-bdf.c
Normal file
@ -0,0 +1,222 @@
|
||||
/*
|
||||
* nokia-generate-bdf.c: BDF generator for Nokia 3310 fonts
|
||||
*
|
||||
* Copyright (c) 2013, Přemysl Janouch <p.janouch@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "nokia-fonts.c"
|
||||
|
||||
#define N_ELEMENTS(a) (sizeof (a) / sizeof (a)[0])
|
||||
|
||||
static void
|
||||
generate_big_char (struct nokia_big_char *ch, wchar_t code)
|
||||
{
|
||||
printf ("STARTCHAR U+%04X\n", code);
|
||||
printf ("ENCODING %d\n", code);
|
||||
printf ("SWIDTH %d 0\n", (int) (.5 + 1000. * ch->advance / 14.));
|
||||
printf ("DWIDTH %d\n", ch->advance);
|
||||
printf ("BBX %d 14 0 -2\n", ch->width);
|
||||
printf ("BITMAP\n");
|
||||
printf (ch->width > 8 ? "0000\n" : "00\n");
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < 13; i++)
|
||||
{
|
||||
unsigned short row = ch->rows[i];
|
||||
|
||||
printf ("%02X", (row >> 8) & 0xFF);
|
||||
if (ch->width > 8)
|
||||
printf ("%02X", row & 0xFF);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
printf ("ENDCHAR\n");
|
||||
}
|
||||
|
||||
static void
|
||||
generate_big_font (void)
|
||||
{
|
||||
// Line height for this font = 14 = 1 above + 13
|
||||
|
||||
printf ("STARTFONT 2.1\n");
|
||||
printf ("FONT -nokia-nokia-medium-r-normal--14-140-75-75-p-65-iso10646-1\n");
|
||||
printf ("SIZE 14 75 75\n");
|
||||
printf ("FONTBOUNDINGBOX 14 14 0 -2\n");
|
||||
printf ("STARTPROPERTIES 2\n");
|
||||
printf ("FONT_ASCENT 12\n");
|
||||
printf ("FONT_DESCENT 2\n");
|
||||
printf ("ENDPROPERTIES\n");
|
||||
|
||||
printf ("CHARS %zu\n", N_ELEMENTS (nokia_big_data)
|
||||
+ N_ELEMENTS (nokia_big_wide_data));
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < N_ELEMENTS (nokia_big_data); i++)
|
||||
generate_big_char (&nokia_big_data[i], ' ' + i);
|
||||
|
||||
for (i = 0; i < N_ELEMENTS (nokia_big_wide_data); i++)
|
||||
{
|
||||
struct nokia_big_char_wide *chw = &nokia_big_wide_data[i];
|
||||
generate_big_char (&chw->ch, chw->code);
|
||||
}
|
||||
|
||||
printf ("ENDFONT\n");
|
||||
}
|
||||
|
||||
static void
|
||||
generate_small_char (struct nokia_small_char *ch, wchar_t code)
|
||||
{
|
||||
printf ("STARTCHAR U+%04X\n", code);
|
||||
printf ("ENCODING %d\n", code);
|
||||
printf ("SWIDTH %d 0\n", (int) (.5 + 1000. * ch->advance / 10.));
|
||||
printf ("DWIDTH %d\n", ch->advance);
|
||||
printf ("BBX %d 10 0 -2\n", ch->width);
|
||||
printf ("BITMAP\n");
|
||||
printf ("00\n");
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < 8; i++)
|
||||
printf ("%02X\n", ch->rows[i] & 0xFF);
|
||||
|
||||
printf ("00\n");
|
||||
printf ("ENDCHAR\n");
|
||||
}
|
||||
|
||||
static void
|
||||
generate_small_font (void)
|
||||
{
|
||||
// Line height for this font = 10 = 1 above + 8 + 1 below
|
||||
|
||||
printf ("STARTFONT 2.1\n");
|
||||
printf ("FONT -nokia-nokia-medium-r-normal--10-100-75-75-p-40-iso10646-1\n");
|
||||
printf ("SIZE 10 75 75\n");
|
||||
printf ("FONTBOUNDINGBOX 10 10 0 -2\n");
|
||||
printf ("STARTPROPERTIES 2\n");
|
||||
printf ("FONT_ASCENT 8\n");
|
||||
printf ("FONT_DESCENT 2\n");
|
||||
printf ("ENDPROPERTIES\n");
|
||||
|
||||
printf ("CHARS %zu\n", N_ELEMENTS (nokia_small_data)
|
||||
+ N_ELEMENTS (nokia_small_wide_data));
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < N_ELEMENTS (nokia_small_data); i++)
|
||||
generate_small_char (&nokia_small_data[i], ' ' + i);
|
||||
|
||||
for (i = 0; i < N_ELEMENTS (nokia_small_wide_data); i++)
|
||||
{
|
||||
struct nokia_small_char_wide *chw = &nokia_small_wide_data[i];
|
||||
generate_small_char (&chw->ch, chw->code);
|
||||
}
|
||||
|
||||
printf ("ENDFONT\n");
|
||||
}
|
||||
|
||||
static void
|
||||
generate_small_bold_font (void)
|
||||
{
|
||||
// Line height for this font = 10 = 1 above + 8 + 1 below
|
||||
|
||||
printf ("STARTFONT 2.1\n");
|
||||
printf ("FONT -nokia-nokia-bold-r-normal--10-100-75-75-p-40-iso10646-1\n");
|
||||
printf ("SIZE 10 75 75\n");
|
||||
printf ("FONTBOUNDINGBOX 10 10 0 -2\n");
|
||||
printf ("STARTPROPERTIES 2\n");
|
||||
printf ("FONT_ASCENT 8\n");
|
||||
printf ("FONT_DESCENT 2\n");
|
||||
printf ("ENDPROPERTIES\n");
|
||||
|
||||
printf ("CHARS %zu\n", N_ELEMENTS (nokia_small_bold_data)
|
||||
+ N_ELEMENTS (nokia_small_bold_wide_data));
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < N_ELEMENTS (nokia_small_bold_data); i++)
|
||||
generate_small_char (&nokia_small_bold_data[i], ' ' + i);
|
||||
|
||||
for (i = 0; i < N_ELEMENTS (nokia_small_bold_wide_data); i++)
|
||||
{
|
||||
struct nokia_small_char_wide *chw = &nokia_small_bold_wide_data[i];
|
||||
generate_small_char (&chw->ch, chw->code);
|
||||
}
|
||||
|
||||
printf ("ENDFONT\n");
|
||||
}
|
||||
|
||||
static void
|
||||
generate_menu_font (void)
|
||||
{
|
||||
printf ("STARTFONT 2.1\n");
|
||||
printf ("FONT -nokia-nokia-medium-r-normal--6-60-75-75-p-40-iso10646-1\n");
|
||||
printf ("SIZE 6 75 75\n");
|
||||
printf ("FONTBOUNDINGBOX 6 6 0 0\n");
|
||||
printf ("STARTPROPERTIES 2\n");
|
||||
printf ("FONT_ASCENT 6\n");
|
||||
printf ("FONT_DESCENT 0\n");
|
||||
printf ("ENDPROPERTIES\n");
|
||||
|
||||
printf ("CHARS %zu\n", N_ELEMENTS (nokia_menu_data));
|
||||
|
||||
unsigned i, k;
|
||||
for (i = 0; i < N_ELEMENTS (nokia_menu_data); i++)
|
||||
{
|
||||
struct nokia_menu_char *ch = &nokia_menu_data[i];
|
||||
|
||||
printf ("STARTCHAR U+%04X\n", '/' + i);
|
||||
printf ("ENCODING %d\n", '/' + i);
|
||||
printf ("SWIDTH %d 0\n", (int) (.5 + 1000. * ch->advance / 6.));
|
||||
printf ("DWIDTH %d\n", ch->advance);
|
||||
printf ("BBX %d 6 0 0\n", ch->width);
|
||||
printf ("BITMAP\n");
|
||||
|
||||
for (k = 0; k < 6; k++)
|
||||
printf ("%02X\n", ch->rows[k] & 0xFF);
|
||||
|
||||
printf ("ENDCHAR\n");
|
||||
}
|
||||
|
||||
printf ("ENDFONT\n");
|
||||
}
|
||||
|
||||
static void
|
||||
usage (const char *program_name)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s { big | menu"
|
||||
" | small | small-bold }\n", program_name);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2)
|
||||
usage (argv[0]);
|
||||
if (!strcmp (argv[1], "big"))
|
||||
generate_big_font ();
|
||||
else if (!strcmp (argv[1], "menu"))
|
||||
generate_menu_font ();
|
||||
else if (!strcmp (argv[1], "small"))
|
||||
generate_small_font ();
|
||||
else if (!strcmp (argv[1], "small-bold"))
|
||||
generate_small_bold_font ();
|
||||
else
|
||||
usage (argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
179
nokia-menu.bdf
Normal file
179
nokia-menu.bdf
Normal file
@ -0,0 +1,179 @@
|
||||
STARTFONT 2.1
|
||||
FONT -nokia-nokia-medium-r-normal--6-60-75-75-p-40-iso10646-1
|
||||
SIZE 6 75 75
|
||||
FONTBOUNDINGBOX 6 6 0 0
|
||||
STARTPROPERTIES 2
|
||||
FONT_ASCENT 6
|
||||
FONT_DESCENT 0
|
||||
ENDPROPERTIES
|
||||
CHARS 13
|
||||
STARTCHAR U+002F
|
||||
ENCODING 47
|
||||
SWIDTH 500 0
|
||||
DWIDTH 3
|
||||
BBX 2 6 0 0
|
||||
BITMAP
|
||||
00
|
||||
00
|
||||
00
|
||||
C0
|
||||
00
|
||||
00
|
||||
ENDCHAR
|
||||
STARTCHAR U+0030
|
||||
ENCODING 48
|
||||
SWIDTH 333 0
|
||||
DWIDTH 2
|
||||
BBX 1 6 0 0
|
||||
BITMAP
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
00
|
||||
80
|
||||
ENDCHAR
|
||||
STARTCHAR U+0031
|
||||
ENCODING 49
|
||||
SWIDTH 667 0
|
||||
DWIDTH 4
|
||||
BBX 3 6 0 0
|
||||
BITMAP
|
||||
20
|
||||
20
|
||||
40
|
||||
40
|
||||
80
|
||||
80
|
||||
ENDCHAR
|
||||
STARTCHAR U+0032
|
||||
ENCODING 50
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
70
|
||||
D8
|
||||
D8
|
||||
D8
|
||||
D8
|
||||
70
|
||||
ENDCHAR
|
||||
STARTCHAR U+0033
|
||||
ENCODING 51
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
30
|
||||
70
|
||||
30
|
||||
30
|
||||
30
|
||||
30
|
||||
ENDCHAR
|
||||
STARTCHAR U+0034
|
||||
ENCODING 52
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
F0
|
||||
18
|
||||
18
|
||||
70
|
||||
C0
|
||||
F8
|
||||
ENDCHAR
|
||||
STARTCHAR U+0035
|
||||
ENCODING 53
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
F0
|
||||
18
|
||||
70
|
||||
18
|
||||
18
|
||||
F0
|
||||
ENDCHAR
|
||||
STARTCHAR U+0036
|
||||
ENCODING 54
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
18
|
||||
38
|
||||
58
|
||||
F8
|
||||
18
|
||||
18
|
||||
ENDCHAR
|
||||
STARTCHAR U+0037
|
||||
ENCODING 55
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
F0
|
||||
C0
|
||||
F0
|
||||
18
|
||||
18
|
||||
F0
|
||||
ENDCHAR
|
||||
STARTCHAR U+0038
|
||||
ENCODING 56
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
70
|
||||
C0
|
||||
F0
|
||||
D8
|
||||
D8
|
||||
70
|
||||
ENDCHAR
|
||||
STARTCHAR U+0039
|
||||
ENCODING 57
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
F8
|
||||
18
|
||||
30
|
||||
60
|
||||
60
|
||||
60
|
||||
ENDCHAR
|
||||
STARTCHAR U+003A
|
||||
ENCODING 58
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
70
|
||||
D8
|
||||
70
|
||||
D8
|
||||
D8
|
||||
70
|
||||
ENDCHAR
|
||||
STARTCHAR U+003B
|
||||
ENCODING 59
|
||||
SWIDTH 1000 0
|
||||
DWIDTH 6
|
||||
BBX 5 6 0 0
|
||||
BITMAP
|
||||
70
|
||||
D8
|
||||
D8
|
||||
78
|
||||
18
|
||||
70
|
||||
ENDCHAR
|
||||
ENDFONT
|
22
nokia-menu.c
22
nokia-menu.c
@ -1,22 +0,0 @@
|
||||
struct
|
||||
{
|
||||
int width;
|
||||
int advance;
|
||||
int rows[6];
|
||||
}
|
||||
font_data[] =
|
||||
{
|
||||
{ 2, 3, { 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00 } }, // -
|
||||
{ 1, 2, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 } }, // .
|
||||
{ 3, 4, { 0x20, 0x20, 0x40, 0x40, 0x80, 0x80 } }, // /
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0xd8, 0xd8, 0x70 } }, // 0
|
||||
{ 5, 6, { 0x30, 0x70, 0x30, 0x30, 0x30, 0x30 } }, // 1
|
||||
{ 5, 6, { 0xf0, 0x18, 0x18, 0x70, 0xc0, 0xf8 } }, // 2
|
||||
{ 5, 6, { 0xf0, 0x18, 0x70, 0x18, 0x18, 0xf0 } }, // 3
|
||||
{ 5, 6, { 0x18, 0x38, 0x58, 0xf8, 0x18, 0x18 } }, // 4
|
||||
{ 5, 6, { 0xf0, 0xc0, 0xf0, 0x18, 0x18, 0xf0 } }, // 5
|
||||
{ 5, 6, { 0x70, 0xc0, 0xf0, 0xd8, 0xd8, 0x70 } }, // 6
|
||||
{ 5, 6, { 0xf8, 0x18, 0x30, 0x60, 0x60, 0x60 } }, // 7
|
||||
{ 5, 6, { 0x70, 0xd8, 0x70, 0xd8, 0xd8, 0x70 } }, // 8
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0x78, 0x18, 0x70 } }, // 9
|
||||
};
|
1744
nokia-small-bold.bdf
Normal file
1744
nokia-small-bold.bdf
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,111 +0,0 @@
|
||||
struct
|
||||
{
|
||||
int width;
|
||||
int advance;
|
||||
int rows[8];
|
||||
}
|
||||
font_data[] =
|
||||
{
|
||||
{ 3, 4, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // space
|
||||
{ 2, 3, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0x00 } }, // !
|
||||
{ 3, 4, { 0xa0, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // "
|
||||
{ 5, 6, { 0x50, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0x50, 0x00 } }, // #
|
||||
{ 5, 6, { 0x50, 0x78, 0xd0, 0xf0, 0x78, 0x58, 0xf0, 0x50 } }, // $
|
||||
{ 6, 7, { 0xc8, 0xd8, 0x10, 0x30, 0x20, 0x6c, 0x4c, 0x00 } }, // %
|
||||
{ 6, 7, { 0x70, 0xd8, 0x70, 0xf4, 0xdc, 0xdc, 0x74, 0x00 } }, // &
|
||||
{ 1, 2, { 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // '
|
||||
{ 3, 4, { 0x20, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x20 } }, // (
|
||||
{ 3, 4, { 0x80, 0x40, 0x60, 0x60, 0x60, 0x60, 0x40, 0x80 } }, // )
|
||||
{ 5, 6, { 0x20, 0xa8, 0xf8, 0x70, 0xf8, 0xa8, 0x20, 0x00 } }, // *
|
||||
{ 5, 6, { 0x00, 0x20, 0x20, 0xf8, 0x20, 0x20, 0x00, 0x00 } }, // +
|
||||
{ 2, 3, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80 } }, // ,
|
||||
{ 4, 5, { 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00 } }, // -
|
||||
{ 2, 3, { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00 } }, // .
|
||||
{ 3, 4, { 0x20, 0x20, 0x60, 0x40, 0xc0, 0x80, 0x80, 0x00 } }, // /
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00 } }, // 0
|
||||
{ 5, 6, { 0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00 } }, // 1
|
||||
{ 5, 6, { 0xf0, 0x18, 0x18, 0x70, 0xc0, 0xc0, 0xf8, 0x00 } }, // 2
|
||||
{ 5, 6, { 0xf0, 0x18, 0x18, 0x70, 0x18, 0x18, 0xf0, 0x00 } }, // 3
|
||||
{ 5, 6, { 0x18, 0x38, 0x58, 0x98, 0xf8, 0x18, 0x18, 0x00 } }, // 4
|
||||
{ 5, 6, { 0xf0, 0x80, 0xf0, 0x18, 0x18, 0x18, 0xf0, 0x00 } }, // 5
|
||||
{ 5, 6, { 0x70, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0x70, 0x00 } }, // 6
|
||||
{ 5, 6, { 0xf8, 0x18, 0x30, 0x30, 0x60, 0x60, 0x60, 0x00 } }, // 7
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0x70, 0xd8, 0xd8, 0x70, 0x00 } }, // 8
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0xd8, 0x78, 0x18, 0x70, 0x00 } }, // 9
|
||||
{ 2, 3, { 0x00, 0x00, 0xc0, 0xc0, 0x00, 0xc0, 0xc0, 0x00 } }, // :
|
||||
{ 2, 3, { 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x40, 0xc0, 0x80 } }, // ;
|
||||
{ 4, 5, { 0x10, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x10, 0x00 } }, // <
|
||||
{ 4, 5, { 0x00, 0x00, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00 } }, // =
|
||||
{ 4, 5, { 0x80, 0xc0, 0x60, 0x30, 0x60, 0xc0, 0x80, 0x00 } }, // >
|
||||
{ 5, 6, { 0xf0, 0x18, 0x30, 0x60, 0x60, 0x00, 0x60, 0x00 } }, // ?
|
||||
{ 6, 7, { 0x00, 0x78, 0xcc, 0xfc, 0xdc, 0xfc, 0xc0, 0x78 } }, // @
|
||||
{ 5, 6, { 0x70, 0xd8, 0xd8, 0xd8, 0xf8, 0xd8, 0xd8, 0x00 } }, // A
|
||||
{ 5, 6, { 0xf0, 0xd8, 0xf0, 0xd8, 0xd8, 0xd8, 0xf0, 0x00 } }, // B
|
||||
{ 5, 6, { 0x78, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x78, 0x00 } }, // C
|
||||
{ 5, 6, { 0xf0, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xf0, 0x00 } }, // D
|
||||
{ 5, 6, { 0xf8, 0xc0, 0xf0, 0xc0, 0xc0, 0xc0, 0xf8, 0x00 } }, // E
|
||||
{ 5, 6, { 0xf8, 0xc0, 0xf0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } }, // F
|
||||
{ 5, 6, { 0x70, 0xc0, 0xc0, 0xd8, 0xd8, 0xd8, 0x78, 0x00 } }, // G
|
||||
{ 5, 6, { 0xd8, 0xd8, 0xf8, 0xd8, 0xd8, 0xd8, 0xd8, 0x00 } }, // H
|
||||
{ 2, 3, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } }, // I
|
||||
{ 4, 5, { 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0, 0x00 } }, // J
|
||||
{ 6, 7, { 0xcc, 0xd8, 0xf0, 0xe0, 0xf0, 0xd8, 0xcc, 0x00 } }, // K
|
||||
{ 4, 5, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf0, 0x00 } }, // L
|
||||
{ 7, 8, { 0x82, 0xc6, 0xee, 0xfe, 0xd6, 0xc6, 0xc6, 0x00 } }, // M
|
||||
{ 6, 7, { 0x8c, 0xcc, 0xec, 0xfc, 0xdc, 0xcc, 0xc4, 0x00 } }, // N
|
||||
{ 6, 7, { 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00 } }, // O
|
||||
{ 5, 6, { 0xf0, 0xd8, 0xd8, 0xd8, 0xf0, 0xc0, 0xc0, 0x00 } }, // P
|
||||
{ 6, 7, { 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xdc, 0x78, 0x0c } }, // Q
|
||||
{ 5, 6, { 0xf0, 0xd8, 0xd8, 0xd8, 0xf0, 0xd0, 0xd8, 0x00 } }, // R
|
||||
{ 4, 5, { 0x70, 0xc0, 0xc0, 0x60, 0x30, 0x30, 0xe0, 0x00 } }, // S
|
||||
{ 6, 7, { 0xfc, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00 } }, // T
|
||||
{ 5, 6, { 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00 } }, // U
|
||||
{ 6, 7, { 0xcc, 0xcc, 0xcc, 0x78, 0x78, 0x30, 0x30, 0x00 } }, // V
|
||||
{ 7, 8, { 0xc6, 0xc6, 0xd6, 0xfe, 0x7c, 0x7c, 0x6c, 0x00 } }, // W
|
||||
{ 6, 7, { 0xcc, 0xcc, 0x78, 0x30, 0x78, 0xcc, 0xcc, 0x00 } }, // X
|
||||
{ 6, 7, { 0xcc, 0xcc, 0x78, 0x30, 0x30, 0x30, 0x30, 0x00 } }, // Y
|
||||
{ 5, 6, { 0xf8, 0x18, 0x38, 0x70, 0xe0, 0xc0, 0xf8, 0x00 } }, // Z
|
||||
{ 3, 4, { 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0 } }, // [
|
||||
{ 3, 4, { 0x80, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x00 } }, // backslash
|
||||
{ 3, 4, { 0xe0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xe0 } }, // ]
|
||||
{ 3, 4, { 0x40, 0xe0, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // ^
|
||||
{ 5, 5, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8 } }, // _
|
||||
{ 2, 3, { 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // `
|
||||
{ 5, 6, { 0x00, 0x00, 0x70, 0x18, 0x78, 0xd8, 0x78, 0x00 } }, // a
|
||||
{ 5, 6, { 0xc0, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0xf0, 0x00 } }, // b
|
||||
{ 4, 5, { 0x00, 0x00, 0x70, 0xc0, 0xc0, 0xc0, 0x70, 0x00 } }, // c
|
||||
{ 5, 6, { 0x18, 0x18, 0x78, 0xd8, 0xd8, 0xd8, 0x78, 0x00 } }, // d
|
||||
{ 5, 6, { 0x00, 0x00, 0x70, 0xd8, 0xf8, 0xc0, 0x78, 0x00 } }, // e
|
||||
{ 3, 4, { 0x60, 0xc0, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } }, // f
|
||||
{ 5, 6, { 0x00, 0x00, 0x78, 0xd8, 0xd8, 0x78, 0x18, 0x70 } }, // g
|
||||
{ 5, 6, { 0xc0, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0xd8, 0x00 } }, // h
|
||||
{ 2, 3, { 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } }, // i
|
||||
{ 3, 4, { 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0 } }, // j
|
||||
{ 5, 6, { 0xc0, 0xc0, 0xd8, 0xf0, 0xe0, 0xf0, 0xd8, 0x00 } }, // k
|
||||
{ 2, 3, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } }, // l
|
||||
{ 8, 9, { 0x00, 0x00, 0xfe, 0xdb, 0xdb, 0xdb, 0xdb, 0x00 } }, // m
|
||||
{ 5, 6, { 0x00, 0x00, 0xf0, 0xd8, 0xd8, 0xd8, 0xd8, 0x00 } }, // n
|
||||
{ 5, 6, { 0x00, 0x00, 0x70, 0xd8, 0xd8, 0xd8, 0x70, 0x00 } }, // o
|
||||
{ 5, 6, { 0x00, 0x00, 0xf0, 0xd8, 0xd8, 0xf0, 0xc0, 0xc0 } }, // p
|
||||
{ 5, 6, { 0x00, 0x00, 0x78, 0xd8, 0xd8, 0x78, 0x18, 0x18 } }, // q
|
||||
{ 4, 5, { 0x00, 0x00, 0xd0, 0xf0, 0xc0, 0xc0, 0xc0, 0x00 } }, // r
|
||||
{ 4, 5, { 0x00, 0x00, 0x70, 0xc0, 0xf0, 0x30, 0xe0, 0x00 } }, // s
|
||||
{ 3, 4, { 0xc0, 0xc0, 0xe0, 0xc0, 0xc0, 0xc0, 0x60, 0x00 } }, // t
|
||||
{ 5, 6, { 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xd8, 0x78, 0x00 } }, // u
|
||||
{ 5, 6, { 0x00, 0x00, 0xd8, 0xd8, 0x70, 0x70, 0x20, 0x00 } }, // v
|
||||
{ 7, 8, { 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0x7c, 0x6c, 0x00 } }, // w
|
||||
{ 5, 6, { 0x00, 0x00, 0xd8, 0xd8, 0x70, 0xd8, 0xd8, 0x00 } }, // x
|
||||
{ 5, 6, { 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0x78, 0x18, 0x70 } }, // y
|
||||
{ 5, 6, { 0x00, 0x00, 0xf8, 0x30, 0x60, 0xc0, 0xf8, 0x00 } }, // z
|
||||
{ 3, 4, { 0x20, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x20 } }, // {
|
||||
{ 2, 3, { 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 } }, // |
|
||||
{ 3, 4, { 0x80, 0x40, 0x60, 0x60, 0x60, 0x60, 0x40, 0x80 } }, // }
|
||||
{ 6, 7, { 0x00, 0x00, 0x00, 0x64, 0xfc, 0x98, 0x00, 0x00 } }, // ~
|
||||
{ 6, 7, { 0x00, 0x38, 0x44, 0xf8, 0xf0, 0x44, 0x38, 0x00 } }, // euro
|
||||
{ 5, 6, { 0x38, 0x60, 0x60, 0x60, 0xf0, 0x60, 0xf8, 0x00 } }, // pound
|
||||
{ 6, 7, { 0xcc, 0x78, 0xfc, 0x30, 0xfc, 0x30, 0x30, 0x00 } }, // yen
|
||||
{ 5, 6, { 0x00, 0x88, 0x70, 0xd8, 0xd8, 0x70, 0x88, 0x00 } }, // currency
|
||||
{ 5, 6, { 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0x78, 0x00 } }, // inverted ?
|
||||
{ 2, 3, { 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 } }, // inverted !
|
||||
{ 4, 5, { 0x60, 0xd0, 0xe0, 0xb0, 0xd0, 0x70, 0xb0, 0x60 } }, // section
|
||||
};
|
1744
nokia-small.bdf
Normal file
1744
nokia-small.bdf
Normal file
File diff suppressed because it is too large
Load Diff
111
nokia-small.c
111
nokia-small.c
@ -1,111 +0,0 @@
|
||||
struct
|
||||
{
|
||||
int width;
|
||||
int advance;
|
||||
int rows[8];
|
||||
}
|
||||
font_data[] =
|
||||
{
|
||||
{ 3, 4, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // space
|
||||
{ 1, 2, { 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x00 } }, // !
|
||||
{ 3, 4, { 0xa0, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // "
|
||||
{ 5, 6, { 0x50, 0x50, 0xf8, 0x50, 0x50, 0xf8, 0x50, 0x50 } }, // #
|
||||
{ 4, 5, { 0x20, 0x70, 0xa0, 0xe0, 0x70, 0x30, 0xe0, 0x20 } }, // $
|
||||
{ 4, 5, { 0xd0, 0xd0, 0x20, 0x60, 0x40, 0xb0, 0xb0, 0x00 } }, // %
|
||||
{ 5, 6, { 0x40, 0xa0, 0xa0, 0x40, 0xa8, 0x90, 0x68, 0x00 } }, // &
|
||||
{ 1, 2, { 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // '
|
||||
{ 2, 3, { 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40 } }, // (
|
||||
{ 2, 3, { 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80 } }, // )
|
||||
{ 5, 6, { 0x00, 0x50, 0x20, 0xf8, 0x20, 0x50, 0x00, 0x00 } }, // *
|
||||
{ 5, 6, { 0x00, 0x20, 0x20, 0xf8, 0x20, 0x20, 0x00, 0x00 } }, // +
|
||||
{ 2, 3, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80 } }, // ,
|
||||
{ 4, 5, { 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00 } }, // -
|
||||
{ 1, 2, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 } }, // .
|
||||
{ 3, 4, { 0x20, 0x20, 0x40, 0x40, 0x40, 0x80, 0x80, 0x00 } }, // /
|
||||
{ 4, 5, { 0x60, 0x90, 0x90, 0x90, 0x90, 0x90, 0x60, 0x00 } }, // 0
|
||||
{ 4, 5, { 0x20, 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00 } }, // 1
|
||||
{ 4, 5, { 0xe0, 0x10, 0x10, 0x60, 0x80, 0x80, 0xf0, 0x00 } }, // 2
|
||||
{ 4, 5, { 0xe0, 0x10, 0x10, 0x60, 0x10, 0x10, 0xe0, 0x00 } }, // 3
|
||||
{ 4, 5, { 0x10, 0x30, 0x50, 0x90, 0xf0, 0x10, 0x10, 0x00 } }, // 4
|
||||
{ 4, 5, { 0xe0, 0x80, 0xe0, 0x10, 0x10, 0x10, 0xe0, 0x00 } }, // 5
|
||||
{ 4, 5, { 0x60, 0x80, 0xe0, 0x90, 0x90, 0x90, 0x60, 0x00 } }, // 6
|
||||
{ 4, 5, { 0xf0, 0x10, 0x20, 0x20, 0x40, 0x40, 0x40, 0x00 } }, // 7
|
||||
{ 4, 5, { 0x60, 0x90, 0x90, 0x60, 0x90, 0x90, 0x60, 0x00 } }, // 8
|
||||
{ 4, 5, { 0x60, 0x90, 0x90, 0x90, 0x70, 0x10, 0x60, 0x00 } }, // 9
|
||||
{ 1, 2, { 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00 } }, // :
|
||||
{ 2, 3, { 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x80 } }, // ;
|
||||
{ 4, 5, { 0x10, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0x00 } }, // <
|
||||
{ 4, 5, { 0x00, 0x00, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00 } }, // =
|
||||
{ 4, 5, { 0x80, 0x40, 0x20, 0x10, 0x20, 0x40, 0x80, 0x00 } }, // >
|
||||
{ 4, 5, { 0xe0, 0x10, 0x20, 0x40, 0x40, 0x00, 0x40, 0x00 } }, // ?
|
||||
{ 5, 6, { 0x70, 0x88, 0xb8, 0xd8, 0xb0, 0x88, 0x70, 0x00 } }, // @
|
||||
{ 4, 5, { 0x60, 0x90, 0x90, 0x90, 0xf0, 0x90, 0x90, 0x00 } }, // A
|
||||
{ 4, 5, { 0xe0, 0x90, 0xe0, 0x90, 0x90, 0x90, 0xe0, 0x00 } }, // B
|
||||
{ 4, 5, { 0x70, 0x80, 0x80, 0x80, 0x80, 0x80, 0x70, 0x00 } }, // C
|
||||
{ 4, 5, { 0xe0, 0x90, 0x90, 0x90, 0x90, 0x90, 0xe0, 0x00 } }, // D
|
||||
{ 4, 5, { 0xf0, 0x80, 0xe0, 0x80, 0x80, 0x80, 0xf0, 0x00 } }, // E
|
||||
{ 4, 5, { 0xf0, 0x80, 0xe0, 0x80, 0x80, 0x80, 0x80, 0x00 } }, // F
|
||||
{ 4, 5, { 0x70, 0x80, 0xb0, 0x90, 0x90, 0x90, 0x70, 0x00 } }, // G
|
||||
{ 4, 5, { 0x90, 0x90, 0xf0, 0x90, 0x90, 0x90, 0x90, 0x00 } }, // H
|
||||
{ 1, 2, { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00 } }, // I
|
||||
{ 3, 4, { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, 0x00 } }, // J
|
||||
{ 4, 5, { 0x90, 0xa0, 0xc0, 0x80, 0xc0, 0xa0, 0x90, 0x00 } }, // K
|
||||
{ 4, 5, { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0, 0x00 } }, // L
|
||||
{ 5, 6, { 0x88, 0xd8, 0xa8, 0xa8, 0x88, 0x88, 0x88, 0x00 } }, // M
|
||||
{ 5, 6, { 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x88, 0x88, 0x00 } }, // N
|
||||
{ 5, 6, { 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00 } }, // O
|
||||
{ 4, 5, { 0xe0, 0x90, 0x90, 0x90, 0xe0, 0x80, 0x80, 0x00 } }, // P
|
||||
{ 5, 6, { 0x70, 0x88, 0x88, 0x88, 0x88, 0xa8, 0x70, 0x08 } }, // Q
|
||||
{ 4, 5, { 0xe0, 0x90, 0x90, 0x90, 0xe0, 0xa0, 0x90, 0x00 } }, // R
|
||||
{ 4, 5, { 0x70, 0x80, 0x80, 0x60, 0x10, 0x10, 0xe0, 0x00 } }, // S
|
||||
{ 5, 6, { 0xf8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00 } }, // T
|
||||
{ 4, 5, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x60, 0x00 } }, // U
|
||||
{ 5, 6, { 0x88, 0x88, 0x88, 0x50, 0x50, 0x20, 0x20, 0x00 } }, // V
|
||||
{ 7, 8, { 0x82, 0x82, 0x44, 0x54, 0x54, 0x28, 0x28, 0x00 } }, // W
|
||||
{ 5, 6, { 0x88, 0x88, 0x50, 0x20, 0x50, 0x88, 0x88, 0x00 } }, // X
|
||||
{ 5, 6, { 0x88, 0x88, 0x50, 0x20, 0x20, 0x20, 0x20, 0x00 } }, // Y
|
||||
{ 4, 5, { 0xf0, 0x10, 0x20, 0x40, 0x80, 0x80, 0xf0, 0x00 } }, // Z
|
||||
{ 2, 3, { 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0 } }, // [
|
||||
{ 3, 4, { 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x00 } }, // backslash
|
||||
{ 2, 3, { 0xc0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0 } }, // ]
|
||||
{ 3, 4, { 0x40, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // ^
|
||||
{ 5, 5, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8 } }, // _
|
||||
{ 2, 3, { 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, // `
|
||||
{ 4, 5, { 0x00, 0x00, 0x60, 0x10, 0x70, 0x90, 0x70, 0x00 } }, // a
|
||||
{ 4, 5, { 0x80, 0x80, 0xe0, 0x90, 0x90, 0x90, 0xe0, 0x00 } }, // b
|
||||
{ 3, 4, { 0x00, 0x00, 0x60, 0x80, 0x80, 0x80, 0x60, 0x00 } }, // c
|
||||
{ 4, 5, { 0x10, 0x10, 0x70, 0x90, 0x90, 0x90, 0x70, 0x00 } }, // d
|
||||
{ 4, 5, { 0x00, 0x00, 0x60, 0x90, 0xf0, 0x80, 0x60, 0x00 } }, // e
|
||||
{ 2, 3, { 0x40, 0x80, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x00 } }, // f
|
||||
{ 4, 5, { 0x00, 0x00, 0x70, 0x90, 0x90, 0x70, 0x10, 0x60 } }, // g
|
||||
{ 4, 5, { 0x80, 0x80, 0xe0, 0x90, 0x90, 0x90, 0x90, 0x00 } }, // h
|
||||
{ 1, 2, { 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00 } }, // i
|
||||
{ 2, 3, { 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80 } }, // j
|
||||
{ 4, 5, { 0x80, 0x80, 0x90, 0xa0, 0xc0, 0xa0, 0x90, 0x00 } }, // k
|
||||
{ 1, 2, { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00 } }, // l
|
||||
{ 5, 6, { 0x00, 0x00, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0x00 } }, // m
|
||||
{ 4, 5, { 0x00, 0x00, 0xe0, 0x90, 0x90, 0x90, 0x90, 0x00 } }, // n
|
||||
{ 4, 5, { 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x60, 0x00 } }, // o
|
||||
{ 4, 5, { 0x00, 0x00, 0xe0, 0x90, 0x90, 0xe0, 0x80, 0x80 } }, // p
|
||||
{ 4, 5, { 0x00, 0x00, 0x70, 0x90, 0x90, 0x70, 0x10, 0x10 } }, // q
|
||||
{ 3, 4, { 0x00, 0x00, 0xa0, 0xe0, 0x80, 0x80, 0x80, 0x00 } }, // r
|
||||
{ 3, 4, { 0x00, 0x00, 0x60, 0x80, 0x40, 0x20, 0xc0, 0x00 } }, // s
|
||||
{ 2, 3, { 0x80, 0x80, 0xc0, 0x80, 0x80, 0x80, 0x40, 0x00 } }, // t
|
||||
{ 4, 5, { 0x00, 0x00, 0x90, 0x90, 0x90, 0x90, 0x70, 0x00 } }, // u
|
||||
{ 5, 6, { 0x00, 0x00, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00 } }, // v
|
||||
{ 5, 6, { 0x00, 0x00, 0x88, 0xa8, 0xa8, 0x50, 0x50, 0x00 } }, // w
|
||||
{ 4, 5, { 0x00, 0x00, 0x90, 0x90, 0x60, 0x90, 0x90, 0x00 } }, // x
|
||||
{ 4, 5, { 0x00, 0x00, 0x90, 0x90, 0x90, 0x70, 0x10, 0x60 } }, // y
|
||||
{ 4, 5, { 0x00, 0x00, 0xf0, 0x20, 0x40, 0x80, 0xf0, 0x00 } }, // z
|
||||
{ 2, 3, { 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40 } }, // {
|
||||
{ 1, 2, { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 } }, // |
|
||||
{ 2, 3, { 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80 } }, // }
|
||||
{ 6, 7, { 0x00, 0x00, 0x00, 0x64, 0x98, 0x00, 0x00, 0x00 } }, // ~
|
||||
{ 6, 7, { 0x00, 0x38, 0x44, 0xf8, 0xf0, 0x44, 0x38, 0x00 } }, // euro
|
||||
{ 4, 5, { 0x70, 0x80, 0x80, 0xe0, 0x40, 0x40, 0xf0, 0x00 } }, // pound
|
||||
{ 5, 6, { 0x88, 0x50, 0xf8, 0x20, 0x70, 0x20, 0x20, 0x00 } }, // yen
|
||||
{ 4, 5, { 0x00, 0x90, 0x60, 0x90, 0x90, 0x60, 0x90, 0x00 } }, // currency
|
||||
{ 4, 5, { 0x20, 0x00, 0x20, 0x20, 0x40, 0x80, 0x70, 0x00 } }, // inverted ?
|
||||
{ 1, 2, { 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00 } }, // inverted !
|
||||
{ 3, 4, { 0x40, 0xa0, 0xc0, 0xa0, 0xa0, 0x60, 0xa0, 0x40 } }, // section
|
||||
};
|
Loading…
Reference in New Issue
Block a user