• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Embedded fonts do not display properly in ADE 4.5.5! Bug?

Explorer ,
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

Software and environment
Windows 10
Adobe InDesign CS6
Calibre 2.85.1 (64 bit)
Adobe Digital Editions 4.5.5

Summary of problem 1
My EPUB produced in InDesign has embedded fonts. When I work on my EPUB in Calibre Editor and save the embedded fonts are no longer recognised in ADE. The Latin font I am using is Gentium (download: http://software.sil.org/gentium/download). I am also using a non-Latin font for a RTL language.

Steps to reproduce problem 1
1) Make book in InDesign and export to EPUB 2.0.1
2) Open file in ADE...everything works fine
3) Open file in Calibre Editor using default preferences
4) Make a change and undo it
5) Save EPUB
6) Open EPUB in ADE
7) The embedded fonts are no longer recognised!!

Fix to problem 1 and subsequent problem 2

1) Make book in InDesign and export to EPUB 2.0.1, do not embed fonts

2) Open file in Calibre Editor using default preferences, embed fonts

3) Save EPUB

4) Open EPUB in ADE

5) The fonts have embedded and can be seen in ADE but the bold weight is no longer recognised!!

Report

The Calibre developer kindly looked into this for me and says as follows:

1) The epub with embedded fonts from InDesign declares it is using the
IDPF font obfuscation algorithm but is not actually using it. At least
trying to de-obfuscate the fonts with it does not work. I'm guessing they
are using some unholy combination of the IDPF and their own obfuscation
algorithm. This is why resaving the file with the editor breaks the
fonts.

2) When embeddeding the fonts without obfuscation using the editor, I
noticed that ADE renders [one character] as bold, but nothing else.

Which means it is successfully loading the font. So this is definitely an ADE bug.

Views

3.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 15, 2017 Jun 15, 2017

Copy link to clipboard

Copied

I have found another way to break the way an EPUB displays embedded fonts in ADE: unzip and rezip!

No matter how I try to unzip and rezip an EPUB made in InDesign, there are problems when viewing the embedded fonts in the rezipped EPUB in ADE.

I think it is quite normal to want to unzip an EPUB to modify the source files and to then rezip it. But this is not possible if I want to maintain compatability with ADE.

Now, I could avoid unzipping the EPUB and work within the archive to edit the source files. However, when I finish editing and save the files it creates the problem that the mimetype file in the EPUB archive is no longer recognised as the first to be added to the archive and this causes a validity problem according to the IDPF specifications.

The only way to avoid this that I can see is to re-make the ZIP file which the EPUB is based on but then we end up in a circle because the font embedding breaks for ADE!

Here is what IDPF say about the mimetype file:

mimetype entry missing or not the first in archive

A valid EPUB file must contain an uncompressed file named mimetype as a first entry in the zip archive. That file must contain EPUB mime type (application/epub+zip).

Errors · IDPF/epubcheck Wiki · GitHub

In the next post I will post a full list of the tedious steps to show I have been rigorous in unzipping and rezipping.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 15, 2017 Jun 15, 2017

Copy link to clipboard

Copied

LATEST

EPUB unzip and re-zip in Windows 10

  1. EPUB 2.0.1 export from InDesign with embedded fonts (Arabic and Latin). EUPUB files reads fine in ADE 4.5.5 and other readers.
  2. Extension of EPUB file changed to ZIP in Windows Explorer.
  3. ZIP file archive extracted in Windows Explorer.
  4. Attempt recompression. Mimetype file sent to zipped first (to avoid EPUB validation error).
  5. META-INF and OEBPS folder sent to same archive.
  6. Attempt EPUB validation. No problems found.
  7. Attempt to open in ADE. Fonts not embedded. Arabic font no longer displaying correctly (most of the characters are white but selectable and can be successfully copy and pasted)

Zipping&Embedding-Issue-Capture.JPG

EPUB unzip and re-zip with 7ZIP (no compression)

  1. Right click on EPUB in Windows Explorer and extract using the option provided by 7Zip
  2. Open unzipped folder in Windows Explorer. Right click on mimetype file and use the 7Zip option to “add to archive…”
  3. When 7Zip option windows pops up select archive format as “zip” and compression level as “Store” (uncompressed). Click OK.
  4. In Windows Explorer, copy META-INF and OEBPS folder to mimetype zip file archive.
  5. Rename ZIP to EPUB.
  6. Attempt EPUB validation. No problems found.
  7. Attempt to open in ADE. Same problem about font embedding and display.

EPUB unzip and re-zip with 7ZIP (no compression) (variation 1 to use 7zip exclusively)

  1. Right click on EPUB in Windows Explorer and extract using the option provided by 7Zip
  2. Open unzipped folder in Windows Explorer. Right click on mimetype file and use the 7Zip option to “add to archive…”
  3. When 7Zip option windows pops up select archive format as “zip” and compression level as “Store” (uncompressed). Click OK.
  4. 4.       In Windows Explorer, right click on META-INF and OEBPS folders to use 7Zip option to add to the mimetype zip file archive just created. Use zip compression and the “store” compression level
  5. Rename ZIP to EPUB.
  6. Attempt EPUB validation. Error: Mimetype file not first in archive.
  7. Attempt to open in ADE. Fonts readable and display is fine

EPUB unzip and re-zip with 7ZIP (no compression) (variation 2 to use 7zip exclusively)

  1. Right click on EPUB in Windows Explorer and extract using the option provided by 7Zip
  2. Open unzipped folder in Windows Explorer. Right click on mimetype file and use the 7Zip option to “add to archive…”
  3. When 7Zip option windows pops up select archive format as “zip” and compression level as “Store” (uncompressed). Click OK.
  4. 4.       In Windows Explorer, right click on META-INF and OEBPS folders to use 7Zip option to add to the mimetype zip file archive just created. Use zip compression and the “normal” compression level
  5. Rename ZIP to EPUB.
  6. Attempt EPUB validation. Error: Mimetype file not first in archive.
  7. Attempt to open in ADE. Same problem about font embedding and display.

EPUB unzip and re-zip with Winrar (no compression)

  1. Navigate to folder where EPUB is saved in Winrar
  2. Right click on EPUB file and select “Extract to specified folder”
  3. Open extracted folder in Winrar. Right click on mimetype file and use option to “add to files archive…”. Select “zip” and “store” option.
  4. In Winrar add META-INF and OEBPS folder to mimetype. zip file archive. Use “normal” compression
  5. Rename ZIP to EPUB.
  6. Attempt EPUB validation. No problems found.
  7. Attempt to open in ADE. No font embedding and display. This time all Arabic letters a white.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines