mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 03:11:27 +00:00
Use pango_layout_set_text instead of pango_layout_set_markup
This commit is contained in:
parent
10ef118e09
commit
2f36502828
|
@ -54,9 +54,11 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const char *font,
|
||||||
PangoLayout *layout = pango_cairo_create_layout(cairo);
|
PangoLayout *layout = pango_cairo_create_layout(cairo);
|
||||||
PangoAttrList *attrs;
|
PangoAttrList *attrs;
|
||||||
if (markup) {
|
if (markup) {
|
||||||
|
char *buf;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
if (pango_parse_markup(text, -1, 0, &attrs, NULL, NULL, &error)) {
|
if (pango_parse_markup(text, -1, 0, &attrs, &buf, NULL, &error)) {
|
||||||
pango_layout_set_markup(layout, text, -1);
|
pango_layout_set_text(layout, buf, -1);
|
||||||
|
free(buf);
|
||||||
} else {
|
} else {
|
||||||
wlr_log(WLR_ERROR, "pango_parse_markup '%s' -> error %s", text,
|
wlr_log(WLR_ERROR, "pango_parse_markup '%s' -> error %s", text,
|
||||||
error->message);
|
error->message);
|
||||||
|
|
Loading…
Reference in a new issue