|
Post by brunovr on Oct 30, 2015 12:45:14 GMT -8
Hi, How can i write a very big font number in a display (100x50 or heighter) ?
Sure that i must use this passage :
1- create every character (1.png 2.png...0.png , . ) ok 2- create an gd2asset ok 3- declare in font_asset.h the font ?
#define INFOFONT_HANDLE 11 #define INFOFONT_WIDTH 12 #define INFOFONT_HEIGHT 19 #define INFOFONT_CELLS 96
static const shape_t INFOFONT_SHAPE = {11, 12, 19, 0};
4 use the font
GD.cmd_text(200, 136, INFOFONT_HANDLE, score);
I'm not been able to make a right font_asset.h and the right width and height, cell parameters.....
thank's
PS where can i buy >50 gameduino2 in Europe ? whetheroot haven't display thank's
|
|
|
Post by jamesbowman on Oct 30, 2015 15:27:20 GMT -8
If you have the font in TTF then you can use something like: gd2asset ... myfont.ttf,size=100,format=L1 This thread covers using TTFs: gameduino2.proboards.com/thread/189/custom-fontfor a very large font you should probably use "L1" format to save graphics RAM.
|
|
|
Post by brunovr on Oct 31, 2015 0:22:01 GMT -8
..Ok james, i've undestand. Now, like last time, there is an error : The _imagingft C module is not installed... i've seen : gameduino2.proboards.com/thread/189/custom-fonti have reinstall python, easy_install, PIl-1.1.7.win32-py2.7.exe but don't work is strange, if i use an image (example : python gd2asset -o myasset.h smile.jpg ) works fine! if i use a truetype comic.ttf give me the error... what is it? ARRGG.. 4 hours lost... no resolve! i think that the problem is that PIL is not compile with truetype library... HELP
|
|
|
Post by jamesbowman on Oct 31, 2015 13:15:58 GMT -8
|
|
|
Post by brunovr on Nov 1, 2015 2:00:06 GMT -8
OK JAMES !!!!
Work's Fine !!!!
Thank's a lot !!!!
|
|