Blit fonts to full viewport.

This commit is contained in:
Themaister 2014-06-07 21:27:52 +02:00
parent e545d695ec
commit 8ee747a12d
4 changed files with 6 additions and 11 deletions

View File

@ -404,11 +404,8 @@ static const bool crop_overscan = true;
#if defined(HAVE_RMENU)
static const float font_size = 1.0f;
#else
static const float font_size = 48;
static const float font_size = 32;
#endif
// Attempt to scale the font size.
// The scale factor will be window_size / desktop_size.
static const bool font_scale = true;
// Offset for where messages will be placed on-screen. Values are in range [0.0, 1.0].
static const float message_pos_offset_x = 0.05;

View File

@ -36,8 +36,8 @@ bool font_renderer_create_default(const font_renderer_driver_t **driver, void **
unsigned i;
for (i = 0; font_backends[i]; i++)
{
const char *path = NULL;
if (!font_path)
const char *path = font_path;
if (!path)
path = font_backends[i]->get_default_font();
if (!path)
continue;

View File

@ -123,7 +123,7 @@ static void render_message(gl_raster_t *font, const char *msg, GLfloat scale, co
if (gl->shader && gl->shader->use)
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
gl_set_viewport(gl, gl->win_width, gl->win_height, false, false);
gl_set_viewport(gl, gl->win_width, gl->win_height, true, false);
glEnable(GL_BLEND);
glBindTexture(GL_TEXTURE_2D, font->tex);
@ -206,6 +206,7 @@ static void render_message(gl_raster_t *font, const char *msg, GLfloat scale, co
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
glDisable(GL_BLEND);
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
}
static void gl_render_msg(void *data, const char *msg, const struct font_params *params)

View File

@ -180,10 +180,7 @@
# video_font_path =
# Size of the font rendered.
# video_font_size = 48
# Attempt to scale the font to fit better for multiple window sizes.
# video_font_scale = true
# video_font_size = 32
# Enable usage of OSD messages.
# video_font_enable = true