• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

TFT Text Sizes

Wp100

Well-Known Member
Hi,

Using a 320x240 TFT with the Adafruit libraries, but the standard SetText sizes are rather wide apart and to produce a neat looking display, we really need something between the SetText sizes of 2 and 3.

Does anyone know of an existing way to produce a Size of around 2.5 or of a free Font that has a Point size small enough ?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
The set sizes are effectively just a single fixed font, and simply doubled up each time there's an increase in text size - hence their low quality as they get larger. Basically it's a simple solution, and economical on memory and program space - if you try and store larger fonts, or different fonts for each size, you soon start reaching memory limitations.

Have a read here:

 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I write my own char print... You either store font widths in an array ( some chars are wider than others ) or strip out the un-needed.

Ie.. a 12 x 16 font will probably cover 10 pixels max but the smaller bits ie. points and comma's only need 3 at most.

Some fonts come with a char width array attached..
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I actually misread your post... I thought you were concerned more for distance between characters

Looking at drawchar() it either puts a pixel or fills a square, so it doesn't look like you get in betweenies… It doubles the size so 1 pixel or 2x2 (4) pixels or 3x3 (9) pixels etc...

The font is 5x7 so you could get the 3 x 7 font from the KS0108 and rotate it to suit... ( but the font is a bit poo... )
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member

EE World Online Articles

Loading
Top