Commit ef8b3a7b authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

quartztext: fix relative font size handling

parent c06caaad
...@@ -950,7 +950,18 @@ static offscreen_bitmap_t *Compose(int i_text_align, ...@@ -950,7 +950,18 @@ static offscreen_bitmap_t *Compose(int i_text_align,
static int GetFontSize(filter_t *p_filter) static int GetFontSize(filter_t *p_filter)
{ {
return p_filter->fmt_out.video.i_height / DEFAULT_REL_FONT_SIZE; int i_size = 0;
int i_ratio = var_CreateGetInteger( p_filter, "quartztext-rel-fontsize" );
if( i_ratio > 0 )
i_size = (int)p_filter->fmt_out.video.i_height / i_ratio;
if( i_size <= 0 )
{
msg_Warn( p_filter, "invalid fontsize, using 12" );
i_size = 12;
}
return i_size;
} }
static int RenderYUVA(filter_t *p_filter, subpicture_region_t *p_region, static int RenderYUVA(filter_t *p_filter, subpicture_region_t *p_region,
......
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