diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index 2d05002ef2..1317c184bb 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -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); diff --git a/gfx/drivers_font_renderer/freetype.c b/gfx/drivers_font_renderer/freetype.c index f97f822554..14f859965c 100644 --- a/gfx/drivers_font_renderer/freetype.c +++ b/gfx/drivers_font_renderer/freetype.c @@ -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, };