diff options
| author | raysan5 <raysan5@gmail.com> | 2018-07-05 19:17:06 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2018-07-05 19:17:06 +0200 |
| commit | 103bc7dfc6cfcd6afc50782a85d0cd955b08bb8c (patch) | |
| tree | 534d30747d721eacc156e7a781e786d9efab8405 /src/textures.c | |
| parent | d881c732578c238bf77b8a6755fa03f61dda9d5d (diff) | |
| download | raylib-103bc7dfc6cfcd6afc50782a85d0cd955b08bb8c.tar.gz raylib-103bc7dfc6cfcd6afc50782a85d0cd955b08bb8c.zip | |
Corrected issue with GetFontDefault()
Note for me: Replace All is NOT your friend...
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/textures.c b/src/textures.c index 1c6b6184..94498c3c 100644 --- a/src/textures.c +++ b/src/textures.c @@ -1532,7 +1532,7 @@ Image ImageText(const char *text, int fontSize, Color color) if (fontSize < defaultFontSize) fontSize = defaultFontSize; int spacing = (float)fontSize/defaultFontSize; - Image imText = ImageTextEx(GetFontDefault()(), text, (float)fontSize, (float)spacing, color); + Image imText = ImageTextEx(GetFontDefault(), text, (float)fontSize, (float)spacing, color); return imText; } @@ -1606,7 +1606,7 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co TraceLog(LOG_INFO, "Image text scaled by factor: %f", scaleFactor); // Using nearest-neighbor scaling algorithm for default font - if (font.texture.id == GetFontDefault()().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); + if (font.texture.id == GetFontDefault().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); } @@ -1629,7 +1629,7 @@ void ImageDrawRectangle(Image *dst, Vector2 position, Rectangle rec, Color color void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color) { // NOTE: For default font, sapcing is set to desired font size / default font size (10) - ImageDrawTextEx(dst, position, GetFontDefault()(), text, (float)fontSize, (float)fontSize/10, color); + ImageDrawTextEx(dst, position, GetFontDefault(), text, (float)fontSize, (float)fontSize/10, color); } // Draw text (custom sprite font) within an image (destination) |
