09-12-2016, 05:21 PM | #1 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Font embedding for Apple
I have discovered that Apple, as only Apple can, have complicated font embedding.
I did some research and discovered the following: In order for the font to be recognized, add this to the metadata in the content.opf: Code:
<meta property="ibooks:specified-fonts">true</meta> The in a text editor (I used Notepad), create a text file with the following: Code:
<display_options> <platform name="*"> <!-- allowed values for platform "iphone", "ipad", or "*" for all --> <option name="specified-fonts">true <!-- must be set to "true" for embedded fonts --> </platform> </display_options> But then I found another site, newer date, that stated that for the above to work, I also had to change: Code:
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0"> Code:
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0" prefix="rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"> Is this final step necessary for iBooks to read an embedded font in an ePub built in Sigil? If so, I can edit in Dreamweaver and rezip the file. But wondering if this is an ePub2 versus ePub3 thing. |
09-12-2016, 05:57 PM | #2 |
Grand Sorcerer
Posts: 27,739
Karma: 197700000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Use my plugin to add the com.apple.ibooks.display-options.xml file.
https://www.mobileread.com/forums/sho...d.php?t=272241 It really goes in the META-INF folder (Sigil handles a prexisting com.apple.ibooks.display-options.xml file by showing it as being in the MISC folder), but you can't add files to the META-INF folder with the gui (manually adding it to the MISC folder will never work). As for manually changing the package version, you can't do it. There's more to creating an EPUB3 than changing the package version to "3.0". And the package version is vital to many Sigil routines. That's why it can't be changed after the epub has been created. Luckily there's an output plugin that can convert your EPUB2s to EPUB3s (though this is the first I've heard that embedded fonts will only work in iBooks with EPUB3s). https://www.mobileread.com/forums/sho...d.php?t=250566 As to adding: Code:
prefix="rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/" Last edited by DiapDealer; 09-12-2016 at 06:29 PM. |
Advert | |
|
09-12-2016, 06:45 PM | #3 | ||
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
Quote:
Also, your linked post on the first plugin states "Select a pre-existing (and iBooks valid) XML file using the file dialog..." How does one know if the file created is an iBooks-valid XML file? I made mine in Notepad (using the code provided on a blog post and reproduced above) but I could do it again in Dreamweaver. |
||
09-12-2016, 06:55 PM | #4 | |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
|
|
09-12-2016, 06:58 PM | #5 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Spoke too soon. I do not have Python nor any knowledge of how to use it. Is the plugin available simply as an install in some way?
|
Advert | |
|
09-12-2016, 07:08 PM | #6 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Okay, figured it out:
1. Download zipped file at bottom of post. 2. In Sigil, Plugins > Manage Plugins. 3. Add Plugin. Add zipped file. (Uses bundled Python.) 4. Plugins > Edit > AddiBooksXML. Lovely. Thank you. P.S. I didn't see the attachment at first because I saw the link to GitHub so thought that was where I had to go to get the plugin. Panicked as soon as I read the page. Way over my head. Last edited by eggheadbooks1; 09-12-2016 at 07:11 PM. |
09-12-2016, 07:16 PM | #7 |
Grand Sorcerer
Posts: 27,739
Karma: 197700000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you have a recent version of Sigil, you don't need to have Python installed. Just make sure the "Use Bundled Python" option is checked (in Plugins->Manage Plugins) and download the plugin and install it (using the same Manage Plugins dialog).
Do not unzip or rename any Sigil plugin before installing it. EDIT: I see you figured it out while I was typing my response. |
09-12-2016, 07:46 PM | #8 | |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
Thank you for your help. Problem has now been solved. Much appreciated. *&^%$ Apple. This is just like them to demand nonsense like this. What was wrong with the standard font-embedding method? |
|
09-12-2016, 07:55 PM | #9 |
null operator (he/him)
Posts: 20,792
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
09-12-2016, 08:04 PM | #10 |
Grand Sorcerer
Posts: 27,739
Karma: 197700000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I suppose I could. But nearly every author of every plugin would need to do the same thing. Attachments come at the end of the post ... always have at Mobileread (which is how most Sigil/calibre plugins are shared).
|
09-12-2016, 11:12 PM | #11 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
09-13-2016, 12:58 PM | #12 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Yes, but then you have to deal with daft amateurs like me.
|
09-14-2016, 09:41 PM | #13 | ||
Bookmaker & Cat Slave
Posts: 11,468
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
We have embedded good fonts, bad fonts (repeat after me: The customer is ALWAYS right...); well-known foundry fonts, obscure fonts, and fonts that I never thought would work. (Viking runestones, anyone?). They all work cheerfully on iBooks. ePUB 3 is simply not a requirement, or...no. It's just not. AFAI can recall, even the xml file requirement was dropped...2 years ago? Offered FWIW. (And less than that, even...) Hitch |
||
09-30-2016, 01:12 PM | #14 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
DiapDealer:
Oh, dear, another problem. So after embedding the font and using your plugin to add the xml file, and adding the following line of code to the content.opf in the metadata section as dictated by Apple-- Code:
<meta property="ibooks:specified-fonts">true</meta> I have sent a new file to my colleague with that line of code removed and suggested she try that and see whether or not iBooks recognizes the embedded font without it. In the meantime if you or others are around and can shed some light on this, that would be awesome. |
09-30-2016, 01:23 PM | #15 |
Grand Sorcerer
Posts: 27,739
Karma: 197700000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've no idea, to be perfectly frank. Adding the xml file was the only thing I ever knew that had to be done for iBooks. This is the first I've heard of the opf metadata entry. It wouldn't be the first time they required non-standard stuff that won't pass IDPF validation, though.
That meta entry looks like it belongs in an EPUB3 to me, not and EPUB2 - which is what your epub appears to be. Maybe someone who groks iBooks will have a better idea. Last edited by DiapDealer; 09-30-2016 at 02:33 PM. |
Tags |
apple, embedded fonts, epub2 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding font in books that already have embedded font | Barty | Calibre | 2 | 10-16-2013 11:38 PM |
Font embedding | sachin | Sigil | 36 | 03-30-2012 03:26 AM |
Font embedding | sachin | Sigil | 3 | 03-21-2012 09:19 AM |
Do I need a font license if all I'm doing is referring to the font (not embedding)? | Stodder | Workshop | 21 | 04-21-2011 04:19 AM |
Special chararcters on the iPad or why does Apple not support Font-embedding? | georg3200 | ePub | 13 | 10-06-2010 10:32 AM |