summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2018-07-05 19:08:24 +0200
committerraysan5 <[email protected]>2018-07-05 19:08:24 +0200
commitd881c732578c238bf77b8a6755fa03f61dda9d5d (patch)
treecd96b7ac77a97bed0dda8555ffdeef5a158406b1 /src/text.c
parent1f1d8eeeeb5aa34cfa41784c88cdce11fa525fa1 (diff)
downloadraylib-d881c732578c238bf77b8a6755fa03f61dda9d5d.tar.gz
raylib-d881c732578c238bf77b8a6755fa03f61dda9d5d.zip
Renamed GetDefaultFont() to GetFontDefault()
Library consistency rename... yes, I know, it breaks the API...
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 c895540b..c54c3a9f 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 GetDefaultFont()
+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 = GetDefaultFont();
+ 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 != GetDefaultFont().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 (GetDefaultFont().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(GetDefaultFont(), 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 (GetDefaultFont().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(GetDefaultFont(), 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 = GetDefaultFont();
+ font = GetFontDefault()();
}
else TraceLog(LOG_INFO, "[%s] Font loaded successfully", fileName);