cancel
Showing results for 
Search instead for 
Did you mean: 

Chineese and corean only shows ???

Zui
Senior

I need some text in chineese and corean, for example i need to write 한국어 and 汉语 , i've added those letters in my Typographies, but still get only ???, what am i missing? another strange think is that i forgot to put greek character in my typography, but the word ελληνικά is displayed correcly...

btw, not sure if corean is supported, but chineese is, according to https://touchgfx.zendesk.com/hc/en-us/articles/205452881-Languages-and-Characters

Thanks.

Stefano

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi @Zui​,

"?" indicates that the glyph wasn't found at the specific unicode specified in the text sheet (Either by static text or wildcard or wildcard range). You can check your generated/fonts cpp files. They will have the particular unicode values as comments if they were generated.

Update: The typography that was used to generate glyphs did not reference a font with chinese characters, hence no glyph data for these could be generated. See posts below for hints on how to verify that particular glyphs were generated properly.

/Martin

View solution in original post

13 REPLIES 13
Martin KJELDSEN
Chief III

Hi @Zui​,

"?" indicates that the glyph wasn't found at the specific unicode specified in the text sheet (Either by static text or wildcard or wildcard range). You can check your generated/fonts cpp files. They will have the particular unicode values as comments if they were generated.

Update: The typography that was used to generate glyphs did not reference a font with chinese characters, hence no glyph data for these could be generated. See posts below for hints on how to verify that particular glyphs were generated properly.

/Martin

Martin KJELDSEN
Chief III

For instance, here is a simple generated font file for verdana, size 10, quality 4 bits per pixel:

#include <touchgfx/hal/Types.hpp>
 
FONT_LOCATION_FLASH_PRAGMA
KEEP extern const uint8_t unicodes_verdana_10_4bpp[] FONT_LOCATION_FLASH_ATTRIBUTE = {
// Unicode: [0x003F, ]
0xD2,0xDE,0x03,0x21,0x40,0x0C,0x00,0x30,0x0C,0x00,0xC1,0x05,0x00,0x4D,0x00,0x00,
0x0C,0x00,0x00,0x01,0x00,0x00,0x0F,0x00
};

0x003F is actually "?" :) So, this application has no texts and thus no glyphs generated, except for the fallback character "?".

/Martin

Martin KJELDSEN
Chief III

Also, are you sure that you've told TouchGFX to switch to the proper language?

/Martin

Zui
Senior

i haven't switch language, cause i just need the chineese textArea to show the word "chineese" in Chineese..., so i wrote in the text area 汉语, put 汉语 also on the used typography, but only ??? are shown

Martin KJELDSEN
Chief III

Did you check your generated files for that font to see if the glyphs (unicodes) you expect are actually generated?

/Martin

Martin KJELDSEN
Chief III

Also, what i was asking (not very clear) was ... do you have more than one language defined in your text sheet? If so, is chinese the default?

/Martin

Martin KJELDSEN
Chief III

To be more explicit: 汉 is 0x6C49 in UTF-16.

I would then, in my touchgfx application folder, check generated/Font_chinese_10_4bpp.cpp. And i would see something like the following:

#include <touchgfx/hal/Types.hpp>
 
FONT_LOCATION_FLASH_PRAGMA
KEEP extern const uint8_t unicodes_chinese_10_4bpp[] FONT_LOCATION_FLASH_ATTRIBUTE =
{
    // Unicode: [0x6C49, ]
    0xD2, 0xDE, 0x03, 0x21, 0x40, 0x0C, 0x00, 0x30, 0x0C, 0x00, 0xC1, 0x05, 0x00, 0x4D, 0x00, 
    0x00,  0x0C, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0F, 0x00
};

(The glyph data is not the real data for 0x6C49, it's just an example)

/Martin

i just checked (i kinda put aside this problem for other problems needed to be fixed,) and my fontName.cpp generates the unicode for ?,a,i,l,n,o,t when on designer i put 汉语, so how to make him genarates the crrect font?

If you've defined the glyph for a typography that is associated with a font file that contains those glyphs then, definitely, you should be seeing the glyph in the generated/ folder as i described.

Are you saying that's not the case? Please double check that you've associated the wildcards with the right font.

/Martin