fixed font build and added freedoom fonts (#13)

This commit is contained in:
olikraus 2016-05-29 14:51:52 +02:00
parent caa59191da
commit 13612df300
9 changed files with 3049 additions and 6 deletions

View File

@ -63,8 +63,8 @@ class U8G2 : public Print
u8x8_t *getU8x8(void) { return u8g2_GetU8x8(&u8g2); }
u8g2_t *getU8g2(void) { return &u8g2; }
void enablePrintUTF8(void) { cpp_next_cb = u8x8_utf8_next; }
void disablePrintUTF8(void) { cpp_next_cb = u8x8_ascii_next; }
void enableUTF8Print(void) { cpp_next_cb = u8x8_utf8_next; }
void disableUTF8Print(void) { cpp_next_cb = u8x8_ascii_next; }
/* u8x8 interface */
uint8_t getCols(void) { return u8x8_GetCols(u8g2_GetU8x8(&u8g2)); }

View File

@ -592,6 +592,10 @@ extern const uint8_t u8g2_font_u8glib_4_hr[] U8G2_FONT_SECTION("u8g2_font_u8glib
extern const uint8_t u8g2_font_m2icon_5_tf[] U8G2_FONT_SECTION("u8g2_font_m2icon_5_tf");
extern const uint8_t u8g2_font_m2icon_7_tf[] U8G2_FONT_SECTION("u8g2_font_m2icon_7_tf");
extern const uint8_t u8g2_font_m2icon_9_tf[] U8G2_FONT_SECTION("u8g2_font_m2icon_9_tf");
extern const uint8_t u8g2_font_freedoomr10_tu[] U8G2_FONT_SECTION("u8g2_font_freedoomr10_tu");
extern const uint8_t u8g2_font_freedoomr10_mu[] U8G2_FONT_SECTION("u8g2_font_freedoomr10_mu");
extern const uint8_t u8g2_font_freedoomr25_tn[] U8G2_FONT_SECTION("u8g2_font_freedoomr25_tn");
extern const uint8_t u8g2_font_freedoomr25_mn[] U8G2_FONT_SECTION("u8g2_font_freedoomr25_mn");
extern const uint8_t u8g2_font_cursor_tf[] U8G2_FONT_SECTION("u8g2_font_cursor_tf");
extern const uint8_t u8g2_font_cursor_tr[] U8G2_FONT_SECTION("u8g2_font_cursor_tr");
extern const uint8_t u8g2_font_micro_tr[] U8G2_FONT_SECTION("u8g2_font_micro_tr");

View File

@ -252,6 +252,105 @@ const uint8_t u8g2_font_m2icon_9_tf[349] U8G2_FONT_SECTION("u8g2_font_m2icon_9_t
"\7\42\314\20\1a\23\212\335#.D\260 \7\5\206\10b$D@Q\0b\25\230\315#*H\230"
"@!\202\21\31\22Q\220@A\2\21\1f\24\215\335THM\300\60\1\303\4Y\21\60\204\300 j"
"\0g\6\261\221\260\0h\22\231\325\24\36H\300@!J\4\12\30\36H \0\0\0\0";
/*
Fontname: -FreeType-FreeDooM-Bold-R-Normal--34-340-72-72-P-170-ISO8859-1
Copyright: FreeUniveral (c) Stephen Wilson 2009 Original Font Sil-Sophia Copyright (c) SIL International, 1994-2008.
Glyphs: 64/256
BBX Build Mode: 0
*/
const uint8_t u8g2_font_freedoomr10_tu[654] U8G2_FONT_SECTION("u8g2_font_freedoomr10_tu") =
"@\0\3\3\3\4\4\5\5\7\13\0\1\14\0\14\2\0\364\0\0\2u \5\0\214\27!\5\0\214"
"\27\42\5\0\214\27#\5\0\214\27$\5\0\214\27%\5\0\214\27&\5\0\214\27'\5\0\214\27("
"\10S\224\67\243\374&)\12\323\225\27\262P>M\0*\13\255\274\30\221\224Yl\222\1+\13?\244"
"x\341\264[\70\15\0,\7\22\325\67\22\0-\6\17\274\30\7.\6\22\225\27\4/\15W\224\330\321"
"p\64\71\232\34\15\3\60\10V\224\27G\375x\61\10R\226\27\222\374\3\62\13V\224\27\326\254\207h"
"\252\1\63\12V\224\27\326L\324\254\7\64\11V\224\27A\35\257\71\65\12V\224\27\327Tk\326\3\66"
"\12V\224\27\327\324\243\306\3\67\10V\224\27\326\374\3\70\13V\224\27G\305CP\343\1\71\12V\224"
"\27G\305k\326\3:\7:\225\27d\2;\5\0\214\27<\5\0\214\27=\5\0\214\27>\5\0\214"
"\27?\5\0\214\27@\5\0\214\27A\14W\224\30\207\250\326\203Tk\0B\14W\224\30\207\250\352%"
"\252\365\20C\11W\224\30\207p~>D\12W\224\30\226\250~\275\0E\14W\224\30\207pr)\234"
"\371\0F\14W\224\30\207pr)\234\63\0G\14W\224\30\207p\246\252\326C\0H\13W\224\30Q"
"\255\7\251\256\1I\7\321\225\30\207\1J\14W\224x\344\234\245\252\221\12\0K\23W\224\30Qa$"
"\26J\33F\202\241XR\60\22\15L\11W\224\30\341\374\371\0M\16W\224\30\321\331$E\24\222\352"
"\65\0N\24W\224\30\302\241$&\211\211B\242\220,\42\213\10\207\2O\13W\224\70\225\250~\215T"
"\0P\14W\224\30\207\250\352A\234\63\0Q\25W\224\70\244`$\30\11F\202\221`$\30\11F\202"
"!\3R\21W\224\30\207\250\352A\22\14\305\222\202\221h\0S\14W\224\30\207p\346s\362!\0T"
"\11O\234\30\267p~\3U\11W\224\30Q\375\365\20V\23W\224\30Q\325H,\24\13Id\221`"
"$\32\216\1W\17W\224\30Q=\205D!I\212$e&X\23W\224\30\321H,\24K\211\206\243"
"\221XR,\22\15Y\14W\224\30Q\255\207X\70\67\0Z\13W\224\30\347\250P\257\341\3[\10T"
"\224\27\265\374F\134\16V\224\27\341h\70\32\216\206\243\341\0]\10T\225\27\264\374V^\11\235\314W"
"\261HZ\0_\6\16\224\27\6\0\0\0";
/*
Fontname: -FreeType-FreeDooM-Bold-R-Normal--34-340-72-72-P-170-ISO8859-1
Copyright: FreeUniveral (c) Stephen Wilson 2009 Original Font Sil-Sophia Copyright (c) SIL International, 1994-2008.
Glyphs: 64/256
BBX Build Mode: 2
*/
const uint8_t u8g2_font_freedoomr10_mu[899] U8G2_FONT_SECTION("u8g2_font_freedoomr10_mu") =
"@\2\4\3\4\4\1\2\5\7\13\0\1\14\0\14\2\1W\0\0\3j \7\267\277\217'\0!\7"
"\267\277\217'\0\42\7\267\277\217'\0#\7\267\277\217'\0$\7\267\277\217'\0%\7\267\277\217'"
"\0&\7\267\277\217'\0'\7\267\277\217'\0(\12\267\277!\24\226\337\311\2)\12\267\277#\27\226"
"\37I\2*\15\270\307\221\321X\330PDz\254\0+\14\270\307\33\227\350(.=\64\0,\11\267\277"
"\23\25\217;\0-\11\270\307\217\344\36#\0.\11\267\277\217\265\224(\0/\15\270\307\226.,]X"
"\272\260x\0\60\27\267\277`\21\24\21\24\21\24\21\24\21\24\21\24\21\24\21\24a\10\61\10\267\277$"
"\226\10\62\14\267\277`\226\13\213\260d\206\0\63\13\267\277`\226\15Y.\14\1\64\22\267\277\20\24"
"\21\24\21\24\21\24\21\24a\226C\0\65\14\267\277`\21\226\314,\27\206\0\66\23\267\277`\21\226\314"
"\42(\42(\42(\42(\302\20\0\67\10\267\277`\226\10\70\26\267\277`\21\24\21\24\21\24a\21"
"\24\21\24\21\24\21\24a\10\71\20\267\277`\21\24\21\24\21\24a\226\13C\0:\13\267\277\17(%"
"\17+%\12;\7\267\277\217'\0<\7\267\277\217'\0=\7\267\277\217'\0>\7\267\277\217'\0"
"?\7\267\277\217'\0@\7\267\277\217'\0A\27\270\307p\21\25\21\25\21\25\21\25q\21\25\21\25"
"\21\25\21\25\11B\26\270\307p\21\25\21\25\21\25a\22\25\21\25\21\25\21\25q\11C\12\270\307p"
"\21\227\337]\2D\27\270\307`\22\25\21\25\21\25\21\25\21\25\21\25\21\25\21\25a\12E\15\270\307"
"p\21\227\256&.\273K\0F\14\270\307p\21\227\256&.\367\0G\23\270\307p\21\227\11ETD"
"TDTDT\304%\0H\30\270\307\20\25\21\25\21\25\21\25q\21\25\21\25\21\25\21\25\21\25\11"
"I\10\270\307\23\227\14J\17\270\307C\227\27Q\21Q\21Q!\245\0K\27\270\307\20\25\21\24\22"
"\223$h*\42*$(&QHT$\0L\11\270\307\20\227\277\273\4M\30\270\307\20\25!#\221"
"')\242\42\242\42\242\42\242\42\242\42\242\42\1N\32\270\307 \24!\24\221&\42MDH\212\220\24"
"\61\21i\42\22I\4I\2O\27\270\307Q\22\25\21\25\21\25\21\25\21\25\21\25\21\25\21\25R\12"
"P\20\270\307p\21\25\21\25\21\25q\21\227{\0Q\27\270\307A\23\24\22\24\22\24\22\24\22\24\22"
"\24\22\24\22\24c\11R\26\270\307p\21\25\21\25\21\25q\221*$(&QHT$\0S\14\270"
"\307p\21\227\335]\26\227\0T\12\270\307p\24\227\337C\1U\30\270\307\20\25\21\25\21\25\21\25\21"
"\25\21\25\21\25\21\25\21\25q\11V\26\270\307\20\25\21\25\21\25\22\223\215\204PDTDX\134\60"
"\0W\30\270\307\20\25\21\25\21\25\21\25\21\25\21\222\42$E\376BF\22\0X\24\270\307\20\25\22"
"\223QDX\134XDPL&Q\221\0Y\21\270\307\20\25\21\25\21\25\21\25q\24\227c\0Z\14"
"\270\307p\27&\245gq\227\0[\12\267\277@\23\226\237\221\2\134\17\267\277\20\27\26\27\26\27\26\27"
"\26\27\10]\11\267\277B\226\277!\4^\13\267\277\23\25\21\223\36c\0_\10\267\277\217\33C\0\0"
"\0\0";
/*
Fontname: -FreeType-FreeDooM-Bold-R-Normal--34-340-72-72-P-170-ISO10646-1
Copyright: FreeUniveral (c) Stephen Wilson 2009 Original Font Sil-Sophia Copyright (c) SIL International, 1994-2008.
Glyphs: 16/17
BBX Build Mode: 0
*/
const uint8_t u8g2_font_freedoomr25_tn[222] U8G2_FONT_SECTION("u8g2_font_freedoomr25_tn") =
"\20\0\5\6\5\5\4\5\6\22\32\0\0\32\0\32\0\0\0\0\0\0\305 \6\0 \134\1+\20\21"
"\246\235\317\300\15\337\21\235\201\33\276\3\0,\14\7\255\134Eq\42\61\210\6\0-\7Id_\201\4"
".\7\245\264\134A\6\60\14\21\247\234\1\211\25\377\377\61\33\61\13\6\277\234\1c\14\377\377\37\62\17"
"\21\247\234\201\310\15\356\364\204\337\233\1\63\17\21\247\234\201\310\15\377\206\223\33~\316\6\64\16\21\247"
"\234\201\200\25\377\261\222\33\376\7\65\17\21\247\234\1\351\11O\344\206\237\263\1\66\17\21\247\234\1\351"
"\11\217\304\212\37\263\1\67\13\20\253\234\1\250\15\377\377\37\70\17\21\247\234\1\211\25\354\304\212\37"
"\263\1\71\17\21\247\234\1\211\25\254\344\206\237\263\1:\11\5\266\134A\306g\0\0\0\0";
/*
Fontname: -FreeType-FreeDooM-Bold-R-Normal--34-340-72-72-P-170-ISO10646-1
Copyright: FreeUniveral (c) Stephen Wilson 2009 Original Font Sil-Sophia Copyright (c) SIL International, 1994-2008.
Glyphs: 16/17
BBX Build Mode: 2
*/
const uint8_t u8g2_font_freedoomr25_mn[446] U8G2_FONT_SECTION("u8g2_font_freedoomr25_mn") =
"\20\2\5\5\5\5\1\1\6\22\32\0\0\32\0\32\0\0\0\0\0\1\245 \11R/\360\377\33\0"
"+\23S?\220\35\340\370R$\242\64\300\361}\260\16\0,\20R/\360\317\25\255\334\42\34\351"
"\3\20\0-\15R/\360\265$%\37\374\62\0.\15R/\360?S\264r\37h\0\60@S"
"?\207HDB`\203\20\330 \4\66\10\201\15B`\203\20\330 \4\66\10\201\15B`\203\20\330 "
"\4\66\10\201\15B`\203\20\330 \4\66\10\201\15B`\203\20\330 \4\66\210\270\17 \0\61\16S"
"?\37\243\31p\374\377\37h\0\62\24S?\207HDp\374\23\61!D\361\213\221\210}\0\1\63"
"\22S?\207HDp\374+.\70\376D\334\7\20\0\64*S?\7\201\15B`\203\20\330 \4\66"
"\10\201\15B`\203\20\330 \4\66\10\201\15B`\203\20\330 bp\374\357\3\10\0\65\24S?\207"
"HDB\210\342/F\42\202\343O\304}\0\1\66(S?\207HDB\210\342/F\42\22\2\33\204"
"\300\6!\260A\10l\20\2\33\204\300\6!\260A\10l\20q\37@\0\67\16S?\13h@p\374"
"\377\37@\0\70<S?\207HDB`\203\20\330 \4\66\10\201\15B`\203\20\330 \4\66\10"
"\201\15B`\203\210\11\201\15B`\203\20\330 \4\66\10\201\15B`\203\20\330 \4\66\210\270\17 "
"\0\71(S?\207HDB`\203\20\330 \4\66\10\201\15B`\203\20\330 \4\66\10\201\15B`"
"\203\210\301\361'\342>\200\0:\21R/p\271h\345>\30/Z\271\17\64\0\0\0\0";
/*
Fontname: cursor
Copyright: These glyphs are unencumbered

View File

@ -83,7 +83,7 @@ void setup(void) {
digitalWrite(9, 0); // default output in I2C mode for the SSD1306 test shield: set the i2c adr to 0
u8g2.begin();
u8g2.enablePrintUTF8(); // enable UTF8 support for the Arduino print() function
u8g2.enableUTF8Print(); // enable UTF8 support for the Arduino print() function
}
void loop(void) {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,453 @@
STARTFONT 2.1
FONT -FreeType-FreeDooM-Bold-R-Normal--34-340-72-72-P-170-ISO10646-1
SIZE 34 72 72
FONTBOUNDINGBOX 18 26 0 0
COMMENT "Generated by fontforge, http://fontforge.sourceforge.net"
COMMENT ""
COMMENT "Converted from OpenType font "FreeUniversal-Bold.ttf" by "otf2bdf 3.0"."
COMMENT ""
STARTPROPERTIES 19
FOUNDRY "FreeType"
FAMILY_NAME "FreeDooM"
WEIGHT_NAME "Bold"
SLANT "R"
SETWIDTH_NAME "Normal"
ADD_STYLE_NAME ""
PIXEL_SIZE 34
POINT_SIZE 340
RESOLUTION_X 72
RESOLUTION_Y 72
SPACING "P"
AVERAGE_WIDTH 170
CHARSET_REGISTRY "ISO10646"
CHARSET_ENCODING "1"
FONT_ASCENT 36
FONT_DESCENT 8
COPYRIGHT "FreeUniveral (c) Stephen Wilson 2009 Original Font Sil-Sophia Copyright (c) SIL International, 1994-2008."
_OTF_FONTFILE "FreeUniversal-Bold.ttf"
_OTF_PSNAME "FreeUniversal-Bold"
ENDPROPERTIES
CHARS 17
STARTCHAR $0020
ENCODING 32
SWIDTH 322 0
DWIDTH 11 0
BBX 0 0 0 0
BITMAP
ENDCHAR
STARTCHAR $002B
ENCODING 43
SWIDTH 557 0
DWIDTH 19 0
BBX 17 16 1 6
BITMAP
01C000
01C000
01C000
01C000
01C000
01C000
01C000
FFFF80
FFFF80
01C000
01C000
01C000
01C000
01C000
01C000
01C000
ENDCHAR
STARTCHAR $002C
ENCODING 44
SWIDTH 322 0
DWIDTH 11 0
BBX 7 8 3 2
BITMAP
3E
3E
3E
3E
3E
F0
F0
F0
ENDCHAR
STARTCHAR $002D
ENCODING 45
SWIDTH 322 0
DWIDTH 11 0
BBX 9 2 1 13
BITMAP
FF80
FF80
ENDCHAR
STARTCHAR $002E
ENCODING 46
SWIDTH 322 0
DWIDTH 11 0
BBX 5 5 5 2
BITMAP
F8
F8
F8
F8
F8
ENDCHAR
STARTCHAR $0030
ENCODING 48
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $0031
ENCODING 49
SWIDTH 557 0
DWIDTH 19 0
BBX 6 24 7 2
BITMAP
FC
FC
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
1C
ENDCHAR
STARTCHAR $0032
ENCODING 50
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
000380
000380
000380
000380
000380
000380
000380
000380
000380
FFFF80
FFFF80
C00000
C00000
C00000
C00000
C00000
C00000
C00000
C00000
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $0033
ENCODING 51
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
000380
000380
000380
000380
000380
000380
000380
000380
000380
1FFF80
1FFF80
000380
000380
000380
000380
000380
000380
000380
000380
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $0034
ENCODING 52
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
FFFF80
FFFF80
000380
000380
000380
000380
000380
000380
000380
000380
000380
000380
000380
ENDCHAR
STARTCHAR $0035
ENCODING 53
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
C00000
C00000
C00000
C00000
C00000
C00000
C00000
C00000
C00000
FFFF80
FFFF80
000380
000380
000380
000380
000380
000380
000380
000380
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $0036
ENCODING 54
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
C00000
C00000
C00000
C00000
C00000
C00000
C00000
C00000
C00000
FFFF80
FFFF80
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $0037
ENCODING 55
SWIDTH 557 0
DWIDTH 19 0
BBX 16 24 2 2
BITMAP
FFFF
FFFF
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
0007
ENDCHAR
STARTCHAR $0038
ENCODING 56
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
FFFF80
FFFF80
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $0039
ENCODING 57
SWIDTH 557 0
DWIDTH 19 0
BBX 17 24 1 2
BITMAP
FFFF80
FFFF80
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
C00380
FFFF80
FFFF80
000380
000380
000380
000380
000380
000380
000380
000380
FFFF80
FFFF80
FFFF80
ENDCHAR
STARTCHAR $003A
ENCODING 58
SWIDTH 322 0
DWIDTH 11 0
BBX 5 16 5 2
BITMAP
F8
F8
F8
F8
F8
00
00
00
00
00
00
F8
F8
F8
F8
F8
ENDCHAR
STARTCHAR $003B
ENCODING 59
SWIDTH 322 0
DWIDTH 11 0
BBX 7 16 3 2
BITMAP
3E
3E
3E
3E
3E
00
00
00
3E
3E
3E
3E
3E
F0
F0
F0
ENDCHAR
ENDFONT

View File

@ -1,6 +1,6 @@
# works within ubuntu and min-gw (win7) environment
CFLAGS = -g -DBUILD2 -Wall -I../../../csrc/
CFLAGS = -g -DBUILD2 -DU8G2_USE_LARGE_FONTS -DU8G2_16BIT -Wall -I../../../csrc/
#CFLAGS = -O4 -Wall
SRC1 = build.c

View File

@ -191,6 +191,10 @@ struct fontinfo fi[] = {
{ 0, "m2icon_5.bdf", "m2icon_5", 0, 0, BM_T, FM_C, MM_F, "", ""},
{ 0, "m2icon_7.bdf", "m2icon_7", 0, 0, BM_T, FM_C, MM_F, "", ""},
{ 0, "m2icon_9.bdf", "m2icon_9", 0, 0, BM_T, FM_C, MM_F, "", ""},
{ 0, "freedoomr10r.bdf", "freedoomr10", 0, 0, BM_T|BM_M, FM_C, MM_U, "", ""},
{ 0, "freedoomr25n.bdf", "freedoomr25", 0, 0, BM_T|BM_M, FM_C, MM_N, "", ""},
{ 0, "cursor.bdf", "cursor", 1, 0, BM_T, FM_C, MM_C, "0-223>32", "f" },
{ 0, "cursor.bdf", "cursor", 1, 0, BM_T, FM_C, MM_C, "0-80>32", "r" },
{ 0, "micro.bdf", "micro", 1, 0, BM_T|BM_M, FM_C, MM_R|MM_N, "", "" }, /* micro does not have the full set */

View File

@ -2,11 +2,15 @@
# Reference
These fonts are part of u8glib.
Created or contributed fonts to u8glib and u8g2.
# Copyright
Public domain, created by the author of u8glib and u8g2.
u8glib_4, m2icon_5, m2icon_5, m2icon_9: Public domain, created by the author of u8glib and u8g2.
freedoomr10r: Contributed to u8glib, ported to u8g2. Copyright: Public domain.
freedoomr25n: Contributed to u8glib, ported to u8g2. Copyright: Feel free to do whatever you want with it... this font is Free in all human and lawful senses.
# Font Details