1

I have an .epub from which I want to extract its embedded fonts.
I've tried to unzip the .epub, and found the fonts in .otf and .ttf format in the OEBPS/Fonts directory; when I try to open some of them I get an error that says that they are malformed.

This happens to me with all the epubs, however in the epub viewer the fonts look good.

  • What operating system are you using? Are the ebooks encumbered by DRM? – Sekhemty Apr 18 '17 at 11:55
  • I'm using ubuntu ubuntu 17.04, and I'm extracting the .epub with right click extract here. Regarding DRM I'm not sure if they are encumbered by DRM. – ioniJS Apr 18 '17 at 13:56
  • Can you still regularly open other extracted files? Like the html, css and pictures? – Sekhemty Apr 18 '17 at 14:36
  • Yes, I can open the other files, and I can open the html that references the fonts and the fonts look good in the browser. I have tried to extract the .epub on a mac and the fonts look good, it does not give me any error, it may be ubuntu problem. – ioniJS Apr 18 '17 at 16:02
  • Yes, it appears to be a problem with your Ubuntu installation. I suppose that this book is a commercial one, but if it is a freely available one I can try to check if this happens to me too (even if I use openSUSE, not Ubuntu); often Linux distros' out-of-the-box installations don't include packages with commercial licenses by default, and these should be added manually; maybe this is the case; but I can't confirm this, like I said, I'm not an Ubuntu user; maybe you can try also on AskUbuntu. – Sekhemty Apr 19 '17 at 11:50
1

There is a feature, font obfuscation, which prevents you from viewing/using any embedded font after unzipping the epub. Whether this has happened in your case is unclear. However, if the epub was created in Indesign, that is likely to be the issue because Adobe Indesign obfuscates fonts when it creates epubs.

http://www.idpf.org/epub/20/spec/FontManglingSpec.html

  • Thanks for your answer! I can open it on the mac, but I can not convert the fonts with ttf2woff, as @idiotprogrammer says the fonts are obfuscated. I confirm it because in the file META-INF/encryption.xml I can see the fonts encrypted with the method: <enc:EncryptedData> <enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding"/> ... Now my question is how can I De-obfuscate the sources? – ioniJS Apr 19 '17 at 12:08
  • The answer is simple: you can't! (Er, unless there are special tools to crack the obfuscation). – idiotprogrammer Apr 19 '17 at 22:52
  • Ok thanks, I have not found anything to crack the obfuscation, I will have to work only with the ttf formats without being able to convert them to woff, I hope they look good in all browsers. – ioniJS Apr 20 '17 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.