Add support for pango markup

master
Drew DeVault 9 years ago
parent 09efe0ce75
commit 2a0836e3bd

@ -8,7 +8,7 @@
PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text) { PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text) {
PangoLayout *layout = pango_cairo_create_layout(cairo); PangoLayout *layout = pango_cairo_create_layout(cairo);
pango_layout_set_text(layout, text, -1); pango_layout_set_markup(layout, text, -1);
PangoFontDescription *desc = pango_font_description_from_string(font); PangoFontDescription *desc = pango_font_description_from_string(font);
pango_layout_set_font_description(layout, desc); pango_layout_set_font_description(layout, desc);
pango_layout_set_single_paragraph_mode(layout, 1); pango_layout_set_single_paragraph_mode(layout, 1);

Loading…
Cancel
Save