Added line_height for freetype and cleaned up comments

This commit is contained in:
natinusala 2015-05-30 15:41:47 +02:00
parent 48caf528ef
commit 9b276d80d2
2 changed files with 3 additions and 6 deletions

View File

@ -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);

View File

@ -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,
};