I need to display a “degree” character in a Label in UrhoSharp.
On iOS, the character º works fine (type Option-0). When the app is run on Windows I get a “?” in its place.
The Windows degree character is /00B0 but that also displays a “?” in UrhoSharp. I tried using the Windows “Character Map” application and copied the degree character from there. It also displays “?” when the app is run.
Yes, it is. But whether a glyph is rendered correctly or not depends on the TTF you use. Have you tried with other TTF? On Linux I have tried the TTF that is used in the HelloWorld example, changing the last exclamation character to the degree (U+00B0), and it is rendered correctly. I know it is not tested on Windows, but I just don’t see it will make any difference in this case.
Although I’m relatively new to Urho3D, I’ve spent a huge amount of time rummaging in the code trying to figure out how to do things do to the meager documentation. I’m well aware how to find this out. Here’s the relevant code from HelloWorld
// Set String to display
helloText->SetText("Hello World from Urho3D!");
// Set font and text color
helloText->SetFont(cache->GetResource<Font>("Fonts/Anonymous Pro.ttf"), 30);
helloText->SetColor(Color(0.0f, 1.0f, 0.0f));
So as I mentioned above, I have tried CoreAssets.Fonts.AnonymousPro. It does not work. Using the same code on iOS, it does. So it seems to be a Windows problem.