diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-22 13:56:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 13:56:51 -0500 |
commit | 082488a81c491faa71ddc2c87fe985ef28f5d69d (patch) | |
tree | ee7316a573d5feb5332bb5cef509bd37faf5bcf7 /swaylock/render.c | |
parent | Merge pull request #2660 from RyanDwyer/fix-scratchpad-iteration (diff) | |
parent | swaybar, swaylock, & tree/container: Set cairo font options to render text an... (diff) | |
download | sway-082488a81c491faa71ddc2c87fe985ef28f5d69d.tar.gz sway-082488a81c491faa71ddc2c87fe985ef28f5d69d.tar.zst sway-082488a81c491faa71ddc2c87fe985ef28f5d69d.zip |
Merge pull request #2677 from ggreer/pretty-fonts
Render fonts slightly nicer
Diffstat (limited to 'swaylock/render.c')
-rw-r--r-- | swaylock/render.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/swaylock/render.c b/swaylock/render.c index 66c55965..fa8832bd 100644 --- a/swaylock/render.c +++ b/swaylock/render.c | |||
@@ -39,6 +39,13 @@ void render_frame(struct swaylock_surface *surface) { | |||
39 | } | 39 | } |
40 | 40 | ||
41 | cairo_t *cairo = surface->current_buffer->cairo; | 41 | cairo_t *cairo = surface->current_buffer->cairo; |
42 | cairo_set_antialias(cairo, CAIRO_ANTIALIAS_BEST); | ||
43 | cairo_font_options_t *fo = cairo_font_options_create(); | ||
44 | cairo_font_options_set_hint_style(fo, CAIRO_HINT_STYLE_FULL); | ||
45 | cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_SUBPIXEL); | ||
46 | cairo_font_options_set_subpixel_order(fo, to_cairo_subpixel_order(surface->subpixel)); | ||
47 | cairo_set_font_options(cairo, fo); | ||
48 | cairo_font_options_destroy(fo); | ||
42 | cairo_identity_matrix(cairo); | 49 | cairo_identity_matrix(cairo); |
43 | 50 | ||
44 | cairo_save(cairo); | 51 | cairo_save(cairo); |