Skip to main content
KRasm.2
Associate
Mar 5, 2026 7:47 AM UTC
Solved

Underline in TGFX text

Hi,

Is underline of text supported by TGFX or will that be part of the ttf-files in Typographies?

The goal is a text like this: "Press SETTINGS now."

 

This topic has been closed for replies.
JohanAstrupBest answer
ST Technical Moderator
Mar 5, 2026 3:07 PM UTC

Hello @KRasm.2.

To underline text, you need to include an underline-specific font in your project. The same applies if you want e.g. italic text.

However, since we are specifically talking about underlining here, it is also possible to implement this manually. One way is to use a thin box with the same color as the text area and place it along the bottom edge of the text area widget.

Best regards,
Johan

1 reply

JohanAstrupBest answer
ST Technical Moderator
Mar 5, 2026 3:07 PM UTC

Hello @KRasm.2.

To underline text, you need to include an underline-specific font in your project. The same applies if you want e.g. italic text.

However, since we are specifically talking about underlining here, it is also possible to implement this manually. One way is to use a thin box with the same color as the text area and place it along the bottom edge of the text area widget.

Best regards,
Johan