Try to avoid memset in font_renderer_update_atlas

This commit is contained in:
twinaphex 2016-10-21 19:25:37 +02:00
parent 6a404b0c42
commit 0ef96ddbbc
1 changed files with 8 additions and 1 deletions

View File

@ -107,7 +107,14 @@ static unsigned font_renderer_update_atlas(ft_font_renderer_t *handle, FT_ULong
glyph = &handle->glyphs[id];
memset(glyph, 0, sizeof(*glyph)) ;
glyph->width = 0;
glyph->height = 0;
glyph->atlas_offset_x = 0;
glyph->atlas_offset_y = 0;
glyph->draw_offset_x = 0;
glyph->draw_offset_y = 0;
glyph->advance_x = 0;
glyph->advance_y = 0;
if (FT_Load_Char(handle->face, charcode, FT_LOAD_RENDER))
return -1;