epub.js
epub.js copied to clipboard
Failed to decode downloaded font
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?
Have you got an epub you could send me to test?
Is solved?
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.
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?