cancel
Showing results for 
Search instead for 
Did you mean: 

China texts

EEuge
Senior

Hello!

I have a typography, which contains this set of symbols "0-9,A-z,�?-�?,0x20-0x7F,0x401,0x451"

But I want to use China and Japan languages.

In TouchGFXDesigner all OK

0693W000006HOdPQAW.pngBut in application - "????"

How to fix?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

Can you try to add another text area where you just display the chinese text ? I tested on my side and was able to display without any issue with your font with the simulator and on a board I have. I put the text i wanted to display (我喜欢包�?) directly in the "Ressources" tab and did not have to put anything in the wildcard range. I believe the issue might come more from your code and what you are trying to display.

0693W000006HYYAQA4.png0693W000006HYaBQAW.png/Romain

View solution in original post

11 REPLIES 11
Romain DIELEMAN
ST Employee

Hi,

The ???? displayed correspond to the fallback characters set in the Typography tab in the Text View. This means that the glyphs of the characters you wish to display are not found. You need to set in the "Wildcard range" (or characters) the characters that the application will need.

You can have a look at how languages are handled in the code of the UI template "Demo 1".

/Romain

You dont undetstand my question.

I know how to add wildcard range.

But I dont know, how do it in chinese.

For English is "A-Z, a-z".

How it must be look in chinese?

Hello EEuge,

To add a range of Chinese characters, you need to add the range using the Unicode values from 0x4E00 to 0x9FFF for all Chinese characters.

Of course this range is very big and will probably not fit your memory so you should select only the ones you need.

Instead of writing a range, you can also enumerate the characters in the Wildcard characters field.

/Alexandre

0693W000006HUxVQAW.png 

Typography04 -I use it for Chinese language.

Not works.... And first sign of it - no code size increase

Are you sure Verdana supports these characters ?

Usually when using CKJ characters you must have a font supporting these characters.

/Alexandre

OK, give me example of font, supporting chinese characters.

Noto Sans CJK SC Black is one possibility.

You can find an example using this font in TouchGFX Designer in the Online Application section.

Next time, please ask more politely.

/Alexandre

Hmm...

I set range in Typography_04

I Install font "Microsoft JhengHei"

0693W000006HWTYQA4.pngI set Typography_04 to China language

0693W000006HWWRQA4.png 

Good!

I see ".cpp" files of fonts in my project

Compiled code size increased from 7MB to 11MB, I decide to put it to QSPI

THis text - 中文 . In Unicode it is "\u4e2d\u6587"

I try to output

0693W000006HWQiQAO.png 

Do you see a breakpoint? At this time text is in LangTextBuffer

Look at the LangTextBuffer

0693W000006HWT8QAO.png 

Two first symbols are correct.

But at text I see "??"

symbol 0x4E2D is present in code

 // Unicode: [0x4E2D, uni4E2D]
    0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0E,
    0x00, 0x00, 0x00, 0x00, 0xE4, 0xEE, 0xEE, 0xEE, 0xEF, 0xEE, 0xEE, 0xEE, 0x02, 0xC4, 0x22, 0x22,
    0x32, 0x2E, 0x22, 0x22, 0xE2, 0x02, 0xB4, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0xE0, 0x02, 0xB4,
    0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0xE0, 0x02, 0xB4, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0xE0,
    0x02, 0xB4, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0xE0, 0x02, 0xB4, 0x00, 0x00, 0x20, 0x0E, 0x00,
    0x00, 0xE0, 0x02, 0xF4, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x20,
    0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00,
    0x00, 0x00,

Whats Wrong?

"Next time, please ask more politely."

Sorry. My English is bad. May be I don't know subtleties of the language...