I am using a pixel-style font in my game and recently ran into an issue with emojis. My font doesn’t support them, however they are still being displayed.
I guess Godot falls back to some default font which supports emojis, but I don’t actually want that. I would prefer them to be displayed as notdef symbol, something like this: □. So that they could still be pixel-y.
However, I cannot find this feature anywhere. Sure, I can write a function, that checks every symbols and replaces it if it is not present in the font, but I don’t think that is optimal + I don’t want to drag it everywhere.
Is there a way to set such a symbol?
Why would there be emoji in the texts?
Are the players going to create them like text input? Then you should maybe implement ‘allowed character’ check anyway.
@lastbender No, I have multiplayer via Steam. And people can have them in their usernames.
However, I guess you are right. There should not be that many cases where emojis can get through, so I can parse them in code.
Do you know if there is a way of changing the default tofu font or its size? My font is really small and the tofu glyphs are way too big in comparison.
I’m not sure why that happens, but you cannot modify individual glyphs from a font file (for example making only the letter A bigger/smaller). I’m also not sure if the missing glyph is handled by the font itself, but one idea that you could try is add a different fallback font that has the same missing glyphs as your intended one, and see if that works (no clue what the result would be; will Godot even fallback to a font that also doesn’t have that glyph?)