Hi There,
I new here and I'm sorry if my question is to basic to you all.
I'm trying to create an interface using 8048S070 LCD and it works very well, by the way.
I would like to use the font #7 from the Annex library.
It is possíble to use this font with this command below?
GUI.Textline(x, y, width, height, "text" [,font] [,color_text] [,color_back] [,color_frame] [,alignment] [,margin] )
Where can I find the possible options for each one of this parameters?
Thanks you all!
Abraços,
Rogerio
TFT and VGA Fonts
-
- Posts: 6
- Joined: Sun Feb 25, 2024 6:18 pm
-
- Posts: 345
- Joined: Tue Jun 21, 2022 2:17 pm
- Location: South coast UK
- Has thanked: 183 times
- Been thanked: 112 times
Re: TFT and VGA Fonts
You can only use fonts 10,11,12 & 13
They can be loaded using a line like this.
tft.loadfont "/fonts/FreeSans12pt7b.bin", 10
It is possible to create your own with this utility
[Local Link Removed for Guests]
To help you on your way, here are some that cicciocb has already done, plus a few of my own.
You might find the font OPEN_24_DisplaySt18pt7.bin close to what you want.
They can be loaded using a line like this.
tft.loadfont "/fonts/FreeSans12pt7b.bin", 10
It is possible to create your own with this utility
[Local Link Removed for Guests]
To help you on your way, here are some that cicciocb has already done, plus a few of my own.
You might find the font OPEN_24_DisplaySt18pt7.bin close to what you want.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 345
- Joined: Tue Jun 21, 2022 2:17 pm
- Location: South coast UK
- Has thanked: 183 times
- Been thanked: 112 times
Re: TFT and VGA Fonts
The font looks like this:-
It should be quite easy to edit the zero to look like 7-segment.You do not have the required permissions to view the files attached to this post.
-
- Posts: 6
- Joined: Sun Feb 25, 2024 6:18 pm
Re: TFT and VGA Fonts
Olá @BeanieBots,
Thanks a lot for the fonts file. It's perfect to me.
But I'm stragling to figure out the options for the other parameters in the command line like "color_back" or "color_frame":
Txt1 =GUI.Textline(x, y, width, height, "text" [,font] [,color_text] [,color_back] [,color_frame] [,alignment] [,margin] )
There is any reference to those other parameters options? I searched at the forum but I was not able to find it.
Thanks again for the assistance.
Have a nice weekend.
Abraço,
Rogério
Thanks a lot for the fonts file. It's perfect to me.
But I'm stragling to figure out the options for the other parameters in the command line like "color_back" or "color_frame":
Txt1 =GUI.Textline(x, y, width, height, "text" [,font] [,color_text] [,color_back] [,color_frame] [,alignment] [,margin] )
There is any reference to those other parameters options? I searched at the forum but I was not able to find it.
Thanks again for the assistance.
Have a nice weekend.
Abraço,
Rogério
-
- Posts: 6
- Joined: Sun Feb 25, 2024 6:18 pm
Re: TFT and VGA Fonts
I figured out the color names (I was trying for numbers) - white, black, yellow, etc.
There is any "transparent" option to put a text over the background image without borders or black backgorund as for the vgagui.textline command?
Abraços,
Rogerio
There is any "transparent" option to put a text over the background image without borders or black backgorund as for the vgagui.textline command?
Abraços,
Rogerio
-
- Posts: 345
- Joined: Tue Jun 21, 2022 2:17 pm
- Location: South coast UK
- Has thanked: 183 times
- Been thanked: 112 times
Re: TFT and VGA Fonts
Glad you figured it out.
A lot of the vga stuff is still experimental and not all is fully documented yet.
You can find help for VGA commands by trying the help for just GUI objects. (eg GUI.TEXTLINE)
[Local Link Removed for Guests]
The parameter names describe well what they do. Anything enclosed in [ ] brackets is optional.
For colours, I prefer to use tft.rgb(R,G,B) so that you can specify the colour using 0-255 for each of R,G & B
The colour names are good but I can never remember them all for any other than fully saturated colours.
I don't think any of the GUI objects have a transparent property. I use vga.text.draw.
A lot of the vga stuff is still experimental and not all is fully documented yet.
You can find help for VGA commands by trying the help for just GUI objects. (eg GUI.TEXTLINE)
[Local Link Removed for Guests]
The parameter names describe well what they do. Anything enclosed in [ ] brackets is optional.
For colours, I prefer to use tft.rgb(R,G,B) so that you can specify the colour using 0-255 for each of R,G & B
The colour names are good but I can never remember them all for any other than fully saturated colours.
I don't think any of the GUI objects have a transparent property. I use vga.text.draw.