This doesn’t seem like something that should be causing me as much trouble as it is, but I’ve been having a hell of a time finding a way to display these unicode arrow symbols in TextMesh Pro:
⇦⇨⇧⇩
Unity had no problem displaying these symbols before when I displayed them in the older Text fields, but now that I’m using TextMesh Pro, I can’t seem to find a font that will let me generate a font asset containing them–and without that, I can’t access these symbols via a Fallback Font.
Unity documentation suggests that I should be getting results with Arial or Liberation Sans, but the Font Asset Creator isn’t finding these symbols within the fonts:
This makes no sense to me. If Unity uses those as its fallback fonts and it displays the symbols just fine in older Text fields, why can’t TextMesh Pro find these symbols within these fonts? I have to be missing something, right?
Neither the Arial or LiberationSans font files contain these characters as correctly reported by the Font Asset Creator.
The Segoe UI Emoji Regular font file does contain these characters and I am sure there are many others like some symbol fonts, etc. Font Awesome also has these arrow symbols but mapped in their own custom ranges.
In terms of how to handle these in combination with using another font like LiberationSans, you can create a new font asset (static or dynamic) that will contain these characters and then assign this font asset as a fallback or your primary font asset or as a general fallback in the TMP Settings list of fallbacks.
The easiest way I have found to deal with this problem, is to go to Google Fonts, then paste the Unicode characters you are looking for into one of the preview fields, and then selecting “Apply to all fonts.”
You can then easily see which fonts support the specific characters.
For the characters you posted I could find the following fonts that fully support it:
Fira Mono(Fira Sans etc. only supports ⇦⇨⇧⇩)
Noto (Sans, Serif Etc.) also supports all 8 Characters you posted.
There are a few other fonts in there that supports only ⇦⇨⇧⇩.
So if Fira or Noto is not the type of Font you are looking for, I guess you could maybe just use one that supports ⇦⇨⇧⇩ and then add a mask to the TMP to “Fill” it, by using a blank color Image as a child below it in the hierarchy, but I don’t think that is advisable…
I know there are waaaay more fonts out there, but it can be really helpful just as a starting point, and it is super easy to download the fonts.
Hope this helps.
The easiest / recommended way is to create a font asset that contains these glyphs and assign this font asset as fallback to the primary font asset or as a general fallback in the TMP Setting which would ensure these characters are then available for any other font assets.
Just for fun, a user could also create a Sprite Asset than contains black & white or even colored version of these arrows and assign the appropriate Unicode to these sprites and then either assign this sprite asset to the text object or as a fallback to the default sprite asset in the TMP Settings.