From 2f3650282802a01075f772df0663f170fecca29c Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 22 Sep 2018 18:40:19 +1000 Subject: [PATCH] Use pango_layout_set_text instead of pango_layout_set_markup --- common/pango.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/pango.c b/common/pango.c index dd27991b..5afd72d8 100644 --- a/common/pango.c +++ b/common/pango.c @@ -54,9 +54,11 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, PangoLayout *layout = pango_cairo_create_layout(cairo); PangoAttrList *attrs; if (markup) { + char *buf; GError *error = NULL; - if (pango_parse_markup(text, -1, 0, &attrs, NULL, NULL, &error)) { - pango_layout_set_markup(layout, text, -1); + if (pango_parse_markup(text, -1, 0, &attrs, &buf, NULL, &error)) { + pango_layout_set_text(layout, buf, -1); + free(buf); } else { wlr_log(WLR_ERROR, "pango_parse_markup '%s' -> error %s", text, error->message);