Skip to content
Permalink
Browse files

Use gdk screen resolution for font in keyboard status notification ic…

…on, to get correct scaling on HiPDI displays.
  • Loading branch information...
Oliver Mangold authored and raveit65 committed Feb 17, 2018
1 parent 12341e4 commit 05c064eaa74e03ac9558a3c91c23355600eb584f
Showing with 5 additions and 0 deletions.
  1. +5 −0 libmatekbd/matekbd-status.c
@@ -159,6 +159,7 @@ matekbd_status_render_cairo (cairo_t * cr, int group)
PangoLayout *pl;
int lwidth, lheight;
gchar *layout_name, *lbl_title;
double screen_res;
cairo_font_options_t *fo;
static GHashTable *ln2cnt_map = NULL;

@@ -186,6 +187,10 @@ matekbd_status_render_cairo (cairo_t * cr, int group)

pcc = pango_cairo_create_context (cr);

screen_res = gdk_screen_get_resolution (gdk_screen_get_default ());
if (screen_res > 0)
pango_cairo_context_set_resolution (pcc, screen_res);

fo = cairo_font_options_copy (gdk_screen_get_font_options
(gdk_screen_get_default ()));
/* SUBPIXEL antialiasing gives bad results on in-memory images */

0 comments on commit 05c064e

Please sign in to comment.
You can’t perform that action at this time.