Pages: [1]   Go Down
Author Topic: Font size options using UTFT library  (Read 3503 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am currently working on a project in which I will be using the 128x128 display from NKCelectronics. I am using the UTFT library to control it. I am in need of a very large font that will take up a large portion of the screen (to show current MPH). The only font options I have seen are SmallFont and BigFont neither of which will do what I am looking for. Is there a way to make my own font or utilize a much larger font? I have been scouring Google for options and could not find any (maybe I am not looking in the right places?).

I hope someone else has been down this road and can give be some guidance.

Thanks in advance.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 480
Posts: 18732
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A simple approach might be to find a font you like, render all 10 digits (0 to 9) as small bitmapped files, and write a little utility to read those files in and convert them into a bitmap ... that is a C table ... (one per digit) which you simply display in the correct order.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's not a bad idea Nick. Do you think this is something that can display quickly and change quickly? I plan to update the speed shown pretty rapidly (maybe twice per second?). I will start testing with this now.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 480
Posts: 18732
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe. Say you have a font of 32 x 32 pixels. That would be 1024 pixels, which would take 128 bytes each if it was monochrome. Sending 3 x 128 bytes might involve a bit of flicker, especially if it is colour. A bit depends on whether the display itself imposes delays, some do.
Logged


Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a way to make my own font or utilize a much larger font?

How about taking a quick look at my website?
There are some ready-made fonts up to 64x100 pixels here: http://www.henningkarlsen.com/electronics/r_fonts.php
You can make your own fonts here: http://www.henningkarlsen.com/electronics/t_make_font_file.php

/Henning
Logged

Pages: [1]   Go Up
Jump to: