Skip to main content
Ebun.1
Senior
April 26, 2021
Solved

Text is garbled

  • April 26, 2021
  • 3 replies
  • 1627 views

Thank you for helping.

There are 10 buttons.

I am changing the value of the text when I press the button.

10,20,30,40,50,60,70,80,90,100

There are 10 patterns of, but the text is as follows only in the case of 60 and 70.

? 0

Other than that, the numerical value is displayed normally.

The following code is written in the handler when the button is pressed.

dimmerValue = 60;

Unicode :: snprintf (textDimmerBuffer, TEXTCOUNTER_SIZE, "% d", dimmerValue);

textDimmer.invalidate ();

Why?

Thank you.

This topic has been closed for replies.
Best answer by Michael K

Make sure you have wildcard characters set up correctly for all the characters you want in all the fonts you wish to use, otherwise touchgfx won't generate the glyphs and will render them as question marks. See attached image, taken in the Texts->Typographies tab. If you are space constrained on your target, you'll need to be more selective about which characters you include, rather than 0x00-0xFF.

3 replies

Romain DIELEMAN
ST Employee
April 27, 2021

Hi,

Could you share your code ? What font are you using ?

/Romain

Michael K
Michael KBest answer
Senior III
April 28, 2021

Make sure you have wildcard characters set up correctly for all the characters you want in all the fonts you wish to use, otherwise touchgfx won't generate the glyphs and will render them as question marks. See attached image, taken in the Texts->Typographies tab. If you are space constrained on your target, you'll need to be more selective about which characters you include, rather than 0x00-0xFF.

Embedded UI/UX Consulting: cadenza.design
Ebun.1
Ebun.1Author
Senior
May 7, 2021

Hi Michael K, Romain Dieleman

It was displayed correctly by setting the Wildcard Ranges to 0x00-0xFF.

Thank you very much.

Romain DIELEMAN
ST Employee
May 7, 2021

Good to hear it works :thumbs_up:

/Romain

Ebun.1
Ebun.1Author
Senior
May 7, 2021

The font is Verdana.