How can I print German umlauts (ä, ü, ö) to the screen using DrawText?
This is my code in the HUD class:
FString myString1 = "Laufen Sie zunächst zur Wand!";
GetTextSize(myString1, Text2DrawSize.X, Text2DrawSize.Y, HUDFont24);
DrawText(myString1, FColor::Black, ScreenDimensions.X * 0.02, ScreenDimensions.Y * 0.02, HUDFont24);
When I play the game, “Laufen Sie zun?chst zur Wand!” is printed to the screen with the “?” instead of the “ä”…
Any help is really appreciated!
thanks for your answer. It’s the standard UE4-font that is automatically used when you create a new font in the content browser, I only changed the font size.
try switching the font to roboto
Found a solution while looking for the answer myself.
Initially I was feeding SetText an FText. The FText was “Hände” and that made the error. This is how it should be done but it is erroneous.
What got me around the issue was converting an FString “Hände” to an FText. Now it works. However this appears to be a bug so will post it up.
I can’t give you the C++ code because I’m doing my UI stuff in BP. Will be whatever the ToText(String) BP node does.