From b3f03c81e59c42faebe60c1371a57799af9973a4 Mon Sep 17 00:00:00 2001 From: RomainFT Date: Thu, 7 Mar 2024 22:50:45 +0100 Subject: [PATCH] fix the font antialiasing for the "points" tool (#458) --- debian/changelog | 1 + src/tools/classic_tools/tool_points.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index eaa516a6..c27a506f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ drawing (1.2.0) unstable; urgency=low * update the user help manual * preserve transparency of the original area when skewing with a solid background color * add "circle" and "checkmark" options to the "points" tool (#458) + * fix the font antialiasing for the "points" tool (#458) * update several translations -- Romain F. T. Sat, 16 Mar 2024 13:12:00 +0100 diff --git a/src/tools/classic_tools/tool_points.py b/src/tools/classic_tools/tool_points.py index 3e25a69d..68dfe9d3 100644 --- a/src/tools/classic_tools/tool_points.py +++ b/src/tools/classic_tools/tool_points.py @@ -168,8 +168,12 @@ def do_tool_operation(self, operation): if number is None: return - # Text size + # Text size and options cairo_context.set_font_size(max(1, int(point_width * 0.8))) + if not operation['antialias']: + options = cairo.FontOptions() + options.set_antialias(cairo.Antialias.NONE) + cairo_context.set_font_options(options) # Coordinates if number < 10: