Small Fixes Update (1.2.1)

View CHANGELOG for description on small fixes and add-ons
This commit is contained in:
raysan5 2014-10-17 21:11:58 +02:00
parent 063e26c521
commit 9d27bba23f
10 changed files with 65 additions and 17 deletions

View file

@ -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;
}