0

Hi I am working in an embedded application for microcontrollers for showing data on a display. The microcontroller is STM32 and the graphic tool I am using is called touch gfx. I want to show some texts in cyrillic and hebrew language. When i write the text in the gui of touch gfx i correctly see the text on the display

enter image description here

But when i try to run the following code for passing some text from code stm32cubeide

I got some question marks shown on the display ..

This is the code that is causing the problem for the russian and hebrew text

textArea4.setColor(touchgfx::Color::getColorFrom24BitRGB(236, 209, 18));//extra time?
            Unicode::strncpy(textArea4Buffer, parArea4[tipolingua][5], Unicode::strlen(parArea4[tipolingua][5])+1);
            textArea4.invalidate();

const char* parArea4[5][6] = { { "Preheating", "Ready", " ", "Baking", "Extra time", "Extra time?" }, { "Preriscaldo", "Pronto", " ", "Cottura", "Extra time", "Extra time?" }, { "Prechauffage", "Pret", " ", "Cuisson", "Extra time", "Extra time?" }, { "Предварительный нагрев", "Готовый", " ", "Выпечка", "дополнительное время", "дополнительное время?" }, { "חימום מוקדם", "מוּכָן", " ", "אֲפִיָה", "זמן נוסף", "זמן נוסף" } };

Any idea about how to fix it ?

Thanks a lot

enomis
  • 27
  • 4
  • TouchGFX (to save memory) only copies characters from fonts that are actually used by your text resources. If you want to display other things (e.g. in a wildcard field) you need to ensure that all possible characters that could appear are present in the Wildcard Characters or Wildcard Ranges fields. These are in the Typographies tab of the Texts window. – pmacfarlane Apr 25 '23 at 13:23
  • Hi @pmacfarlane.. so I have to add the cyrillic and hebrew characters here? – enomis Apr 26 '23 at 08:16
  • I believe so. I've never done a multi-lingual TouchGFX app, but I had the same issue with question marks appearing. Adding the missing characters to the wildcard option was the solution. – pmacfarlane Apr 26 '23 at 10:47
  • Hi @pmacfarlane.. I made it a first attempt trying to show this word.. Предварительный .. but nothing to do.. I have added the characters of this word at the wildcard characters but nothing to do.. I don't know how to change the fileld wildcards range... any ideas ? Thanks a lot – enomis Apr 26 '23 at 11:38
  • The Wildcard Range would be used like this, for example: `A-Z,a-z,0-9` to include all uppercase, lowercase, and numbers. Maybe you can do something similar for Russian or Hebrew. – pmacfarlane Apr 26 '23 at 12:12
  • Hi @pmacfarlane.. I have tried but you suggested but without success... – enomis Apr 26 '23 at 14:25
  • 1
    The only other thing I could suggest would be to make a text box somewhere, put in all the missing characters in the text fields for each language, and untick the Visible box. This should pull in the missing characters, but you'll never see the mystery box. – pmacfarlane Apr 26 '23 at 14:50

0 Answers0