2024-02-02 07:38 AM - edited 2024-02-03 03:15 AM
Hello,
I'm getting the wildcard character '?' displayed for 3x Japanese characters, ノ今速. All the other CJK characters in the texts are displayed fine, before and after these missing characters (so not a text field truncation).
I've checked that all these characters exist in the CJK font for the typography. I have defined the respective Unicode values 0x30CE, 0x4ECA, 0x901F in the wildcard ranges and pasted these characters into the wildcard characters for the typography. I have deleted and regenerated the generated folder, but there is no difference in the output. There are also no warnings during code generation that a character is not in the font.
The text translations specifying these characters are all defined as resources (not single use texts). They are displayed using
touchgfx::Unicode::UnicodeChar TXTBuffer[TXT_SIZE];
(void)Unicode::snprintf(TXTBuffer, TXT_SIZE, "%s", touchgfx::TypedText(T_RESOURCE_NAME.getText());
I've found they are displayed correctly using
Unicode::fromUTF8((const uint8_t*)"ノ今速", TXTBuffer, TXT_SIZE);
Why is this different? I'm still using TouchGFX 4.16.0.
Thanks.
Solved! Go to Solution.
2024-02-03 04:29 AM
I found and fixed the problem I was having - the text that snprintf was writing to was a different typography to the one defined in the resource. Adding the wildcard range to that typography instead of the one for the resource fixed it.
2024-02-03 04:29 AM
I found and fixed the problem I was having - the text that snprintf was writing to was a different typography to the one defined in the resource. Adding the wildcard range to that typography instead of the one for the resource fixed it.