mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
be785b1143
commit
01c21e3a2b
@ -120,6 +120,9 @@ class PDFOutput(OutputFormatPlugin):
|
|||||||
|
|
||||||
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
||||||
from calibre.gui2 import must_use_qt, load_builtin_fonts
|
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()
|
must_use_qt()
|
||||||
load_builtin_fonts()
|
load_builtin_fonts()
|
||||||
|
|
||||||
@ -143,6 +146,8 @@ class PDFOutput(OutputFormatPlugin):
|
|||||||
else:
|
else:
|
||||||
log.debug('Converting input as a text based book...')
|
log.debug('Converting input as a text based book...')
|
||||||
self.convert_text(oeb_book)
|
self.convert_text(oeb_book)
|
||||||
|
finally:
|
||||||
|
os.environ.pop('CALIBRE_WEBKIT_NO_HINTING', None)
|
||||||
|
|
||||||
def convert_images(self, images):
|
def convert_images(self, images):
|
||||||
from calibre.ebooks.pdf.writer import ImagePDFWriter
|
from calibre.ebooks.pdf.writer import ImagePDFWriter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user