Page 1 of 1

Drop caps at the beginning of dialogues

Posted: Mon May 16, 2022 11:05 am
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!

Re: Drop caps at the beginning of dialogues

Posted: Mon May 16, 2022 11:24 am
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 464 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.

Re: Drop caps at the beginning of dialogues

Posted: Mon May 16, 2022 11:51 am
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!

Re: Drop caps at the beginning of dialogues

Posted: Mon May 16, 2022 1:22 pm
by Tony Li
Sounds good!