Page 4 of 11

Re: ST7789 display

Posted: Wed Nov 02, 2022 12:13 pm
by jollybv
Hi Guys

I have not been working on this project for some time but now I have a little time and would like to sort out the degree symbol. As you can see it in the previous post that is giving me 4 lines instead of the degree symbol. I am using the Default 8 (legacy font) how would I be able to sort this out?

Re: ST7789 display

Posted: Wed Nov 02, 2022 1:08 pm
by BenR
Hello,

I'm looking for you now and the default font should be printing out the degree character for any of the following ASCII character values 128, 167, 248.

Can you check what value you're sending for the degree symbol. If you know which character in the string it is then you can do something like PrintNumber( string[charidx] ) to know for sure what the decimal ASCII value is.

Re: ST7789 display

Posted: Wed Nov 02, 2022 2:28 pm
by jollybv
Hi Ben

What I'm doing is typing Alt 167 ยบ which is the degrees it used to work then I did a component update and it stopped
degree.JPG
degree.JPG (21.27 KiB) Viewed 5876 times

Re: ST7789 display

Posted: Wed Nov 02, 2022 2:33 pm
by BenR
Hello,

Alt 167 should give you the decimal number 167 but I found that actually this is not guarenteed. It's worth seeing what number the compiled C prints out using the code I suggested as that might give me a pointer to investigate further.

Re: ST7789 display

Posted: Wed Nov 02, 2022 3:10 pm
by jollybv
Hi Ben

Im not sure what you need me to do PrintNumber( string[charidx] ) I've tried the print number but all that dose is print the 167 and not the character

Re: ST7789 display

Posted: Wed Nov 02, 2022 3:20 pm
by BenR
Ok so it is confirmed it's 167 being used. Hmm let me look again.

Re: ST7789 display

Posted: Wed Nov 02, 2022 3:47 pm
by BenR
What happens is very strange.

If you type alt 167 then the number ends up as 186 when you print it out using PrintNumber
alt 248 ends up as 176
Test.jpg
Test.jpg (49.32 KiB) Viewed 5872 times

Anyway I've now supported both of these numbers too, maybe something to do with ASCII to utf8 conversion?

This is now working in simulation

Please can you have a go and let us know how you get on. Latest versiion is now on the update system.

Re: ST7789 display

Posted: Wed Nov 02, 2022 4:18 pm
by jollybv
Thanks Ben

It is working Like a dream

Re: ST7789 display

Posted: Mon Feb 20, 2023 12:38 pm
by jan.didden
Can I tag onto this thread as my issue is similar. When I want to increase the font size to improve distant reading, I only see a FontEnlarger icon (ST7789 display). That makes the resulting number larger but extremely blocky, see attached. Surely there must be an intelligent way to increase the font size without the blockyness. How do I do that? I tried different fonts (from fontnumber 0 to 31) but there doesn't seem a difference between the choices.

Jan

Re: ST7789 display

Posted: Mon Feb 20, 2023 1:00 pm
by mnfisher
It is a trade off between memory and resolution....

An alternative might be to use bitmaps (just for the digits maybe) - I have some code that handles 1, 4, or 8 bit (256 colour) bitmaps that you might be able to use?

Martin