On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How should I align the baselines of different fonts?

A topic by JoneWang created 99 days ago Views: 64 Replies: 2
Viewing posts 1 to 2
(1 edit)

The two Chinese characters '你好' are not aligned when using different fonts.

Developer

Hello!


Super Text Mesh just renders the data from the font directly, so not all fonts will be aligned with one another.

What I recommend is...

For text that uses a single font, you can edit the "baseOffset" variable to align the font how you like. But for multiple fonts, you can use the <y=offset> tag to offset text vertically.

So a string could look like... "ABCDEFG<f=chinese><y=0.2>你好</y></f>" (With 0.2 being whatever offset the text needs)

You can simplify this further by using Super Text Mesh's "Voices" data! If you create a voice named "chinese" with this text: "<f=chinese><y=0.2>", then all you have to type in your script is "ABCDEFG<v=chinese>你好</v>" !


I hope this information helps!

Thanks! It worked!