text-freetype2: Refresh glype cache after file update

When updating text from file periodically, newer glyphs that weren't
already cached would not end up being rendered.  This fixes the issue by
calling cache_glyphs after the file has been updated.

How to reproduce the original issue:
Set a text-freetype2 source to load an english-only text file.  Then
overwrite the text in the file with non-english characters.  The
non-english characters will then fail to render.

Reported at https://obsproject.com/mantis/view.php?id=336

Closes jp9000/obs-studio#481
This commit is contained in:
Copy Liu
2015-09-29 23:32:00 +08:00
committed by jp9000
parent bdfb52410c
commit c4f5769df4

View File

@@ -227,6 +227,7 @@ static void ft2_video_tick(void *data, float seconds)
else
load_text_from_file(srcdata,
srcdata->text_file);
cache_glyphs(srcdata, srcdata->text);
set_up_vertex_buffer(srcdata);
}
}