cancel
Showing results for 
Search instead for 
Did you mean: 

Did anyone manage to get Chinese characters using TouchGFX visible on an embedded system?

GS1
Senior III

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!

17 REPLIES 17

You don't have to put in a range only. You can mix and match ranges with individual characters. So just make sure to add the correct unicodes and they should be generated for you.

/Martin

Hi @GS@S​,

I am looking to move font files to external memories.

I wonder if you could share some tips ?

GS1
Senior III

I did not do soemthing special. TouchGFX locates it to external flash memory:

This is included in one of the font .cpp files:

FONT_GLYPH_LOCATION_FLASH_PRAGMA

KEEP extern const uint8_t unicodes_MSMHei_Bold_30_4bpp_14[] FONT_GLYPH_LOCATION_FLASH_ATTRIBUTE = {

   // Unicode: [0x7000]

   0x10, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0xDF,

And the corresponding FONT_GLYPH_LOCATION_FLASH_PRAGMA is defined in config.hpp as follows:

/** A macro for placing Font Glyph in memory. */

#define FONT_GLYPH_LOCATION_FLASH_PRAGMA LOCATION_PRAGMA("FontFlashSection")

/** A macro for placing Font Glyph attribute in memory. */

#define FONT_GLYPH_LOCATION_FLASH_ATTRIBUTE LOCATION_ATTRIBUTE("FontFlashSection")

/** A macro for placing Font table in memory. */

#define FONT_TABLE_LOCATION_FLASH_PRAGMA LOCATION_PRAGMA("FontFlashSection")

/** A macro for placing Font table attribute in memory. */

#define FONT_TABLE_LOCATION_FLASH_ATTRIBUTE LOCATION_ATTRIBUTE("FontFlashSection")

Thats all I guess. Did not care about it further

BR GS

ah ok,

Do you have experience in : Binary translations ?

https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/using-binary-translations

It fails to build due to missing definition of some variables.

GS1
Senior III

Sorry, I do not use this in my application.

Hi @gaubuali​ ,

Can you be more specific about your issues? I'll try to help you.

Hi Martin,

Yes. I am using Designer 4.16.0 to generate files.

My project works fine. After generating and recompiling, I got Compiler errors:

"EmptyLanguageIndices" and "EmptyLanguageTexts" are not found.

Hi,

I need a bit more to go on.

A project.

Some compiler logs.

Etc.

/Martin