diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-22 18:28:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 18:28:31 -0500 |
commit | c6bf0e8e98724b80d81a0a4e459b9689a3846d13 (patch) | |
tree | cb3ef76852a2022092fa3e34aa24178ee21ed95b | |
parent | 082488a81c491faa71ddc2c87fe985ef28f5d69d (diff) | |
parent | 987e0054ac2b30b3586e36767cc9b18da8d5a8eb (diff) | |
download | sway-c6bf0e8e98724b80d81a0a4e459b9689a3846d13.tar.xz |
Merge pull request #2691 from ggreer/pango-font-options
Call pango_cairo_context_set_font_options().
-rw-r--r-- | common/pango.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/pango.c b/common/pango.c index 5afd72d8..ba74692e 100644 --- a/common/pango.c +++ b/common/pango.c @@ -6,6 +6,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "cairo.h" #include "log.h" #include "stringop.h" @@ -113,6 +114,10 @@ void pango_printf(cairo_t *cairo, const char *font, va_end(args); PangoLayout *layout = get_pango_layout(cairo, font, buf, scale, markup); + cairo_font_options_t *fo = cairo_font_options_create(); + cairo_get_font_options(cairo, fo); + pango_cairo_context_set_font_options(pango_layout_get_context(layout), fo); + cairo_font_options_destroy(fo); pango_cairo_update_layout(cairo, layout); pango_cairo_show_layout(cairo, layout); g_object_unref(layout); |