From 22acded7a21346826bcc1501f23fe6bf29faa4f2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Jul 2020 13:42:09 +0530 Subject: [PATCH] Viewer: Fix using a very small font step size not working. Fixes #1888609 [If I reduce font size below 10, then keyboard shortcut to increase font size stops working](https://bugs.launchpad.net/calibre/+bug/1888609) --- src/pyj/read_book/prefs/font_size.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/prefs/font_size.pyj b/src/pyj/read_book/prefs/font_size.pyj index 5de1076b51..40ebe2e33c 100644 --- a/src/pyj/read_book/prefs/font_size.pyj +++ b/src/pyj/read_book/prefs/font_size.pyj @@ -49,6 +49,8 @@ def change_font_size_by(frac): sd = get_session_data() sz = sd.get('base_font_size') amt = sz * frac + if abs(amt) < 1: + amt = -1 if amt < 0 else 1 nsz = int(sz + amt) nsz = max(MIN_FONT_SIZE, min(nsz, MAX_FONT_SIZE)) change_font_size(nsz)