0

GFX library font with only numbers
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

GFX library font with only numbers

by rvdokkum on Mon Feb 04, 2019 3:27 pm

Would it be possible to make a font file for the GFX library that only contains the number characters 0 to 9.
I like to create a 70 point font file with only 10 number characters to save memory.

http://oleddisplay.squix.ch/#/home

What are the rules when deleting characters not needed?

I like to use the font “Roboto mono”

Hope this is possible

Greets from Amsterdam / The Netherlands

Remko van Dokkum
User avatar
rvdokkum
 
Posts: 24
Joined: Fri May 16, 2008 12:46 pm
Location: Amsterdam - The Netherlands

Re: GFX library font with only numbers

by jim_lee on Tue Feb 05, 2019 8:35 pm

Save the characters full size as a .bmp file. Put it on an SD drive and blit them to the screen as needed?

It's one way to approach the problem. You can do it using very little RAM as well.

-jim lee

jim_lee
 
Posts: 456
Joined: Thu May 24, 2012 8:24 pm

Re: GFX library font with only numbers

by rvdokkum on Wed Feb 06, 2019 3:34 am

Hi Jim Lee

Thanks for your reply.
Using bitmaps would certainly be the best solution RAM wise.

I found my solution using the online font converter :

http://oleddisplay.squix.ch/#/home

Erasing all characters not needed and leaving only the number characters using online font editor :

https://tchapi.github.io/Adafruit-GFX-Font-Customiser/

result :
https://www.youtube.com/watch?v=q7F2Pvf1IFY

Greets from Amsterdam / The Netherlands

Remko van Dokkum
User avatar
rvdokkum
 
Posts: 24
Joined: Fri May 16, 2008 12:46 pm
Location: Amsterdam - The Netherlands

Please be positive and constructive with your questions and comments.