Commit b19b67e7 authored by Carola Nitz's avatar Carola Nitz

Font: fix defaultfontsize being zero and fall back to 10 in that case

closes #213

(cherry picked from commit 9c500d73)
parent b8adaa47
......@@ -185,7 +185,7 @@ diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/f
index b92c66ceac..681e26ca98 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -952,12 +952,35 @@ static inline int RenderAXYZ( filter_t *p_filter,
@@ -952,12 +952,36 @@ static inline int RenderAXYZ( filter_t *p_filter,
static void UpdateDefaultLiveStyles( filter_t *p_filter )
{
......@@ -199,7 +199,8 @@ index b92c66ceac..681e26ca98 100644
+ p_sys->p_default_style->psz_fontname = strdup( var_InheritString( p_filter, "freetype-font" ) );
- p_style->i_font_color = var_InheritInteger( p_filter, "freetype-color" );
+ p_sys->p_forced_style->f_font_relsize = (1.0 / var_InheritInteger( p_filter, "freetype-rel-fontsize" )) * 100;
+ int size = (1.0 / var_InheritInteger( p_filter, "freetype-rel-fontsize" )) * 100;
+ p_sys->p_forced_style->f_font_relsize = size < 0 ? 10 : size;
- p_style->i_background_alpha = var_InheritInteger( p_filter, "freetype-background-opacity" );
- p_style->i_background_color = var_InheritInteger( p_filter, "freetype-background-color" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment