Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:48 16 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 7 segment number font

     Page 1 of 2    
Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 05:45pm 20 Feb 2016
Copy link to clipboard 
Print this post

I am using the seven segment number font from here
Unfortunately the number 1 appears smaller than all the other numbers and does not look good. Is there anyone (maybe matherp) that could look at the file and make the 1 slightly larger.
Paul

edit. the 1 is also printed with the two right side segments which leaves a space between it and the previous number is it possible to move it to a mid position
the number 4 is also smaller
Hope this is not too much to ask.Edited by palcal 2016-02-22
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 05:55pm 20 Feb 2016
Copy link to clipboard 
Print this post

I see what you are talking about, but even though 1 and 4 are slightly smaller, this is correct for the 7-segment font in question - look at the layout of the unlit segments with respect to numbers 1 and 4.

'segment18_XXL' font has more uniformly sized digits - further down the same page.

That, or any of the 16-segment fonts......
Smoke makes things work. When the smoke gets out, it stops!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 05:59pm 20 Feb 2016
Copy link to clipboard 
Print this post

I realise that but when the top segment is on the width of the segment makes that number larger. I also tried the 16 segment font but like the 7 segment one much better.
Paul
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 07:44pm 20 Feb 2016
Copy link to clipboard 
Print this post

Try replace the data for the 1 with this and see what it looks like:

0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x60,0x00,
0x00,0x00,0xF0,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x00,0x78,0x00,
0x00,0x00,0x18,0x00,
0x00,0x00,0x08,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x00,
0x00,0x00,0x78,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x01,0xF8,0x00,
0x00,0x00,0xF0,0x00,
0x00,0x00,0x60,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00, // 1

Visit Vegipete's *Mite Library for cool programs.
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 08:25pm 20 Feb 2016
Copy link to clipboard 
Print this post

Looking at the code for the font, I don't know what code is for the 1. The code is not commented.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 08:41pm 20 Feb 2016
Copy link to clipboard 
Print this post

In the original code, each character is on one line. The comments are waaaaaaay over to the right. So replace the second data line with the stuff I posted above. You can edit what I posted back to just one line if you prefer. I just didn't want to post a code block that was some 1000+ characters wide.
Visit Vegipete's *Mite Library for cool programs.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6270
Posted: 08:46pm 20 Feb 2016
Copy link to clipboard 
Print this post

I understand what you are asking for.
There are some 7 segment displays that use more of the corner.

