mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-11 13:58:15 +00:00
Small Fixes Update (1.2.1)
View CHANGELOG for description on small fixes and add-ons
This commit is contained in:
@@ -340,7 +340,11 @@ int MeasureText(const char *text, int fontSize)
|
||||
{
|
||||
Vector2 vec;
|
||||
|
||||
vec = MeasureTextEx(defaultFont, text, fontSize, 1);
|
||||
int defaultFontSize = 10; // Default Font chars height in pixel
|
||||
if (fontSize < defaultFontSize) fontSize = defaultFontSize;
|
||||
int spacing = fontSize / defaultFontSize;
|
||||
|
||||
vec = MeasureTextEx(defaultFont, text, fontSize, spacing);
|
||||
|
||||
return (int)vec.x;
|
||||
}
|
||||
|
Reference in New Issue
Block a user