ebook-convert failing on file with embedded font

Bug #1518678 reported by Ns-ubuntu on 2015-11-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Found In:
ebook-convert (calibre 2.44.1) on Fedora 22

Steps To Reproduce:
1. Start with an epub that includes an embedded font. e.g. dowload the epub from here: https://www.moozvine.com/publication/kenliu/1 (Click 'Read' and then 'ePub'); or use the file attached to this bug.
2. Attempt to convert it to a PDF with:
> ebook-convert ./AltogetherElsewhereVastHerdsOfReindeer.epub out.pdf

1. out.pdf is produced with the font from the epub embedded.
2. No errors reported to console; exit status is 0

1. No out.pdf is produced
2. command completes with exit status 1 and reports errors from the .../sfnt/metrics.py script due to a missing 'full_name' key in the self.names dict:

Traceback (most recent call last):
  File "site-packages/calibre/ebooks/pdf/render/engine.py", line 37, in errh
  File "site-packages/calibre/ebooks/pdf/render/engine.py", line 267, in drawTextItem
  File "site-packages/calibre/ebooks/pdf/render/serialize.py", line 387, in draw_glyph_run
  File "site-packages/calibre/ebooks/pdf/render/fonts.py", line 214, in add_font
  File "site-packages/calibre/ebooks/pdf/render/fonts.py", line 119, in __init__
  File "site-packages/calibre/utils/fonts/sfnt/metrics.py", line 64, in postscript_name
KeyError: u'full_name'

Ns-ubuntu (ns-ubuntu) wrote :

The fonts in the epub file are damaged, probably by whatever software
was used to subset them. Replace them with the non subsetted versions
using the calibre editor and they will convert fine.

If I have a moment, I will look into trying to work around the damage in
the conversion engine.

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers