PDF Output: Turn off font hinting in WebKit

Requires a patched Qt WebKit, which will be available in the calibre 3
binary builds.
This commit is contained in:
Kovid Goyal 2016-09-02 14:45:56 +05:30
parent be785b1143
commit 01c21e3a2b

View File

@ -120,6 +120,9 @@ class PDFOutput(OutputFormatPlugin):
def convert(self, oeb_book, output_path, input_plugin, opts, log):
from calibre.gui2 import must_use_qt, load_builtin_fonts
# Turn off hinting in WebKit (requires a patched build of QtWebKit)
os.environ['CALIBRE_WEBKIT_NO_HINTING'] = '1'
try:
must_use_qt()
load_builtin_fonts()
@ -143,6 +146,8 @@ class PDFOutput(OutputFormatPlugin):
else:
log.debug('Converting input as a text based book...')
self.convert_text(oeb_book)
finally:
os.environ.pop('CALIBRE_WEBKIT_NO_HINTING', None)
def convert_images(self, images):
from calibre.ebooks.pdf.writer import ImagePDFWriter