diff --git a/modules/text_renderer/freetype/platform_fonts.c b/modules/text_renderer/freetype/platform_fonts.c index 43943ea92ac7a8cc75bcde64e8341604244132ec..72c8d78db81b4e5c2588d6418a002500b63f55f8 100644 --- a/modules/text_renderer/freetype/platform_fonts.c +++ b/modules/text_renderer/freetype/platform_fonts.c @@ -554,7 +554,11 @@ 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 / 100; + unsigned area_height = p_filter->fmt_out.video.i_height; + if (p_filter->fmt_out.video.i_height > p_filter->fmt_out.video.i_width ) + // portrait mode leads to very large text + area_height = p_filter->fmt_out.video.i_width; + i_font_size = (int) area_height * p_style->f_font_relsize / 100; } if( p_sys->i_scale != 100 )