Sfoglia il codice sorgente

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).
jp9000 10 anni fa
parent
commit
667768b96b
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      plugins/text-freetype2/text-freetype2.c

+ 1 - 0
plugins/text-freetype2/text-freetype2.c

@@ -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);