2021-01-04 02:53 AM
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
But in application - "????"
How to fix?
Solved! Go to Solution.
2021-01-05 04:47 AM
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.
/Romain
2021-01-04 04:39 AM
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
2021-01-04 04:47 AM
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?
2021-01-04 06:56 PM
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
2021-01-04 10:52 PM
Typography04 -I use it for Chinese language.
Not works.... And first sign of it - no code size increase
2021-01-04 11:15 PM
Are you sure Verdana supports these characters ?
Usually when using CKJ characters you must have a font supporting these characters.
/Alexandre
2021-01-04 11:28 PM
OK, give me example of font, supporting chinese characters.
2021-01-04 11:47 PM
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
2021-01-05 01:45 AM
Hmm...
I set range in Typography_04
I Install font "Microsoft JhengHei"
I set Typography_04 to China language
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
Do you see a breakpoint? At this time text is in LangTextBuffer
Look at the LangTextBuffer
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?
2021-01-05 02:38 AM
"Next time, please ask more politely."
Sorry. My English is bad. May be I don't know subtleties of the language...