diff options
| author | Geoff Greer <geoff@greer.fm> | 2018-09-20 20:37:08 -0700 |
|---|---|---|
| committer | Geoff Greer <geoff@greer.fm> | 2018-09-22 11:34:21 -0700 |
| commit | 1ba79a159e1808630dcd2541fee4772e525725ed (patch) | |
| tree | ea60c905f560a7804dd8113f1b0451074400b04d /render.c | |
| parent | 2376a9c5d788daa9894c7396bb2a6c41dfb5df26 (diff) | |
swaybar, swaylock, & tree/container: Set cairo font options to render text and lines with subpixel hinting (if available).
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -39,6 +39,13 @@ void render_frame(struct swaylock_surface *surface) { } cairo_t *cairo = surface->current_buffer->cairo; + cairo_set_antialias(cairo, CAIRO_ANTIALIAS_BEST); + cairo_font_options_t *fo = cairo_font_options_create(); + cairo_font_options_set_hint_style(fo, CAIRO_HINT_STYLE_FULL); + cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_SUBPIXEL); + cairo_font_options_set_subpixel_order(fo, to_cairo_subpixel_order(surface->subpixel)); + cairo_set_font_options(cairo, fo); + cairo_font_options_destroy(fo); cairo_identity_matrix(cairo); cairo_save(cairo); |
