Text Mesh Pro and material presets with I2

More
4 years 6 months ago #3969 by alanmotionlab
Hi,

I've seen a few topics on this, but not managed to get it working myself. I have a font asset in my game with TMP font assets for each of the languages I support. All is working fine except when I want to change the material preset, it always just uses the default.

I saw on one of the other threads that it was said to change the secondary term to a material instead and use the (in my case) outlined font, but then it doesn't change the main font to Japanese so no text is displayed at all.

Has something changed with this, as these were pretty old threads?

Unity v218.4.9f1
TMP v1.4.1
I2 v2.8.12f1

Thanks

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3970 by Frank
What are the names of your material and fonts?

TMPro uses the name to know what font correspond to which material. So, they should have the same name just with different postfixes (e.g. "SDF")

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3971 by alanmotionlab
Hi Frank,

I've got them named the same, but possibly wrong with the post fix. So, for example, I have the below:

Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3972 by Frank
Can you try renaming the material
from "JapaneseFontOutlineWhite"
to "JapaneseFont OutlineWhite"

That should make TMPro detect its a material that matches the font.

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3973 by alanmotionlab
ok - and then I need to change I2 to use a material instead of the font right? on the secondary term?

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3974 by Frank
Yes,
Another way is to set the secondary term as a TMPro font, and then add the name of the material to the translation.

For example, instead of the term translation to that language be: "This is an example"
Make it "[JapaneseFont OutlineWhite]This is an example"

That will make I2Loc to use the provided font witht the material named as the one between the brackets.

Hope that helps.
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.275 seconds
Template by JoomlaShine