I have started on a program to enable fonts to be tweaked (or created from scratch.

The image on the right is from SevenSegNumFont.c and the image on the left is a modified one.



Is that likely to be sufficient (while still complying with the seven segment purists) or would you like more tweaking.

I should be able to give you a modified font in a day or two. The full program will be a bit longer...

Jim


VK7JH
MMedit
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 08:54pm 20 Feb 2016
Copy link to clipboard 
Print this post

Thanks Jim that's getting there,can you retain the pyramid shape on top and bottom and fill in the middle a bit, also can you align the 1 in the centre of the grid.
The four also needs attention.
Your program sounds good hope it's not too far away.
Paul
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 08:56pm 20 Feb 2016
Copy link to clipboard 
Print this post

Thanks Vegipete I will give it a try.
Paul
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 09:04pm 20 Feb 2016
Copy link to clipboard 
Print this post

@ Vegipete

  Quote  In the original code, each character is on one line. The comments are waaaaaaay over to the right.


I don't see what you mean This is the code I have

SevenSegNumFont.bas
' Font type : Numeric (10 characters)
' Font size : 32x50 pixels
' Memory usage : 2004 bytes
' Font downloaded from: http://www.rinkydinkelectronics.com/r_fonts.php
DefineFont #8
0A303220 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF0C
F801001E F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F 7800003E 18000038
08000020 00000000 00000020 18000038 7800003E F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F000001E 60FEFF0C 00FFFF01 80FFFF03 00FFFF01
00FEFF00 00000000 00000000 00000000 00000000 00000000 00000000 00000000
60000000 F0000000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
78000000 18000000 08000000 00000000 00000000 18000000 78000000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F0000000 60000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00FEFF00
00FFFF01 80FFFF03 60FFFF01 F0FEFF00 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 78000000 18FEFF01 88FFFF03 E0FFFF0F C0FFFF27 00FFFF39
0000003E 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F
0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000001E
00FEFF0C 00FFFF01 80FFFF03 00FFFF01 00FEFF00 00000000 00000000 00000000
00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF00 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 78000000 18FEFF01 88FFFF03 E0FFFF0F
C0FFFF07 18FFFF01 78000000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F0000000 60FEFF00 00FFFF01 80FFFF03 00FFFF01 00FEFF00 00000000
00000000 00000000 00000000 00000000 00000000 00000000 60000000 F000000C
F801001E F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F 7800003E 18FEFF39
88FFFF23 E0FFFF0F C0FFFF07 18FFFF01 78000000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F0000000 60000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00FEFF00 00FFFF01 80FFFF03
00FFFF01 00FEFF0C 0000001E 0000003F 0000003F 0000003F 0000003F 0000003F
0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F
0000003E 00FEFF39 80FFFF23 E0FFFF0F C0FFFF07 18FFFF01 78000000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F0000000 60FEFF00 00FFFF01
80FFFF03 00FFFF01 00FEFF00 00000000 00000000 00000000 00000000 00FEFF00
00FFFF01 80FFFF03 00FFFF01 00FEFF0C 0000001E 0000003F 0000003F 0000003F
0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F 0000003F
0000003F 0000003F 0000003E 00FEFF39 80FFFF23 E0FFFF0F C0FFFF27 18FFFF39
7800003E F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F F801003F F000001E
60FEFF0C 00FFFF01 80FFFF03 00FFFF01 00FEFF00 00000000 00000000 00000000
00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF00 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 78000000 18000000 08000000 00000000
00000000 18000000 78000000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F0000000 60000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF0C
F801001E F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F 7800003E 18FEFF39
88FFFF23 E0FFFF0F C0FFFF27 18FFFF39 7800003E F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F000001E 60FEFF0C 00FFFF01 80FFFF03 00FFFF01
00FEFF00 00000000 00000000 00000000 00000000 00FEFF00 00FFFF01 80FFFF03
60FFFF01 F0FEFF0C F801001E F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
7800003E 18FEFF39 88FFFF23 E0FFFF0F C0FFFF07 18FFFF01 78000000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F0000000 60FEFF00 00FFFF01
80FFFF03 00FFFF01 00FEFF00 00000000 00000000
End DefineFont
Edited by palcal 2016-02-22
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 09:12pm 20 Feb 2016
Copy link to clipboard 
Print this post

@ Pete & Jim

Sorry I should have mentioned I am using the SevenSeg_XXXL_Num from the numeric fonts down at the bottom of the list.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6270
Posted: 09:36pm 20 Feb 2016
Copy link to clipboard 
Print this post

The code you printed is the converted 'SevenSegNumFont'
The 'SevenSeg_XXXL_Num' font is much larger.
I suggest you look at 'SixteenSegment64x96Num' as it's much closer to the style you are asking for and close to the size of the XXXL font.

All of the fonts from www.rinkydinkelectronics.com/r_fonts.php have to be converted to umite BAS format.

Once my program is finished, you will be able to play with them all.

Jim
VK7JH
MMedit
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 10:29pm 20 Feb 2016
Copy link to clipboard 
Print this post

OK Jim looks like I will have to wait for your program. I did notice that the fonts from rinkydink were in .c and did not know they had to be converted to .bas
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10251
Posted: 10:32pm 20 Feb 2016
Copy link to clipboard 
Print this post

Paul

If you look in the full download of 5.1 from Geoff there is a program he has already written for compiling the font files into Basic. So just edit the source, run Geoff's program and you have the new font Basic file

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 10:59pm 20 Feb 2016
Copy link to clipboard 
Print this post

Thanks Matherp will do.
Paul
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 11:08pm 20 Feb 2016
Copy link to clipboard 
Print this post

Tried running UTFTconv.exe but I get an error message that it is not a valid Win32 application.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 06:22am 21 Feb 2016
Copy link to clipboard 
Print this post

  palcal said   @ Vegipete

  Quote  In the original code, each character is on one line. The comments are waaaaaaay over to the right.


I don't see what you mean This is the code I have

SevenSegNumFont.bas
' Font type : Numeric (10 characters)
' Font size : 32x50 pixels
' Memory usage : 2004 bytes
' Font downloaded from: http://www.rinkydinkelectronics.com/r_fonts.php
DefineFont #8
0A303220 00000000 00000000 00FEFF00 00FFFF01 80FFFF03 60FFFF01 F0FEFF0C
F801001E F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F 7800003E 18000038
08000020 00000000 00000020 18000038 7800003E F801003F F801003F F801003F
F801003F F801003F F801003F F801003F F801003F F801003F F801003F F801003F
F801003F F801003F F801003F F000001E 60FEFF0C 00FFFF01 80FFFF03 00FFFF01
00FEFF00 00000000 00000000 00000000 00000000 00000000 00000000 00000000
60000000 F0000000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
78000000 18000000 08000000 00000000 00000000 18000000 78000000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000 F8010000
F8010000 F8010000 F8010000 F8010000 F8010000 F0000000 60000000 00000000
[SNIP]
End DefineFont

How did you get this? When I click on the download links at Rinkydink, I get C source code that looks like this:
// SevenSegNumFont.c
// Font type : Numeric (10 characters)
// Font size : 32x50 pixels
// Memory usage : 2004 bytes

#if defined(__AVR__)
#include <avr/pgmspace.h>
#define fontdatatype const uint8_t
#elif defined(__PIC32MX__)
#define PROGMEM
#define fontdatatype const unsigned char
#elif defined(__arm__)
#define PROGMEM
#define fontdatatype const unsigned char
#endif

fontdatatype SevenSegNumFont[2004] PROGMEM={
0x20,0x32,0x30,0x0A,
0x00,[SNIP],0x00, // 0
0x00,[SNIP],0x00, // 1
0x00,[SNIP],0x00, // 2
0x00,[SNIP],0x00, // 3
0x00,[SNIP],0x00, // 4
0x00,[SNIP],0x00, // 5
0x00,[SNIP],0x00, // 6
0x00,[SNIP],0x00, // 7
0x00,[SNIP],0x00, // 8
0x00,[SNIP],0x00, // 9
};

(Each data line is 200 bytes wide, I snipped out 198 values for brevity.)

Can you post exactly which font you want modified? Both "SevenSegNumFont", 32x50 pixels, #2 from the top, and "SevenSeg_XXXL_Num", 64x100, #9 from the bottom, have been mentioned, plus you pasted code for the smaller font.

Visit Vegipete's *Mite Library for cool programs.
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 11:18am 21 Feb 2016
Copy link to clipboard 
Print this post

Sorry Pete I got rather mixed up. The font I was actually using was the one from Geoff's V5.1 download. I was unaware about converting the fonts from .C , should have read the instructions first instead of last.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1989
Posted: 01:30pm 21 Feb 2016
Copy link to clipboard 
Print this post

I have converted some fonts(switched to a 64 bit machine). These are some pics. not very clear though. As you can see by the time,temperature and humidity I live in the tropics in North Qld.




SixteenSegment 64x96




SixteenSegment 48x72


Calibribold.


SevenSegNumFont


SevenSegNumFont small 4 and 1


Calibribold colours reversed by touch screen
The screen can also be dimmed by touch for night time.
I have settled on Calibribold if my Grand Daughter agrees, the clock is for her
It is GPS by the way, with a DHT22 temp/humidity sensor.
Paul
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:14am 22 Feb 2016
Copy link to clipboard 
Print this post

That looks great Paul - I like the SevenSegNumFont too. The GPO wall plate mounting idea works pretty well too (who was it did another one six months or so ago?) I was at Master's hardware here last weekend and they've got a big range of GPO wall plates that include several fancy modern looking designs, much more so than the standard white Bunnings HPM-type ones. Some are polished or brushed metal, some specially edged etc. - they'd make good mounting options too.

Are you going to release your code, and also how are you going to power it - wall wart?

Greg
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025