Drop caps at the beginning of dialogues

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
frankydess
Posts: 4
Joined: Sat Oct 24, 2020 11:16 am

Drop caps at the beginning of dialogues

Post by frankydess »

Hello!

Our team would like to add "drop caps", big capital letters at the beginning of our dialogues and are wondering what is the best way to achieve a similar result either by using:
1- a different font and size inside a subtitle panel for the drop cap
Or
2- an image replacing the first letter in a subtitle panel

We never used tools like text animator but would like your suggestion before trying it that out.

Thanks a lot!
Attachments
unknown.jpg
unknown.jpg (620.79 KiB) Viewed 461 times
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Drop caps at the beginning of dialogues

Post by Tony Li »

Hi,

That's complicated because neither Unity UI Text nor TextMesh Pro have any built-in functionality for flowing around large letters or images. I don't think Text Animator Unity does either, nor do I know if Super Text Mesh can do it, but the Dialogue System does support Super Text Mesh if so.

If you can first identify a good way to produce the look of that text without involving the Dialogue System, it shouldn't be difficult to get it to work with the Dialogue System.

This stackoverflow answer suggests using two TextMeshProUGUI elements with the linked text option.

If you could go with this style instead:
lowerText.png
lowerText.png (269.85 KiB) Viewed 459 times
then that would be a simple <sprite> or <font> tag in TextMesh Pro. (Pardon the butchering of your example image.) You could add a script with an OnConversationLine method to replace the first character of the subtitle text with a <sprite> tag or wrap it in a special <font> tag.
frankydess
Posts: 4
Joined: Sat Oct 24, 2020 11:16 am

Re: Drop caps at the beginning of dialogues

Post by frankydess »

Thanks a lot for the quick answer!
We will investigate with the rest of the team and keep you updated on our solutions if we continue with that feature!
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Drop caps at the beginning of dialogues

Post by Tony Li »

Sounds good!
Post Reply