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
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue