View Single Post
Old 11-16-2017, 10:11 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
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;
}
But text with the <p> tag appears to be in a generic serif font, not the embedded one.

Last edited by AlanHK; 11-17-2017 at 11:11 PM.
AlanHK is offline   Reply With Quote