diff options
| -rw-r--r-- | sway/tree/container.c | 9 | ||||
| -rw-r--r-- | swaybar/render.c | 9 | 
2 files changed, 14 insertions, 4 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 0c40af0a..d6c9a945 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -459,8 +459,13 @@ static void update_title_texture(struct sway_container *con,  	cairo_set_antialias(c, 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(output->wlr_output->subpixel)); +	if (output->wlr_output->subpixel == WL_OUTPUT_SUBPIXEL_NONE) { +		cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_GRAY); +	} else { +		cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_SUBPIXEL); +		cairo_font_options_set_subpixel_order(fo, +			to_cairo_subpixel_order(output->wlr_output->subpixel)); +	}  	cairo_set_font_options(c, fo);  	get_text_size(c, config->font, &width, NULL, NULL, scale,  			config->pango_markup, "%s", con->formatted_title); diff --git a/swaybar/render.c b/swaybar/render.c index ea5faef6..3a626e1c 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -698,8 +698,13 @@ void render_frame(struct swaybar_output *output) {  	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(output->subpixel)); +	if (output->subpixel == WL_OUTPUT_SUBPIXEL_NONE) { +		cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_GRAY); +	} else { +		cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_SUBPIXEL); +		cairo_font_options_set_subpixel_order(fo, +			to_cairo_subpixel_order(output->subpixel)); +	}  	cairo_set_font_options(cairo, fo);  	cairo_font_options_destroy(fo);  	cairo_save(cairo);  | 
