Skip to content

Commit

Permalink
fix the font antialiasing for the "points" tool (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
maoschanz committed Mar 7, 2024
1 parent be80230 commit b3f03c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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. <[email protected]> Sat, 16 Mar 2024 13:12:00 +0100
Expand Down
6 changes: 5 additions & 1 deletion src/tools/classic_tools/tool_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b3f03c8

Please sign in to comment.