Commit 9d0665c0 authored by Laurent Aimar's avatar Laurent Aimar

Added (back?) support for automatic font size when using a style in freetype.

It closes the other half of #5375.
parent 5b323eff
...@@ -1453,7 +1453,8 @@ static int ProcessNodes( filter_t *p_filter, ...@@ -1453,7 +1453,8 @@ static int ProcessNodes( filter_t *p_filter,
{ {
rv = PushFont( &p_fonts, rv = PushFont( &p_fonts,
p_font_style->psz_fontname, p_font_style->psz_fontname,
p_font_style->i_font_size, p_font_style->i_font_size > 0 ? p_font_style->i_font_size
: p_sys->i_font_size,
(p_font_style->i_font_color & 0xffffff) | (p_font_style->i_font_color & 0xffffff) |
((p_font_style->i_font_alpha & 0xff) << 24), ((p_font_style->i_font_alpha & 0xff) << 24),
(p_font_style->i_karaoke_background_color & 0xffffff) | (p_font_style->i_karaoke_background_color & 0xffffff) |
...@@ -2349,7 +2350,8 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out, ...@@ -2349,7 +2350,8 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
text_style_t *p_style; text_style_t *p_style;
if( p_region_in->p_style ) if( p_region_in->p_style )
p_style = CreateStyle( p_region_in->p_style->psz_fontname, p_style = CreateStyle( p_region_in->p_style->psz_fontname,
p_region_in->p_style->i_font_size, p_region_in->p_style->i_font_size > 0 ? p_region_in->p_style->i_font_size
: p_sys->i_font_size,
(p_region_in->p_style->i_font_color & 0xffffff) | (p_region_in->p_style->i_font_color & 0xffffff) |
((p_region_in->p_style->i_font_alpha & 0xff) << 24), ((p_region_in->p_style->i_font_alpha & 0xff) << 24),
0x00ffffff, 0x00ffffff,
......
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