mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Cut down on code duplication
This commit is contained in:
parent
d1d0212684
commit
07db1bbfde
@ -238,8 +238,6 @@ static void *font_renderer_ft_init(const char *font_path, float font_size)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
err = FT_New_Memory_Face(handle->lib, font_data, font_size, 0, &handle->face);
|
err = FT_New_Memory_Face(handle->lib, font_data, font_size, 0, &handle->face);
|
||||||
if (err)
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
@ -247,10 +245,11 @@ static void *font_renderer_ft_init(const char *font_path, float font_size)
|
|||||||
if (!path_is_valid(font_path))
|
if (!path_is_valid(font_path))
|
||||||
goto error;
|
goto error;
|
||||||
err = FT_New_Face(handle->lib, font_path, 0, &handle->face);
|
err = FT_New_Face(handle->lib, font_path, 0, &handle->face);
|
||||||
if (err)
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
goto error;
|
||||||
|
|
||||||
err = FT_Select_Charmap(handle->face, FT_ENCODING_UNICODE);
|
err = FT_Select_Charmap(handle->face, FT_ENCODING_UNICODE);
|
||||||
if (err)
|
if (err)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user