Answers.Body: <p>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 <a href="https://books.google.com/books?id=z0zpvR5QNvsC&amp;pg=PA135&amp;lpg=PA135&amp;dq=epub%20font%20obfuscation&amp;source=bl&amp;ots=bQS5Z6mfZr&amp;sig=SuQpoarPIA4cRq9ndsosZpA-nGQ&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwiHgvz9prDTAhWGwiYKHUmpAhYQ6AEIZjAJ#v=onepage&amp;q=epub%20font%20obfuscation&amp;f=false" rel="nofollow noreferrer">Adobe Indesign obfuscates fonts when it creates epubs</a>. </p>
  
  <p><a href="http://www.idpf.org/epub/20/spec/FontManglingSpec.html" rel="nofollow noreferrer">http://www.idpf.org/epub/20/spec/FontManglingSpec.html</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-19T12:08:17.683Z
Answers.Text: 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?**
Answers.UserDisplayName: ioniJS
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-19T22:52:16.053Z
Answers.Text: The answer is simple: you can't!  (Er, unless there are special tools to crack the obfuscation).
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-20T07:24:20.913Z
Answers.Text: 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.
Answers.UserDisplayName: ioniJS
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-19T10:33:00.343Z
Answers.LastActivityDate: 2017-04-19T10:33:00.343Z
Answers.UserDisplayName: idiotprogrammer
Body: <p>I have an <code>.epub</code> from which I want to extract its embedded fonts.<br>
  I've tried to unzip the <code>.epub</code>, and found the fonts in <code>.otf</code> and <code>.ttf</code> format in the <code>OEBPS/Fonts</code> directory; when I try to open some of them I get an error that says that they are malformed.</p>
  
  <p>This happens to me with all the epubs, however in the epub viewer the fonts look good.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-18T11:55:35.297Z
Comments.Text: What operating system are you using? Are the ebooks encumbered by DRM?
Comments.UserDisplayName: Sekhemty
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-18T13:56:25.703Z
Comments.Text: 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.
Comments.UserDisplayName: ioniJS
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-18T14:36:10.567Z
Comments.Text: Can you still regularly open other extracted files? Like the html, css and pictures?
Comments.UserDisplayName: Sekhemty
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-18T16:02:27.157Z
Comments.Text: 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.
Comments.UserDisplayName: ioniJS
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-19T11:50:28.347Z
Comments.Text: 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.
Comments.UserDisplayName: Sekhemty
Tags: <epub><fonts>
Title: Fonts malformed when extracted from epub files
UserDisplayName: ioniJS
ThreadText: # Fonts malformed when extracted from epub files
  
  (Asked by: username_0 on 2017-04-18)
  
  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.
  
  **Tags:** epub, fonts
  
  > **Comments:**
  > **username_1**: What operating system are you using? Are the ebooks encumbered by DRM?  
  > **username_0**: 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.  
  > **username_1**: Can you still regularly open other extracted files? Like the html, css and pictures?  
  > **username_0**: 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.  
  > **username_1**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-04-19. Score: 1 | Accepted answer
  
  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](https://books.google.com/books?id=z0zpvR5QNvsC&pg=PA135&lpg=PA135&dq=epub%20font%20obfuscation&source=bl&ots=bQS5Z6mfZr&sig=SuQpoarPIA4cRq9ndsosZpA-nGQ&hl=en&sa=X&ved=0ahUKEwiHgvz9prDTAhWGwiYKHUmpAhYQ6AEIZjAJ#v=onepage&q=epub%20font%20obfuscation&f=false).
  
  <http://www.idpf.org/epub/20/spec/FontManglingSpec.html>
  
  > **Comments:**
  > **username_0**: Thanks for your answer! I can open it on the mac, but I can not convert the fonts with ttf2woff, as @username_2 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?**  
  > **username_2**: The answer is simple: you can't!  (Er, unless there are special tools to crack the obfuscation).  
  > **username_0**: 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.  
  
  ---
  
  