text-freetype2: Fix garbled rendering if face changed

When using a text file with the source and the font face is changed, it
would cause it to fail to update the glyphs and text accordingly.  It
would trigger an error jump at line 392 of text-freetype2.c, ultimately
resulting in the text to render garbled after that.

How to reproduce:
Set the source to get text from a file, then just change the font face
(but not the size or anything else).
This commit is contained in:
jp9000 2015-10-05 16:20:58 -07:00
parent c4f5769df4
commit 667768b96b

View File

@ -344,6 +344,7 @@ static void ft2_source_update(void *data, obs_data_t *settings)
srcdata->font_name = NULL;
srcdata->font_style = NULL;
srcdata->max_h = 0;
vbuf_needs_update = true;
}
srcdata->font_name = bstrdup(font_name);