Continue to Site

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.

  • 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

Status
Not open for further replies.

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 ?
 
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:

 
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..
 
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... )
 
This may do what you need:
**broken link removed**

It can convert a truetype font to a bitmap, both pixel and character width data.

Try 12 point or 14 point source fonts for the type of size you need, at a guess?
 
This may do what you need:
**broken link removed**

It can convert a truetype font to a bitmap, both pixel and character width data.

Try 12 point or 14 point source fonts for the type of size you need, at a guess?
But be cautious… The print routine on the arduino will not deal with full colour... It only deals with mono fonts...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top