summaryrefslogtreecommitdiffhomepage
path: root/examples/text
diff options
context:
space:
mode:
Diffstat (limited to 'examples/text')
-rw-r--r--examples/text/text_font_sdf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/text/text_font_sdf.c b/examples/text/text_font_sdf.c
index 41ce3b2a..86545e80 100644
--- a/examples/text/text_font_sdf.c
+++ b/examples/text/text_font_sdf.c
@@ -17,6 +17,8 @@
#define GLSL_VERSION 100
#endif
+#include <stdlib.h>
+
int main(void)
{
// Initialization
@@ -37,7 +39,7 @@ int main(void)
// Parameters > font size: 16, no chars array provided (0), chars count: 95 (autogenerate chars array)
fontDefault.chars = LoadFontData("resources/AnonymousPro-Bold.ttf", 16, 0, 95, FONT_DEFAULT);
// Parameters > chars count: 95, font size: 16, chars padding in image: 4 px, pack method: 0 (default)
- Image atlas = GenImageFontAtlas(fontDefault.chars, 95, 16, 4, 0);
+ Image atlas = GenImageFontAtlas(fontDefault.chars, &fontDefault.recs, 95, 16, 4, 0);
fontDefault.texture = LoadTextureFromImage(atlas);
UnloadImage(atlas);
@@ -48,7 +50,7 @@ int main(void)
// Parameters > font size: 16, no chars array provided (0), chars count: 0 (defaults to 95)
fontSDF.chars = LoadFontData("resources/AnonymousPro-Bold.ttf", 16, 0, 0, FONT_SDF);
// Parameters > chars count: 95, font size: 16, chars padding in image: 0 px, pack method: 1 (Skyline algorythm)
- atlas = GenImageFontAtlas(fontSDF.chars, 95, 16, 0, 1);
+ atlas = GenImageFontAtlas(fontSDF.chars, &fontSDF.recs, 95, 16, 0, 1);
fontSDF.texture = LoadTextureFromImage(atlas);
UnloadImage(atlas);