2019-06-11 06:47 AM
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
Solved! Go to Solution.
2019-06-12 01:05 AM
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
2019-06-12 01:05 AM
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
2019-06-12 02:07 AM
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
2019-06-13 01:16 AM
Also, are you sure that you've told TouchGFX to switch to the proper language?
/Martin
2019-06-13 04:16 AM
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
2019-06-13 04:43 AM
Did you check your generated files for that font to see if the glyphs (unicodes) you expect are actually generated?
/Martin
2019-06-13 05:54 AM
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
2019-06-14 01:59 AM
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
2019-06-17 05:31 AM
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?
2019-06-17 05:50 AM
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