Skip to main content
Paulo Rego
Associate II
Jan 16, 2024 11:00 PM UTC
Solved

touchgfx print Unicode para o caractere "♂" 0x2642

Hello everyone,
I spend hours trying to print the male and female ♂ ♀ symbol on the screen, without success.

I tested this code and it works perfectly, when I change the hex to the desired symbol does it print "?"

 Screen1ViewBase::setupScreen();

 Unicode::UnicodeChar buf[2] = {0x2082, 0};
 Unicode::strncpy(textArea1Buffer, buf, 5); 
 textArea1.invalidate();

any tips please

Regards,

Rego

This topic has been closed for replies.
JTP1Best answer
Graduate II
Jan 17, 2024 6:23 AM UTC

Hello

First, you must list these characters in Typographies -> Wildcard ranges, for example 0x00-0xff,0x2640,0x2642

And then you must select font which has these symbols, default font verdana does not include these two, but for example arial does.

Btw, symbol 0x2082 is some small number 2.

Hope this helps

Br JTP

2 replies

JTP1Best answer
Graduate II
Jan 17, 2024 6:23 AM UTC

Hello

First, you must list these characters in Typographies -> Wildcard ranges, for example 0x00-0xff,0x2640,0x2642

And then you must select font which has these symbols, default font verdana does not include these two, but for example arial does.

Btw, symbol 0x2082 is some small number 2.

Hope this helps

Br JTP

Paulo Rego
Associate II
Jan 17, 2024 10:22 PM UTC

Hi Br JTP,

helped a lot!

the problem was in the font.

thank you very much

Rego