Skip to main content
Paulo Rego
Associate II
January 16, 2024
Solved

touchgfx print Unicode para o caractere "♂" 0x2642

  • January 16, 2024
  • 1 reply
  • 1117 views

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.
Best answer by JTP1

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

1 reply

JTP1Best answer
Graduate II
January 17, 2024

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
January 17, 2024

Hi Br JTP,

helped a lot!

the problem was in the font.

thank you very much

Rego