From 00ba3b8066dafcc66f585f82998f9bd190e6032a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Mar 2025 10:20:40 +0530 Subject: [PATCH] Use Math.round() for font size incrememnt Slightly improves #2105390 --- src/pyj/read_book/prefs/font_size.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/read_book/prefs/font_size.pyj b/src/pyj/read_book/prefs/font_size.pyj index 6232308e7a..8b415a4070 100644 --- a/src/pyj/read_book/prefs/font_size.pyj +++ b/src/pyj/read_book/prefs/font_size.pyj @@ -52,7 +52,7 @@ def change_font_size_by(frac): amt = sz * frac if abs(amt) < 1: amt = -1 if amt < 0 else 1 - nsz = int(sz + amt) + nsz = Math.round(sz + amt) nsz = max(MIN_FONT_SIZE, min(nsz, MAX_FONT_SIZE)) change_font_size(nsz)