diff options
| author | raysan5 <raysan5@gmail.com> | 2014-10-17 21:11:58 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2014-10-17 21:11:58 +0200 |
| commit | 9d27bba23f08e7749fd98c8b56b5fe34786926fd (patch) | |
| tree | 86ca65c923fc56535d14b1e8c6bf933808518e4e /src/text.c | |
| parent | 063e26c521dba1af582906df1e5b96fa37c82a16 (diff) | |
| download | raylib-9d27bba23f08e7749fd98c8b56b5fe34786926fd.tar.gz raylib-9d27bba23f08e7749fd98c8b56b5fe34786926fd.zip | |
Small Fixes Update (1.2.1)
View CHANGELOG for description on small fixes and add-ons
Diffstat (limited to 'src/text.c')
| -rw-r--r-- | src/text.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |
