Font loading fix.

This commit is contained in:
Steve 2018-12-10 08:42:09 +00:00
parent af99ec8f3d
commit 5d2077395e
1 changed files with 2 additions and 2 deletions

View File

@ -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++)