mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
ebook-viewer now uses system default fonts on windows. This should fix the bug with truncated characters on the right edge on the screen.
This commit is contained in:
parent
68f801dd24
commit
51f3cb775c
@ -1223,6 +1223,8 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
format = 'LRF'
|
||||
if 'EPUB' in formats:
|
||||
format = 'EPUB'
|
||||
if 'MOBI' in formats:
|
||||
format = 'MOBI'
|
||||
if not formats:
|
||||
d = error_dialog(self, _('Cannot view'),
|
||||
_('%s has no available formats.')%(title,))
|
||||
|
@ -15,6 +15,7 @@ from calibre.utils.config import Config, StringConfig
|
||||
from calibre.gui2.viewer.config_ui import Ui_Dialog
|
||||
from calibre.gui2.viewer.js import bookmarks, referencing
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
from calibre.constants import iswindows
|
||||
|
||||
def load_builtin_fonts():
|
||||
from calibre.ebooks.lrf.fonts.liberation import LiberationMono_BoldItalic
|
||||
@ -56,9 +57,12 @@ def config(defaults=None):
|
||||
help=_('Set the user CSS stylesheet. This can be used to customize the look of all books.'))
|
||||
|
||||
fonts = c.add_group('FONTS', _('Font options'))
|
||||
fonts('serif_family', default='Liberation Serif', help=_('The serif font family'))
|
||||
fonts('sans_family', default='Liberation Sans', help=_('The sans-serif font family'))
|
||||
fonts('mono_family', default='Liberation Mono', help=_('The monospaced font family'))
|
||||
fonts('serif_family', default='Times New Roman' if iswindows else 'Liberation Serif',
|
||||
help=_('The serif font family'))
|
||||
fonts('sans_family', default='Verdana' if iswindows else 'Liberation Sans',
|
||||
help=_('The sans-serif font family'))
|
||||
fonts('mono_family', default='Courier New' if iswindows else 'Liberation Mono',
|
||||
help=_('The monospaced font family'))
|
||||
fonts('default_font_size', default=20, help=_('The standard font size in px'))
|
||||
fonts('mono_font_size', default=16, help=_('The monospaced font size in px'))
|
||||
fonts('standard_font', default='serif', help=_('The standard font type'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user