mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Ignore upto 8 byte glyph data size mismatches when merging identical glyphs. Fixes #1857268 [Private bug](https://bugs.launchpad.net/calibre/+bug/1857268)
This commit is contained in:
parent
7366d9f7d4
commit
89ee458377
@ -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 abs(sz - len(prev_glyph_data)) > 4:
|
||||
if abs(sz - len(prev_glyph_data)) > 8:
|
||||
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