mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
PDF Output: Ignore 4 byte differences in glyph sizes when merging. Fixes #1846982 [Conversion from ePub to PDF fails](https://bugs.launchpad.net/calibre/+bug/1846982)
This commit is contained in:
parent
2207a86ea7
commit
e6b44cf5fa
@ -27,7 +27,7 @@ def merge_truetype_fonts_for_pdf(*fonts):
|
||||
if prev_glyph_data is None:
|
||||
all_glyphs[glyph_id] = glyf.glyph_data(offset, sz, as_raw=True)
|
||||
else:
|
||||
if sz != len(prev_glyph_data):
|
||||
if abs(sz - len(prev_glyph_data)) > 4:
|
||||
raise GlyphSizeMismatch('Size mismatch for glyph id: {} prev_sz: {} sz: {}'.format(glyph_id, len(prev_glyph_data), sz))
|
||||
|
||||
glyf = ans[b'glyf']
|
||||
|
Loading…
x
Reference in New Issue
Block a user