Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-11-2013, 11:32 AM   #1
iain robinson
Connoisseur
iain robinson began at the beginning.
 
Posts: 75
Karma: 10
Join Date: Apr 2011
Location: UK
Device: none
embedding fonts using Indesign

Hi all

I believe that Indesign CC now embeds fonts in a way that both ADE and iBooks can understand. Unfortunately we are not ascending to the Creative Cloud and are stuck with Indesign CS5.5 and CS6. Is there any hacking we can do to get ePUBs from these versions of Indesign to have embedded fonts presented in a way both ADE and iBooks can handle? The whole situation about different ways of encrypting/obfuscating fonts seems ridiculous but sadly predictable.

NB I don't want to get into an argument about whether embedding fonts is the right or wrong thing to do - I only want to use it sparingly for some of our jobs.

Any input gratefully received.

thanks
Iain
iain robinson is offline   Reply With Quote
Old 10-11-2013, 11:47 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,316
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Use Sigil. It can help you with font embedding and obfuscating.
JSWolf is offline   Reply With Quote
Advert
Old 10-11-2013, 11:53 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,572
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil allows you to apply and remove both the Adobe and the IDPF font obfuscation schemes. I don't know exactly what ID does differently (I'm certainly assuming they use Adobe's scheme somehow), but perhaps you could use Sigil to remove the existing obfuscation; save and close ... and then reopen and reapply the Adobe font obfuscation, and save.

You have to right-click on each individual font-file in Sigil's book browser to check/uncheck the obfuscation.

That's all just a WAG from guy away from his computer, though. It may accomplish nothing.

I don't have InDesign, but if you could provide a tiny, non-copyright-infringing sample epub with an ID-embedded font, I'd be happy to take a look. Feel free to PM me if you've concerns about such a sample being available on a public forum.
DiapDealer is offline   Reply With Quote
Old 10-11-2013, 11:56 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,316
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Also, if you have to have the fonts viewable in most ePub readers and don't want to "give out" the fonts so others can use them for whatever, you can keep them no obfuscated and use Calibre to subset the fonts such that they only contain the characters in your ePub. This makes the fonts rather useless for any other purpose. Plus, any unused fonts will be removed fully. So if you have a bold italic font and it's not used, it gets removed.
JSWolf is offline   Reply With Quote
Old 10-14-2013, 04:16 AM   #5
iain robinson
Connoisseur
iain robinson began at the beginning.
 
Posts: 75
Karma: 10
Join Date: Apr 2011
Location: UK
Device: none
Thanks guys

DiapDealer - I downloaded the latest version of Sigil and looked at the font obfuscation options. Indesign CS6 uses the IDPF method to obfuscate the fonts (Sigil tells me) - when I change it to the Adobe method and resave the file it crashes Sigil when trying to reopen it(!), the fonts still don't work in iBooks (and no longer works in ADE (2.0.6XXX)). I have attached my sample ePUB if you wanted to look at it (the original one from ID).

JSWolf - thanks for the tip, that could be useful.
Attached Files
File Type: epub sample fonts.epub (93.1 KB, 209 views)
iain robinson is offline   Reply With Quote
Advert
Old 10-14-2013, 07:23 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quick tips. Don't use obfuscating, it will make life only more complex. The other one is that you need an additional file for embedded fonts to work in iBooks called com.apple.ibooks.display-options.xml in the META-INF folder. It needs to contain the line
Code:
<option name="specified-fonts">true</option>
.
Toxaris is offline   Reply With Quote
Old 10-14-2013, 08:27 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,572
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Toxaris
Quick tips. Don't use obfuscating, it will make life only more complex.
I'm not sure there is a way to turn off font obfuscation in InDesign. Which is why embedding fonts with ID seems to be a pain. Without going into the whole "you shouldn't embed fonts anyway" argument, obfuscation might be legally required by the font license.

