mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-18 16:28:51 +00:00
Added line_height for freetype and cleaned up comments
This commit is contained in:
parent
48caf528ef
commit
9b276d80d2
@ -262,15 +262,12 @@ static void gl_raster_font_render_line(
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Support scale
|
||||
//TODO Line height
|
||||
//TODO Adapt this to all drivers
|
||||
static void gl_raster_font_render_message(
|
||||
gl_raster_t *font, const char *msg, GLfloat scale,
|
||||
const GLfloat color[4], GLfloat pos_x, GLfloat pos_y,
|
||||
unsigned text_align)
|
||||
{
|
||||
//If the font height is not supported just draw like as usual
|
||||
//If the font height is not supported just draw as usual
|
||||
if (!font->font_driver->get_line_height)
|
||||
{
|
||||
gl_raster_font_render_line(font, msg, scale, color, pos_x, pos_y, text_align);
|
||||
|
@ -232,7 +232,7 @@ static int font_renderer_ft_get_line_height(void* data)
|
||||
if (!handle)
|
||||
return 0;
|
||||
|
||||
return handle->face->size->metrics->height;
|
||||
return handle->face->size->metrics.height/64;
|
||||
}
|
||||
|
||||
font_renderer_driver_t freetype_font_renderer = {
|
||||
@ -242,5 +242,5 @@ font_renderer_driver_t freetype_font_renderer = {
|
||||
font_renderer_ft_free,
|
||||
font_renderer_ft_get_default_font,
|
||||
"freetype",
|
||||
NULL, /*get_line_height*/
|
||||
font_renderer_ft_get_line_height,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user