Commit ab7a70c7 authored by François Cartegnie's avatar François Cartegnie 🤞

text_renderer: freetype: fix forced relative font sizing unit

parent 2e498dde
......@@ -996,7 +996,7 @@ static void FillDefaultStyles( filter_t *p_filter )
p_sys->p_forced_style->i_font_size = var_InheritInteger( p_filter, "freetype-fontsize" );
p_sys->p_forced_style->f_font_relsize = var_InheritInteger( p_filter, "freetype-rel-fontsize" );
if( p_sys->p_forced_style->f_font_relsize )
p_sys->p_forced_style->f_font_relsize = 1.0 / p_sys->p_forced_style->f_font_relsize;
p_sys->p_forced_style->f_font_relsize = 100.0 / p_sys->p_forced_style->f_font_relsize;
if( var_InheritBool( p_filter, "freetype-bold" ) )
{
......
......@@ -464,7 +464,7 @@ int ConvertToLiveSize( filter_t *p_filter, const text_style_t *p_style )
}
else if ( p_style->f_font_relsize )
{
i_font_size = (int) p_filter->fmt_out.video.i_height * p_style->f_font_relsize;
i_font_size = (int) p_filter->fmt_out.video.i_height * p_style->f_font_relsize / 100;
}
if( p_sys->i_scale != 100 )
......
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