Quote:
Originally Posted by iain robinson
when I change it to the Adobe method and resave the file it crashes Sigil when trying to reopen it(!), the fonts still don't work in iBooks (and no longer works in ADE (2.0.6XXX))
Sorry you're experiencing that trouble, but I can't recreate it on my system. I can open the epub with Sigil; change (each and every) font to the Adobe obfuscation scheme, and save the epub with no crash.

Clearly it's not going to be very helpful to you until you figure out why Sigil is crashing, but the process does allow the embedded fonts to work as expected in ADE 2.0.

As Toxaris mentioned, embedded fonts don't work on iBooks at all (obfuscated or un-), without that special xml file being added to the meta-inf folder. That's not ID specific. Everybody has to find their own way to get that file in there if they're not using iAuthor. I have no idea what obfuscation schemes iBooks supports though, if any.

EDIT: even if the original InDesign-produced ePub worked in ADE 2.0 as expected, the IDPF font obfuscation scheme won't work in the older version of ADE or the older Adobe RMSDK which is used by the vast majority of the portable devices/apps out there.

Last edited by DiapDealer; 10-14-2013 at 08:32 AM.
DiapDealer is offline   Reply With Quote
Old 10-14-2013, 09:15 AM   #8
iain robinson
Connoisseur
iain robinson began at the beginning.
 
Posts: 75
Karma: 10
Join Date: Apr 2011
Location: UK
Device: none
Thanks guys. I did know about having to add the com.apple.ibooks.display-options.xml file - I tried that and iBooks still wouldn't see the embedded fonts. I don't think iBooks' font embedding implementation is 100% standards compliant (no surprise there).

DiapDealer - the file I sent was the original ePUB. When I converted all the font files to the Adobe method using the latest version of Sigil and then resaved the file it crashed Sigil when I tried to open the resaved file.

I guess I have my answer - it doesn't seem like files from older versions of Indesign can be made to have embedded and obfuscated fonts in a way that iBooks can recognise. Yes, obfuscation is a must - the font license dictates that the font must be embedded in a secure manner which doesn't allow access to the font outside of the ePUB. Although I have discovered I could subset the font using Calibre which doesn't technically disallow access to the font but would make it useless if anyone tried.

I'm really desperate not to have to embed any fonts in this job but I need to know what I'm up against if the client insists.
iain robinson is offline   Reply With Quote
Old 10-14-2013, 09:40 AM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,572
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Also note that if there's any intent to use the epub to convert to the Kindle format, the fonts absolutely can't be obfuscated at the time of conversion. The Kindle distribution platform obfuscates ALL fonts (using their own scheme) before delivery to customers.

With regard to your Sigil crashing issue; if you happen to be using OS X, consider deleting your Sigil.ini file. I have no idea where it's located on a Mac, but there's lots of threads about Sigil crashing on OS X that were solved by deleting that ini file before attempting to restart Sigil.

Last edited by DiapDealer; 10-14-2013 at 09:43 AM.
DiapDealer is offline   Reply With Quote
Old 10-14-2013, 10:18 AM   #10
iain robinson
Connoisseur
iain robinson began at the beginning.
 
Posts: 75
Karma: 10
Join Date: Apr 2011
Location: UK
Device: none
Good point about the Kindle conversion, thanks.
iain robinson is offline   Reply With Quote
Old 10-14-2013, 11:54 AM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,316
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You can use Calibre to subset the fonts and the subsetted fonts will work with KF8 as well as ePub. It's a better way to keep the fonts from being removed and used for other things and no need to obfuscate.
JSWolf is offline   Reply With Quote
Old 10-14-2013, 11:55 AM   #12
iain robinson
Connoisseur
iain robinson began at the beginning.
 
Posts: 75
Karma: 10
Join Date: Apr 2011
Location: UK
Device: none
Thanks JSWolf
iain robinson is offline   Reply With Quote
Old 02-06-2014, 08:15 PM   #13
NIRC
Enthusiast
NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.NIRC ought to be getting tired of karma fortunes by now.
 
