Skip to main content
HPham.1590
Associate III
Sep 17, 2020 12:30 PM UTC
Solved

[ ToucgGFX ] Issue when display string in TextArea

Hello, I'm trying to display a random String in TextArea.

But when I call this function, there is too much ???? was displayed.

0693W000003RxaiQAC.png

Below is my code, anyone can tell me what's wrong?

Many thanks,

Hieu

	const char * test = "Hello World";
	Unicode::snprintf(RoomHeaderNameBuffer, ROOMHEADERNAME_SIZE, "%s", test);
	RoomHeaderName.invalidate();

And my TextArea Wildcard configuration

 RoomHeaderName.setXY(202, 13);
 RoomHeaderName.setColor(touchgfx::Color::getColorFrom24BitRGB(33, 49, 89));
 RoomHeaderName.setLinespacing(0);
 Unicode::snprintf(RoomHeaderNameBuffer, ROOMHEADERNAME_SIZE, "%s", touchgfx::TypedText(T_SINGLEUSEID130).getText());
 RoomHeaderName.setWildcard(RoomHeaderNameBuffer);
 RoomHeaderName.resizeToCurrentText();
 RoomHeaderName.setTypedText(touchgfx::TypedText(T_SINGLEUSEID129));

This topic has been closed for replies.
Alexandre RENOUX
Alexandre RENOUXBest answer
Visitor II
Sep 18, 2020 12:00 PM UTC

Hello,

It's because you didn't tell TouchGFX that the letters in Hello World had to be included when compiling and linking.

To make TouchGFX know about these letters, you can either create a Resource "Hello World" or add "a-zA-Z" to the WildCard Ranges field of your Typography.

https://support.touchgfx.com/docs/development/ui-development/designer-user-guide/texts-view

https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/texts-and-fonts#wildcards

/Alexandre

4 replies

Alexandre RENOUX
Alexandre RENOUXBest answer
Visitor II
Sep 18, 2020 12:00 PM UTC

Hello,

It's because you didn't tell TouchGFX that the letters in Hello World had to be included when compiling and linking.

To make TouchGFX know about these letters, you can either create a Resource "Hello World" or add "a-zA-Z" to the WildCard Ranges field of your Typography.

https://support.touchgfx.com/docs/development/ui-development/designer-user-guide/texts-view

https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/texts-and-fonts#wildcards

/Alexandre

HPham.1590
Associate III
Sep 18, 2020 2:06 PM UTC

Thank you, Alexandre.

I also found my issue yesterday. But now I have other question, Can I use Vietnamese in TouchGFX? I didn't found relate document about this language.

Hieu

Alexandre RENOUX
Visitor II
Sep 21, 2020 10:03 AM UTC

I believe it is supported as it is similar to the latin alphabet.

/Alexandre