So confused on using TheDotFactory to create fonts for app... Please help.

I was able to successfully get the code posted in http://arduino.cc/forum/index.php/topic,50326.0.html to work on two 3216 displays, however the font included is only 8x8 ( I believe). I got a copy of TheDotFactory to try and make a 16pt font to fill the display, but I'm really confused on how to use it.

I've got the .c and .h files it creates, however I'm confused on how to use these in my sketch, since the fonts that i see used are font2.h, font3.h, etc. And this generates font.c for the data.

Could someone please help me figure out how to use TDF fonts in Arduino IDE to display on a Sure Electronics 3216 display?

Thanks in advance.

FlorinC has gotten large font to work on the open Source WiseClock3. Use his code as a reference.

Justin

Justin,

Thanks for the response. I had previously seen his code, but I don't understand how each character gets called.

In the code pasted, I see the message below:

    1. The Dot Factory (Home - Technology In The Arts - Emerging Science and Technology Trends)
  • This a good windows software for using fonts but bitmaps, too.
  • For using bitmaps/fonts select the tool icon, check "Flip X", "90°" at Flip/Rotate. "Width" at Fixed, "MsbFirst" if it wasn't.
  • You can import any bitmap.
  • Ppush Generate, replace the "const uint_8" " with "unsigned char PROGMEM" and call the bitmap by with its name.

So I did that. I used verdana 16pt font to generate all characters, and pasted that into my program (instead of using external files. A sample is below:

0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x70, 0x00, 0x00, /*  ###                     */
	0x3E, 0x00, 0x00, /*   #####                  */
	0x0F, 0x80, 0x00, /*     #####                */
	0x01, 0xE0, 0x00, /*        ####              */
	0x00, 0x78, 0x00, /*          ####            */
	0x00, 0x78, 0x00, /*          ####            */
	0x01, 0xE0, 0x00, /*        ####              */
	0x07, 0x80, 0x00, /*      ####                */
	0x1E, 0x00, 0x00, /*    ####                  */
	0x70, 0x00, 0x00, /*  ###                     */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x70, 0x00, 0x00, /*  ###                     */
	0x7C, 0x00, 0x00, /*  #####                   */
	0x1F, 0x00, 0x00, /*    #####                 */
	0x07, 0x80, 0x00, /*      ####                */
	0x01, 0xE0, 0x00, /*        ####              */
	0x00, 0x78, 0x00, /*          ####            */
	0x00, 0x1E, 0x00, /*            ####          */
	0x00, 0x07, 0x80, /*              ####        */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x7F, 0xFF, 0x80, /*  ################        */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */
	0x00, 0x00, 0x00, /*                          */

I pasted this in at the beginning:

unsigned char PROGMEM verdana16ptBitmaps[] =

, as instructed. I then went down to where text operations are performed, and changed the font name to the following:

// scrolltextxsize(y location, string ,  size as integer, colorname (RANDOMCOLOR for random color), name of the second color (instead of BLACK), name of the font array,  number of columns, number of rows, 'G' for Gimp or 'T' for The Dot Factory font arrays, delaytime in milliseconds) 

//scrolltextsizexcolor(4,"ON A CALL    ",1,RED, 0,my2font,8,8,'G',10); 
scrolltextsizexcolor(0,"ON A CALL    ",1,RED, 0,verdana16ptBitmaps,20,16,'T',10);

At the beginning of the code I also changed the variable for NUMCOLUMS to 20, which is what it looks like is referenced in TheDotFactory information:

// insert here the number of columns of your font files 
// the compiler will comment how large the number of columns
// should be
#define NCOLUMNS 20

I tried to compile it but I get the following error:

ht1632_kjus_1b_er.cpp: In function 'void loop()':
ht1632_kjus_1b_er:3311: error: cannot convert 'unsigned char*' to 'unsigned char ()[20]' for argument '6' to 'void scrolltextsizexcolor(int, char, char, byte, byte, unsigned char (*)[20], int, char, char, int)'

This is where I'm confused. First, do I need to include the descriptor lookup table? am i calling the font correctly? I'm missing something but I don't know what.

well I seemed to have figured it out on my own, sort of, but I don't know how to create new fonts that will work.

What I did, was screw around with enough settings, I finally tried changing the size integer. Everything else I tried resulted in garbage being sent to the LED displays, but the size value changed it.

I now have the following:

scrolltextsizexcolor(0,"ON A CALL    ",2,RED, 0,my2font,8,8,'G',0);

This results in it filling 15 of the 16 rows on the display.

If anyone can still help me figure out how to change fonts I would appreciate the assistance.