From 5cf14b4f271023bf0af6b8c6f785afd9e5029900 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 16 Apr 2025 22:02:56 +0100 Subject: [PATCH] GTK: slightly reword a comment to reflect Cairo documentation The Cairo documentation is clear that cairo_set_antialias() only affects shape drawing and not text rendering. To change anti-aliasing settings for font rendering you need cairo_font_options_set_antialias() instead. Therefore the comment can be a bit more certain than just describing what Cairo "appears" to do. --- unix/window.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/unix/window.c b/unix/window.c index 9d5b3fd3..6029a9f4 100644 --- a/unix/window.c +++ b/unix/window.c @@ -923,10 +923,12 @@ static void cairo_setup_draw_ctx(GtkFrontend *inst) cairo_set_line_width(inst->uctx.u.cairo.cr, 1.0); cairo_set_line_cap(inst->uctx.u.cairo.cr, CAIRO_LINE_CAP_SQUARE); cairo_set_line_join(inst->uctx.u.cairo.cr, CAIRO_LINE_JOIN_MITER); - /* This antialiasing setting appears to be ignored for Pango - * font rendering but honoured for stroking and filling paths; - * I don't quite understand the logic of that, but I won't - * complain since it's exactly what I happen to want */ + /* + * This antialiasing setting doesn't affect Pango font rendering + * but does affect stroking and filling paths; I don't quite + * understand the logic of that, but I won't complain since it's + * exactly what I happen to want. + */ cairo_set_antialias(inst->uctx.u.cairo.cr, CAIRO_ANTIALIAS_NONE); } #endif