From 5d2077395eedc3510267716da5065e0d6702f96e Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 10 Dec 2018 08:42:09 +0000 Subject: [PATCH] Font loading fix. --- src/system/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/text.c b/src/system/text.c index 1782215..a369519 100644 --- a/src/system/text.c +++ b/src/system/text.c @@ -63,14 +63,14 @@ static void initFont(char *name, char *filename) f = malloc(sizeof(Font)); memset(f, 0, sizeof(Font)); + font = TTF_OpenFont(filename, FONT_SIZE); + initChars(f); surface = SDL_CreateRGBSurface(0, FONT_TEXTURE_SIZE, FONT_TEXTURE_SIZE, 32, 0, 0, 0, 0xff); SDL_SetColorKey(surface, SDL_TRUE, SDL_MapRGBA(surface->format, 0, 0, 0, 0)); - font = TTF_OpenFont(filename, FONT_SIZE); - dest.x = dest.y = 0; for (i = 0 ; i < NUM_GLYPH_BUCKETS ; i++)