load space metrics only instead of all metrics of the 1st 256 characters
This commit is contained in:
parent
99d328cfd7
commit
73cd768a19
|
@ -206,7 +206,10 @@ RenFont* ren_font_load(const char* path, float size, ERenFontAntialiasing antial
|
|||
font->antialiasing = antialiasing;
|
||||
font->hinting = hinting;
|
||||
font->style = style;
|
||||
font->space_advance = font_get_glyphset(font, ' ', 0)->metrics[' '].xadvance;
|
||||
|
||||
if (FT_Load_Char(face, ' ', font_set_load_options(font)))
|
||||
goto failure;
|
||||
font->space_advance = face->glyph->advance.x / 64.0f;
|
||||
font->tab_advance = font->space_advance * 2;
|
||||
return font;
|
||||
failure:
|
||||
|
|
Loading…
Reference in New Issue