From c495164f6059d8f352afeead86a510365cc802a1 Mon Sep 17 00:00:00 2001 From: Geoff Greer Date: Thu, 20 Sep 2018 20:37:08 -0700 Subject: swaybar, swaylock, & tree/container: Set cairo font options to render text and lines with subpixel hinting (if available). --- include/cairo.h | 2 ++ include/swaybar/bar.h | 1 + include/swaylock/swaylock.h | 1 + 3 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/cairo.h b/include/cairo.h index 31672705..86530b60 100644 --- a/include/cairo.h +++ b/include/cairo.h @@ -2,8 +2,10 @@ #define _SWAY_CAIRO_H #include #include +#include void cairo_set_source_u32(cairo_t *cairo, uint32_t color); +cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel); cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image, int width, int height); diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 4065fb8b..29e96159 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h @@ -81,6 +81,7 @@ struct swaybar_output { uint32_t width, height; int32_t scale; + enum wl_output_subpixel subpixel; struct pool_buffer buffers[2]; struct pool_buffer *current_buffer; }; diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h index 950cfaaf..2f0cd34d 100644 --- a/include/swaylock/swaylock.h +++ b/include/swaylock/swaylock.h @@ -82,6 +82,7 @@ struct swaylock_surface { bool frame_pending, dirty; uint32_t width, height; int32_t scale; + enum wl_output_subpixel subpixel; char *output_name; struct wl_list link; }; -- cgit v1.2.3-54-g00ecf