Posts: 25
Karma: 2135974
Join Date: Feb 2014
Device: iPad 2
Embedding fonts for epub

I use InDesign 6 and am having trouble embedding fonts (which work fine in the Kindle export of InDesign).
I tried everything I could find on the web, but nothing seems to work just right. Perhaps someone has an idea. I am attaching an epub which shows up perfectly in Adobe Digital Reader 3 but not on the iPad.
I tried replacing the "obfuscated" font for RememberingKana.ttf with the full, original font and deleting the "encryption.xml" file from the META-INF folder, but then other, standard fonts don't work.
I also tried using Sigil to delete the obfuscated font, add the full one, and then encrypt it, but this didn't work either.
Any ideas?
Calibre works to conver mobi to epub, but the layout gets all messed up.
Attached Files
File Type: epub Kana (epub trial).epub (130.7 KB, 175 views)
NIRC is offline   Reply With Quote
Old 03-31-2015, 03:15 PM   #14
nanourbina
Junior Member
nanourbina began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2015
Device: iPad, Kindle
I realize that this thread is quite old, but I have been using InDesign CS6 to produce an ePub with embedded fonts for Kindle and iBooks. (I like to own my software and not rent it, for many reasons). As the originator mentioned, CC does produce ePubs that allow iBooks to display the embedded font correctly, but CS6 does not. I finally figured out why:

CS6 does obfuscate the fonts per the IDPF spec that they specify in the encryption XML document. HOWEVER, before obfuscation, they first compress the font. This is not what the spec calls for (and is probably what they fixed in CC). Thus, in order to use the font produced by CS6 you have to first unobfuscate, then uncompress, and then obfuscate it again (for iBooks). I now have my post-processing script doing this on-the-fly and it works beautifully.
nanourbina is offline   Reply With Quote
Old 04-03-2015, 11:41 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,316
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by nanourbina View Post
I realize that this thread is quite old, but I have been using InDesign CS6 to produce an ePub with embedded fonts for Kindle and iBooks. (I like to own my software and not rent it, for many reasons). As the originator mentioned, CC does produce ePubs that allow iBooks to display the embedded font correctly, but CS6 does not. I finally figured out why:

CS6 does obfuscate the fonts per the IDPF spec that they specify in the encryption XML document. HOWEVER, before obfuscation, they first compress the font. This is not what the spec calls for (and is probably what they fixed in CC). Thus, in order to use the font produced by CS6 you have to first unobfuscate, then uncompress, and then obfuscate it again (for iBooks). I now have my post-processing script doing this on-the-fly and it works beautifully.
iBooks does not need to have font obfuscated to work. But iBooks does need this silly XML file that you keep hidden in the meta-inf directory to tell iBooks you have embedded fonts. In fact, you don't need to obfuscate fonts at all. WHat you can do is subset them so they won't be of any use outside of your eBook. Calibre does a very nice job subletting both TTF and OTF fonts. You just load your eBook into Calibre, subset the fonts and voila. But before you do that, you have to make sure there is no obfuscating going on.

Now because there are some Readers and programs that do not automatically display embedded fonts (not sure what iBooks does as I have not used it in a very long time because it's a fetid pile of fertilizer), you'll want to put a note into your eBook that it does have embedded fonts and the reader (person reading your book) might want to turn on embedded fonts if the devices or program does not do so by default.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
InDesign CS5.5 font embedding problem ralphiedee ePub 7 05-16-2012 11:55 AM
Embedding fonts JaneFancher Calibre 14 04-10-2010 09:28 PM
Embedding fonts AprilHare ePub 6 01-02-2010 11:42 AM
Embedding Fonts with Indesign...... brewt ePub 6 01-01-2009 10:07 PM
Embedding fonts jash Calibre 2 09-09-2008 05:05 PM


All times are GMT -4. The time now is 01:31 AM.


MobileRead.com is a privately owned, operated and funded community.