swaybar, swaylock, & tree/container: Set cairo font options to render text and lines with subpixel hinting (if available).

This commit is contained in:
Geoff Greer 2018-09-20 20:37:08 -07:00
parent eae42606e2
commit c495164f60
9 changed files with 53 additions and 5 deletions

View file

@ -2,8 +2,10 @@
#define _SWAY_CAIRO_H
#include <stdint.h>
#include <cairo/cairo.h>
#include <wlr/types/wlr_output.h>
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);

View file

@ -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;
};

View file

@ -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;
};