1 : Text with original font, without the need for the fallback
2 : Text rendered with the original font that has fallback (original don’t have any japanese characters)
3 : Text rendered with the fallback font only (SourceHanSans)
Notice the colon at line 2 : it’s rendered with the original font instead of the Fallback font
Notice the colon at line 3 : it’s what we want
We want to use the same font for all the text if there is a fallback without any missing character.
How can we achieve this ?
I do not have a current solution for this other than using one of the HasCharacters() function as seen below to check if a given font asset contains all the requested characters.
/// <summary>
/// Function to check if certain characters exists in the font asset. Function returns a list of missing characters.
/// </summary>
/// <param name="text">String containing the characters to check.</param>
/// <param name="missingCharacters">List of missing characters.</param>
/// <returns></returns>
public bool HasCharacters(string text, out List<char> missingCharacters)
This is not the first time this functionality has been requested and perhaps something that I could add support for.