mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
PDF Output: Disable subsetting of embedded TrueType fonts to workaround a bug in chromium as of Qt 6.7.2
This commit is contained in:
parent
4232224213
commit
3d477b904c
@ -843,6 +843,10 @@ def merge_font_files(fonts, log):
|
||||
descendant_fonts = [f for f in fonts if f['Subtype'] != 'Type0']
|
||||
total_size = sum(len(f['Data']) for f in descendant_fonts)
|
||||
merged_sfnt = merge_truetype_fonts_for_pdf(tuple(f['sfnt'] for f in descendant_fonts), log)
|
||||
if False:
|
||||
# As of Qt 6.7.2 webengine produces W arrays that do not contain all
|
||||
# used glyph ids, so we cannot subset. Can be tested by
|
||||
# echo 'this is a test boulder sentence' > test.txt; ebook-convert test.txt .pdf
|
||||
w_arrays = tuple(filter(None, (f['W'] for f in descendant_fonts)))
|
||||
glyph_ids = all_glyph_ids_in_w_arrays(w_arrays, as_set=True)
|
||||
h_arrays = tuple(filter(None, (f['W2'] for f in descendant_fonts)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user