after searching for a while, i cant really figure if there is a way to import, or add specific images (icons, in my case) into the font. Because, i would like to put a Locker, or Edit icon in my text area, i need it to do it directly in the font if i want to be able to keep the center justification of the text + the icon ( i cant hard write it, as the text is going to be localised )
You can use something like https://icomoon.io/ or a font tool to create a custom font where you would insert those icons into the font.
Alternatively, you can take a look at TextMesh Pro which is a replacement for Unity’s text components including UI Text which provides a lot more functionality including the ability to use different fonts and graphics (sprites) inline with the text.
TextMesh Pro also provides the ability to use icon libraries like Font Awesome where those icons can also be mixed in with the text as you can see in the following video.
Oh, nice ! im playing with the sprite mixing now, i’m having some trouble using the sprite Asset as it seems that i cant get rid of the basic smiley sprites in the Inline Graphic Manager but otherwise, its a fantastic tool. Thanks !
The inline graphic manager has been replaced in recent releases and the tag and Sprite Asset Editor and creation process also updated. See the following video for more information on this.
Good to know. I watched older tutorial and I could not figure out why “inline graphics manager” doesn’t work for me. I think that previous solution has some positive sides, when I reference asset in my prefab I can prepare asset bundle with different configurations. In current solution I can use only one sprite set defined in global config - singletons sucks…
The sprite tag allows you to specify Sprite Asset by name such as <sprite=“Sprite Asset Name” index=x> see the following documentation for more details.
Sprite Assets must be located in the folder specified in the TMP Settings file.
You can also assign a Sprite Asset to a text object via the property or in the Extra Settings panel of the text object. So without a Sprite Asset assigned, if you use <sprite=0> the 0 refers to the index of the sprite part of the sprite asset assigned in the TMP Settings file. If you assign a sprite asset to the text object then it will refer to that one instead.