Special case zero font size when calculating columns per screen in paged mode

This commit is contained in:
Kovid Goyal 2023-01-24 11:55:36 +05:30
parent ce49025770
commit 603dcc777e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -152,6 +152,9 @@ def cps_by_em_size():
ans = cps_by_em_size.ans
fs = window.getComputedStyle(document.body).fontSize
if not ans or cps_by_em_size.at_font_size is not fs:
if fs is 0:
ans = cps_by_em_size.ans = 16
else:
d = document.createElement('span')
d.style.position = 'absolute'
d.style.visibility = 'hidden'