2019-09-13 09:23 AM
Hello all,
we have a system up and running using TouchGFX. The user interface can be switched between german and english using a system menu of my user interface while running the application on the board.
Now we will show the system on an exhibition in Shanghai and would like to have chinese as an additional language.
I succeeded to create another language in TouchGFX Designer (vV. 4.10.0), translated some of the menu items into chinese using google translator (e.g. "System setup" = "系统设置" ) and extended the wild cards of my typographics to have characters 0x20-0xFEFF.
In the font source there are several characters beyond 0xFF created in the file, however on the system the text is not visible. It shows "??????" which is the fall back character.
I use the Windows Font Calibri in different sizes and in notepad the chinese signs are visible with this font so it should be possible to used it for chinese characters.
Did anyone manage to get chinese working using TouchGFX?
Any hints are very much appreciated!
Solved! Go to Solution.
2019-09-17 06:50 AM
Try this one. I've used it before. Try using something like a third party application to inspect your own fonts and check if you've provided the right ranges.
2019-09-15 11:41 PM
Hi,
We have lots of chinese customers that use this feature. Check your generated/fonts/src folder to see if the fontconverter actually found the glyphs in the font. The pixel data for the unicodes are in the generated .cpp files and there's a comment for each unicode.
/Martin
2019-09-16 07:24 AM
Hi Martin,
I have checked the generated font files and I found out that after character 0x2E17 the next character is 0xFB50. Chinese characters should be between 0x4000 and 0x9FFF. So chinese is missing!
What does influence the generation of the chinese characters?
Here is what I tried:
I succeeded to link the huge font files in my project in the external flash area.
I installed the chinese language set on my pc.
Tried to use Arial instead of Calibri. But still the same.
I deleted all existing font files from the "assets" folder so the designer generated the neccessary fonts again.
What else can I do to generate the chinese fonts files? Or can you generate one: Calibri - Bold, font sizes 27, 31 and 50 would help in the first place. Wildcard range: 0x20 - 0x9FFF.
We will fly to China on Thursday and would like to show it's possible to switch to chinese!
Any help is very much appreciated.
2019-09-17 06:45 AM
Martin, sorry to bother you again:
Another try which didn't work:
I added a chinese font "SimSun-ExtB" as additional typography. The font file placed in "assets\fonts" is 15000 kB large (calibri is only 1600 kB). This font file definitely holds the chinese characters.
But despite of this the generated font file only has Unicode character definitions from 0x20 to 0xFF. Nothing else. I defined 0x20 - 0xFFFF as Wildcard set and this is seen in UnicodeListsimsunb_0_30_4.txt.
BR Gaby
2019-09-17 06:50 AM
2019-09-17 06:51 AM
I'm leaving now but if you send me your project i will check it out later to see if i can figure out what's wrong.
/Martin
2019-09-17 08:10 AM
Hi Martin,
Thank you for your font!!!
TouchGFX now created the missing Unicode characters (0x4000-0x9FFF) with this font. The source file is 40197 kB!
I will try this on the system tomorrow, but I am quite confident that this will work now. Thank you very very much!
/Gaby
2019-09-17 11:32 AM
No problem, Gaby! Yeah, a full range is huge. 4.11.0 features dynamic fonts / glyph caching which means you can place this large file on external storage and cache individual glyphs to be presented on a view.
/Martin
2019-09-17 11:44 AM
You may want to use a smaller range of glyphs if you're just going to show a demo. Then you could also fit it in external flash. Since you don't have access to binary fonts / glyph caching yet, you can't place it anywhere else right now. Glyph caching was created with resource constrained devices in mind. But i guess when it comes to storing chinese fonts every device is constrained :)
/Martin
2019-09-18 12:01 PM
Hi Martin,
just wanted to let you know, that the chinese presentation is working now! Uff. Some characters still are presented as '?', but that is probably due to my slightly restricted character range. Actually I was hoping to get all characters shown, but as we will fly to China tomorrow I can't help it now... And I am wondering if Google did translate my text correctly anyway. Porbably we will get some smiling faces over there when I show them my chinese translations... :grinning_face:
Can you tell when 4.11. will be released?
Good evening for now. /Gaby