readium-js: Font decryption fails

I have deployed the Readium cloud reader on my web server, and noticed that encrypted fonts don’t render. After playing around with the epub contents and stepping through the Readium-JS code, I found out that if you remove the prefix enc: from all elements in the encryption.xml file, it works. The issue is in the encryption_handler.js file where jQuery is used. As you can see, it does not include looking for the nodes with the enc: (namespace?) prefix. You can see an example encryption.xml file from the spec here, and it includes the enc: prefixes. My EPUB was created with Sigil 0.9.7 and uses Adobe’s method. IDPF’s method gives the same result.

This issue is a Bug

Expected Behaviour

Decode the fonts as expected.

Observed behaviour

Doesn’t decode the fonts and shows the fallback font.

Steps to reproduce

  1. Create an ebook with Sigil
  2. Add a font (otf or ttf) and make a css font-face and use it in the ebook
  3. Apply Adobe or IDPF’s protection
  4. Save and open with Readium

Test file(s)

EPUB with enc: prefixes: https://books.djazz.se/epub_content/project_sunflower/notworking.epub EPUB with the prefixes removed: https://books.djazz.se/epub_content/project_sunflower/working.epub Online version with enc: prefixes: https://books.djazz.se/?epub=epub_content%2Fproject_sunflower The font is Adobe Garamond Pro (subsetted). Ebook shared with permission.

Product

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments