How to change font in a conversation
How to change font in a conversation
Hello there!
I'm sorry if the topic has been discussed before, but I am wondering how to change my font in a dialog entry within a conversation... I would like each choice the player makes to have a different font.
I tried to use <font>"Name of the font"</font> tags in the Dialog Text to call the fonts in my assets but it doesn't seem to work... I'm sure you can do that kind of change within a conversation, right?
Thanks!
I'm sorry if the topic has been discussed before, but I am wondering how to change my font in a dialog entry within a conversation... I would like each choice the player makes to have a different font.
I tried to use <font>"Name of the font"</font> tags in the Dialog Text to call the fonts in my assets but it doesn't seem to work... I'm sure you can do that kind of change within a conversation, right?
Thanks!
Re: How to change font in a conversation
Hi Tony and thanks for your quick reply,
I activated TextMesh Pro in the Welcome Window and I put my fonts in the TextMesh Pro/Resources/Fonts & Material folder. I tried the <font> tags as in your link but it still doesn't work
Is there something more to do in order to get the fonts?
I activated TextMesh Pro in the Welcome Window and I put my fonts in the TextMesh Pro/Resources/Fonts & Material folder. I tried the <font> tags as in your link but it still doesn't work
Is there something more to do in order to get the fonts?
Re: How to change font in a conversation
Hi,
That should do it. Make sure the TextMesh Pro <font> tag works outside of the Dialogue System first. Create a test TextMeshProUGUI, and set the Text value to something like:
This is the default font. <font="LiberationSans SDF">This is Liberation Sans.</font> Back to default.
Make sure the TextMeshProUGUI's Extra Settings > Rich Text checkbox is ticked. It should already be ticked by default.
That should do it. Make sure the TextMesh Pro <font> tag works outside of the Dialogue System first. Create a test TextMeshProUGUI, and set the Text value to something like:
This is the default font. <font="LiberationSans SDF">This is Liberation Sans.</font> Back to default.
Make sure the TextMeshProUGUI's Extra Settings > Rich Text checkbox is ticked. It should already be ticked by default.
Re: How to change font in a conversation
Hi Tony,
I am so close!
I used TextMesh Pro to convert the font and it works in Unity as a GUI but when I use the tags in my Dialog System, it doesn't... It only shows the text with the tags without showing the fonts (GorriSans). I attached an image of what I wrote in my Dialog System window... I'm not sure what I missed here!
I am so close!
I used TextMesh Pro to convert the font and it works in Unity as a GUI but when I use the tags in my Dialog System, it doesn't... It only shows the text with the tags without showing the fonts (GorriSans). I attached an image of what I wrote in my Dialog System window... I'm not sure what I missed here!
- Attachments
-
- It is what I wrote in the Dialog System window
- 01.PNG (9.65 KiB) Viewed 1357 times
Re: How to change font in a conversation
Hi,
Are you sure the subtitle panel is using a TextMeshProUGUI component?
Are you sure the subtitle panel is using a TextMeshProUGUI component?
Re: How to change font in a conversation
Hi,
I tried to add the component TextMeshProUGUI in the subtitle panel but Unity doesn't seem to know what it is (it just want to add a new script)...
However, in the subtitle panel, it detects that TextMesh Pro is activated (I added an image to show you).
Is there something missing?
I tried to add the component TextMeshProUGUI in the subtitle panel but Unity doesn't seem to know what it is (it just want to add a new script)...
However, in the subtitle panel, it detects that TextMesh Pro is activated (I added an image to show you).
Is there something missing?
- Attachments
-
- 02.PNG (47.37 KiB) Viewed 1321 times
Re: How to change font in a conversation
Hi,
The menu item to add a TextMeshProUGUI is confusingly UI > Text - TextMeshPro, not UI > TextMeshProUGUI.
Try adding a "Text - TextMeshPro" to your subtitle panel.
The menu item to add a TextMeshProUGUI is confusingly UI > Text - TextMeshPro, not UI > TextMeshProUGUI.
Try adding a "Text - TextMeshPro" to your subtitle panel.
Re: How to change font in a conversation
Hi,
Ok so I added the TextMeshProUGUI object in the scene and added it in the Subtitle Panel... but even with that, it doesn't work when I call it in the dialog. Maybe I'm doing it wrong?
I must say that I am pretty new to this and it is very confusing
Is there a step-by-step way to do this?
Ok so I added the TextMeshProUGUI object in the scene and added it in the Subtitle Panel... but even with that, it doesn't work when I call it in the dialog. Maybe I'm doing it wrong?
I must say that I am pretty new to this and it is very confusing
Is there a step-by-step way to do this?
- Attachments
-
- 04.PNG (29.09 KiB) Viewed 1310 times
-
- 03.PNG (9.43 KiB) Viewed 1310 times
Re: How to change font in a conversation
Hi,
Here's a step-by-step. You've already done some of these steps, so you can skip over them.
0. (Clean-up) Remove the StandardUISubtitlePanel component from your Dialogue Manager. You'll also want to remove the Text (TMP) that you added.
1. In Unity's Package Manager window, make sure the TextMesh Pro package is installed in your project.
2. In the Dialogue System's Welcome Window, tick the TMP_PRESENT checkbox. (To open the Welcome Window, select menu item Tools > Pixel Crushers > Dialogue System > Welcome Window.)
3. Assign the prefab 'Basic Standard Dialogue UI' to the Dialogue Manager GameObject's Display Settings > Dialogue UI field. You can find this prefab in the Project window in Plugins / Pixel Crushers / Dialogue System / Prefabs / Standard UI Prefabs / Basic.
Here's a step-by-step. You've already done some of these steps, so you can skip over them.
0. (Clean-up) Remove the StandardUISubtitlePanel component from your Dialogue Manager. You'll also want to remove the Text (TMP) that you added.
1. In Unity's Package Manager window, make sure the TextMesh Pro package is installed in your project.
2. In the Dialogue System's Welcome Window, tick the TMP_PRESENT checkbox. (To open the Welcome Window, select menu item Tools > Pixel Crushers > Dialogue System > Welcome Window.)
3. Assign the prefab 'Basic Standard Dialogue UI' to the Dialogue Manager GameObject's Display Settings > Dialogue UI field. You can find this prefab in the Project window in Plugins / Pixel Crushers / Dialogue System / Prefabs / Standard UI Prefabs / Basic.
- When asked if you want to use the prefab or add an instance, select Add Instance.
- Right-click on NPC Subtitle Panel to open the context menu. Select UI > Text - TextMeshPro. This will create a Text (TMP) child GameObject.
- Drag the Text (TMP) GameObject up so it's just below the Subtitle Text GameObject.
- Add a Layout Element component to the Text (TMP). Tick the Flexible Width checkbox.
- Delete the Subtitle Text GameObject.