aboutsummaryrefslogtreecommitdiff
path: root/src/text.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2018-07-05 19:17:06 +0200
committerraysan5 <raysan5@gmail.com>2018-07-05 19:17:06 +0200
commit103bc7dfc6cfcd6afc50782a85d0cd955b08bb8c (patch)
tree534d30747d721eacc156e7a781e786d9efab8405 /src/text.c
parentd881c732578c238bf77b8a6755fa03f61dda9d5d (diff)
downloadraylib-103bc7dfc6cfcd6afc50782a85d0cd955b08bb8c.tar.gz
raylib-103bc7dfc6cfcd6afc50782a85d0cd955b08bb8c.zip
Corrected issue with GetFontDefault()
Note for me: Replace All is NOT your friend...
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/text.c b/src/text.c
index c54c3a9f..d1d1617d 100644
--- a/src/text.c
+++ b/src/text.c
@@ -258,7 +258,7 @@ extern void UnloadDefaultFont(void)
#endif // SUPPORT_DEFAULT_FONT
// Get the default font, useful to be used with extended parameters
-Font GetFontDefault()()
+Font GetFontDefault()
{
#if defined(SUPPORT_DEFAULT_FONT)
return defaultFont;
@@ -303,7 +303,7 @@ Font LoadFont(const char *fileName)
if (font.texture.id == 0)
{
TraceLog(LOG_WARNING, "[%s] Font could not be loaded, using default font", fileName);
- font = GetFontDefault()();
+ font = GetFontDefault();
}
else SetTextureFilter(font.texture, FILTER_POINT); // By default we set point filter (best performance)
@@ -527,7 +527,7 @@ Image GenImageFontAtlas(CharInfo *chars, int charsCount, int fontSize, int paddi
void UnloadFont(Font font)
{
// NOTE: Make sure spriteFont is not default font (fallback)
- if (font.texture.id != GetFontDefault()().texture.id)
+ if (font.texture.id != GetFontDefault().texture.id)
{
UnloadTexture(font.texture);
free(font.chars);
@@ -542,7 +542,7 @@ void UnloadFont(Font font)
void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
{
// Check if default font has been loaded
- if (GetFontDefault()().texture.id != 0)
+ if (GetFontDefault().texture.id != 0)
{
Vector2 position = { (float)posX, (float)posY };
@@ -550,7 +550,7 @@ void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
if (fontSize < defaultFontSize) fontSize = defaultFontSize;
int spacing = fontSize/defaultFontSize;
- DrawTextEx(GetFontDefault()(), text, position, (float)fontSize, (float)spacing, color);
+ DrawTextEx(GetFontDefault(), text, position, (float)fontSize, (float)spacing, color);
}
}
@@ -656,13 +656,13 @@ int MeasureText(const char *text, int fontSize)
Vector2 vec = { 0.0f, 0.0f };
// Check if default font has been loaded
- if (GetFontDefault()().texture.id != 0)
+ if (GetFontDefault().texture.id != 0)
{
int defaultFontSize = 10; // Default Font chars height in pixel
if (fontSize < defaultFontSize) fontSize = defaultFontSize;
int spacing = fontSize/defaultFontSize;
- vec = MeasureTextEx(GetFontDefault()(), text, (float)fontSize, (float)spacing);
+ vec = MeasureTextEx(GetFontDefault(), text, (float)fontSize, (float)spacing);
}
return (int)vec.x;
@@ -988,7 +988,7 @@ static Font LoadBMFont(const char *fileName)
if (font.texture.id == 0)
{
UnloadFont(font);
- font = GetFontDefault()();
+ font = GetFontDefault();
}
else TraceLog(LOG_INFO, "[%s] Font loaded successfully", fileName);