-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[rtextures] ImageText()
scaling spacing incorrect
#3105
Comments
ImageText()
scaling spacing incorrect
@fctr Sorry, I don't understand the issue. If |
|
@fctr Please, could you provide some screenshot or sample code illustrating the issue? |
|
Give that a whirl and you'll see what I mean. You'll need to change line 3158 in |
THANK YOU SO MUCH FOR EVERYTHING! |
@fctr I'm afraid the proposed change just broke DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
DrawRectangle(190, 200, MeasureText("Congrats! You created your first window!", 20), 20, Fade(RED, 0.5f)); I'm reverting the change, please, send a PR with an update when reviewed. |
Reviewed it and it seems it works as expected |
rtextures.c, Line 1243:
int spacing = fontSize/defaultFontSize;
As long as the fontSize is identical to the defaultFontSize, all is good. If you try to scale the font to, say, 4x the default size, the you get the spacing squared, so instead of 4 pixels between letters, you get 16.
The line should read:
int spacing = 1;
Code block at line 1303 already scales everything up, so no need to do it twice.
The text was updated successfully, but these errors were encountered: