Skip to main content
HPham.1590
Associate III
September 17, 2020
Solved

[ ToucgGFX ] Issue when display string in TextArea

  • September 17, 2020
  • 4 replies
  • 2107 views

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.
Best answer by Alexandre RENOUX

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
September 18, 2020

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
September 18, 2020

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
September 21, 2020

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

/Alexandre