cancel
Showing results for 
Search instead for 
Did you mean: 

[ ToucgGFX ] Issue when display string in TextArea

HPham.1590
Senior

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));

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

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

View solution in original post

4 REPLIES 4
Alexandre RENOUX
Principal

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

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

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

/Alexandre

Thank you, I'll try it.