-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Utf8 doesn't work in 4.5.0.3 #184
Comments
Looks like bug was introduced here #173 |
@AlexisHuvier Can you share a code example for this issue? |
I don't have now because it in a big project. |
Just a small example drawing the text that is not showing correctly and the name of the font used. |
Screens in the first message used extern font but with DrawText there is the same problem. So i used it to make this example : private static void Main()
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "Test");
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(Color.RAYWHITE);
DrawText("éèàùè&", 250, 20, 20, Color.DARKGRAY);
EndDrawing();
}
CloseWindow();
} |
Wouldn’t this be expected with the default font? I don’t believe there are any additional characters beyond ASCII in the default font. |
I'm proven wrong about the default font. I have made a pr with a fix for this bug #185. This was the result of a fix for another bug. That fix changed all the string conversions from UTF8 to ANSI. Issue is that raylib uses UTF8 for drawing text not ANSI. |
@n77y Thanks for looking into this issue. Few changes needed on your pr then it can be merged. |
@AlexisHuvier @n77y Fix is now in the 4.5.0.4 release. |
Before submitting a new issue, please verify and check:
Issue description
Since 4.5.0.3, drawing utf8 text shows wrong characters.
Environment
I'm on Windows, with last version of Raylib-cs.
Issue screenshot
4.5.0.2 :
4.5.0.3 :
The text was updated successfully, but these errors were encountered: