![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Custom fonts for iBooks
I've got some ePubs with embedded fonts.
They work fine in the readers on my PC. And also work on my Kindle when I convert the ePub to AZW3. I don't have an Apple device to test iBooks, but was sent a screencap that shows the declared fonts aren't being applied. I read this column: http://guidohenkel.com/2015/04/custom-fonts-in-ibooks/ Which says you need to include both this line: <meta property="ibooks:specified-fonts">true</meta> in the opf and an XML file com.apple.ibooks.display-options.xml However, when I do either, ePubCheck complains that the tag is "not allowed" and the xml file has an "invalid file extension". So is the advice correct at all? Or is there another trick to using embedded fonts on iBooks? Preferably one that ePubcheck approves of, though that's not strictly necessary. My CSS has this: Code:
@font-face { font-family: "Garamond Premr Pro"; font-style: normal; font-weight: normal; src: url("../Fonts/GaramondPremrPro.otf"); } body, div, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, blockquote { font-family: "Garamond Premr Pro", serif; margin: 0; padding: 0; border-width: 0; } Last edited by AlanHK; 11-17-2017 at 11:11 PM. |
![]() |
![]() |
![]() |
#2 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 97
Karma: 44418
Join Date: Jul 2013
Location: Mostly in my own head!
Device: Kindle Fire, iPad
|
Quote:
The com.apple.ibooks.display-options.xml file is attached with this post. Place the xml file in the META-INF folder and iBooks will recognise the embedded fonts. Cheers Last edited by Nabodita; 11-16-2017 at 11:45 AM. |
|
![]() |
![]() |
![]() |
#3 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
If I import the file, it puts it into a "Misc" folder. Of course I could use a zip tool to do it. I think Sigil will lose any unmanifested files if you edit the epub and resave it. I'll see if it works in the Misc folder. Last edited by AlanHK; 11-16-2017 at 12:47 PM. |
|
![]() |
![]() |
![]() |
#5 | ||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
Wish I'd known about it a year ago... Also, this: https://github.com/JayPanoz/Soma/wik...to-embed-fonts says you can do this with just a change to the OPF. Is that correct? Quote:
|
||
![]() |
![]() |
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
However, I don't know when Apple introduced these metadata entries. I.e., it might be necessary to include com.apple.ibooks.display-options.xml for older iBooks versions. For more information, also see this post. |
|
![]() |
![]() |
![]() |
#7 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
I always convert to EPUB3 if I'm making it for iBooks anyway, the TOC doesn't work properly with just EPUB2. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-T3 T3 fonts & custom fonts | Phil_C | Sony Reader Dev Corner | 5 | 12-22-2013 02:34 PM |
Embedded fonts in iBooks | helenouchkaia | ePub | 1 | 01-05-2012 05:48 AM |
Touch Fonts question (special characters in stock and custom fonts) | levil | Kobo Reader | 20 | 09-23-2011 01:51 PM |
embedded fonts in ibooks? | Uluhara | Apple Devices | 3 | 06-04-2011 05:41 AM |
Need help - measuring fonts in iBooks | jharker | ePub | 3 | 11-13-2010 05:14 PM |