mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
swaybar, swaylock, & tree/container: Set cairo font options to render text and lines with subpixel hinting (if available).
This commit is contained in:
parent
eae42606e2
commit
c495164f60
9 changed files with 53 additions and 5 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue