forked from AuroraMiddleware/gtk
gtk-demo: Follow font settings again
highlight puts font and size information into its pango markup; strip that out to make our text follow font settings again.
This commit is contained in:
parent
c60fba0267
commit
2a3d3ec079
@ -328,8 +328,13 @@ fontify (const char *format,
|
||||
{
|
||||
char *markup;
|
||||
gsize len;
|
||||
char *p;
|
||||
|
||||
markup = g_bytes_unref_to_data (bytes, &len);
|
||||
/* highlight puts a span with font and size around its output,
|
||||
* which we don't want.
|
||||
*/
|
||||
for (p = markup + strlen ("<span "); *p != '>'; p++) *p = ' ';
|
||||
gtk_text_buffer_delete (source_buffer, &start, &end);
|
||||
gtk_text_buffer_insert_markup (source_buffer, &start, markup, len);
|
||||
g_free (markup);
|
||||
|
Loading…
Reference in New Issue
Block a user