epub.js icon indicating copy to clipboard operation
epub.js copied to clipboard

Failed to decode downloaded font

Open nelhop opened this issue 5 years ago • 4 comments

I am displaying a epub with embedded fonts. They get correctly defined in the CSS and are available under the given URL, but fails do decode.

blob:http://localhost:3000/20cc7aa3-45ab-4f77-b273-1c770fb8de94:

@font-face {
  font-family:"Frutiger LT Std 55 Roman";
  font-style:normal;
  font-weight:800;
  src : url("blob:http://localhost:3000/f8418547-78cc-4f3f-93de-a32dacf24ac8");
}

Console:

Failed to decode downloaded font: blob:<URL>
Failed to decode downloaded font: blob:http://localhost:3000/f8418547-78cc-4f3f-93de-a32dacf24ac8
Failed to decode downloaded font: blob:http://localhost:3000/3f521e5e-2cd9-491b-b4d3-0850ea1d0aa6
Failed to decode downloaded font: blob:http://localhost:3000/c9c7c810-2621-45e3-987a-4d61ca739571
Failed to decode downloaded font: blob:http://localhost:3000/ef71d190-252e-4d22-a7eb-d1c6770a738d
... 40 more
OTS parsing error: invalid version tag
... 43 more

How can this be fixed?

nelhop avatar Mar 06 '19 10:03 nelhop

Have you got an epub you could send me to test?

fchasen avatar Mar 07 '19 23:03 fchasen

Is solved?

emreeebozkurt avatar Jun 14 '20 16:06 emreeebozkurt

I see this when loading in a fixed layout book with obfuscated fonts. In my case, Adobe fonts in an epub exported through InDesign. Browser fails to read obfuscated font file and falls back to a default font. Not seeing any implementation for encryption.xml in this project.

ryspck avatar Nov 01 '21 14:11 ryspck

Is there any lead on how to implement the encryption.xml file in epubjs? I'm running into this right now and even if I delete the encryption.xml file it still gets the above error and the layout still looks odd.

Some digging I found this resource. https://www.w3.org/publishing/epub3/epub-ocf.html#obfus-algorithm

Where would this be implemented?

Subliminalman avatar May 31 '22 22:05 Subliminalman