Yet another Font GFX/RA8875 thread, help pls.

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
tomek
 
Posts: 73
Joined: Wed Jun 13, 2012 1:37 pm

Yet another Font GFX/RA8875 thread, help pls.

Post by tomek »

Hi! I'm running one of the RA8875 screens that use the GFX library core. From what I gather, the library doesn't use the internal font on the RA8875, but the glcdfont thingie.

So I want to add a set of larger characters, and extra large digits, without having to rely on the slightly blocky (though awesome) scaling function.

Other folks have asked this question before basically:
http://forums.adafruit.com/viewtopic.ph ... 80#p181080
http://forums.adafruit.com/viewtopic.php?f=47&t=27657

It sounds like it will be within my ability to take a font from an image processing program (probably gimp or paint.net) and convert it to the progmem form via the "Img2Code" tool on the adafruit git.

Then, I can use the drawbitmap function to print my special font. I have a couple questions

(1) Is the drawbitmap function a lot slower? I dont want to bog down everything too much. I dont really know how the functions differ, but I realize the drawcharacter business also uses "drawpixel" at its core.

(2) How do I make my hacked bitmap-font thing with a "clear" background? Will I have to program alternative backgrounds into my enlarged font? Or does a void/zero space in the progmem refer to "clear" instead of "white"? Hmm, maybe not the best posed question, so I can try to make sense of the gfx/RA8875 library a little more and come back to this.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Yet another Font GFX/RA8875 thread, help pls.

Post by adafruit_support_rick »

drawBitmap will be comparable in speed to drawChar.

Bitmaps are drawn "clear" - zero bits are are not rendered.

User avatar
tomek
 
Posts: 73
Joined: Wed Jun 13, 2012 1:37 pm

Re: Yet another Font GFX/RA8875 thread, help pls.

Post by tomek »

Thanks Rick! You rock, that really helps me. I was trying to read through the code stuff in the libraries but didn't know quite enough to know whether it would make a difference.

I'll make a function then to deal with my extrafonts (which are only 26 characters and 10 digits) by sending drawbitmap commands.

Thanks again.

User avatar
abilities
 
Posts: 13
Joined: Thu Sep 26, 2013 9:01 am

Re: Yet another Font GFX/RA8875 thread, help pls.

Post by abilities »

Hi Peeps,

Can anyone point me in the direction of how to make fonts for the GFX library. Step by Step instructions would be great!! I just need to make the fonts bigger.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Yet another Font GFX/RA8875 thread, help pls.

Post by adafruit_support_rick »

You want to use GLCD Font Creator:
http://www.mikroe.com/glcd-font-creator/

This will export a font file you can use in place of the existing glcdfont.c. Make sure that the definition of the font array matches the definition of the array in glcdfont.c.

You'll also have to modify the drawChar function in Adafruit_GFX.cpp to use the larger font. Currently, the function is hard-coded for a 5x7 font.

User avatar
abilities
 
Posts: 13
Joined: Thu Sep 26, 2013 9:01 am

Re: Yet another Font GFX/RA8875 thread, help pls.

Post by abilities »

Thanks Rick!

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”