![]() |
#1 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
|
Embedded fonts don't show up consistently in iBooks
I used the "Add Font Family" button in the Look & Feel section of the Convert Books dialogue to embed a font. It worked, pretty much across the board, with only some CSS in the source code of my ebook, namely these:
body {font-family: Rosario, Serif;} or the class tags: .dedication {font-family: Rosario, Serif;} and the corresponding xhtml: <div class="dedication">Dedication text</div> These have worked until today, when suddenly the embed is not translating consistently in iBooks. It still works for both Nook and Kindle for Mac, and on Nook tablet + Nook for iPhone with Publisher Defaults turned on. But my iBooks on iPhone app has gone screwy and ignores the embedded font in alternating sections in the resulting epub. I've tried everything - adding "!important" to the end of the font-family attribute, adding the CSS to line-level tags, tried to recreate whatever tags I've changed before iBooks stopped using the font properly, nothing. Is there anything I can do to make iBooks apply the embedded font consistently? Thanks so much in advance. Calibre rules. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not an iBooks user, so I cant offer very specific advice, but in general look for font related settings in iBooks that could be interfering, for example a custom stylesheet. If your problem is limited to only iBooks, I'd suggest asking in the apple devices forum, you might get more useful info there.
|
![]() |
![]() |
![]() |
#3 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
|
Thanks, Kovid - I asked there just now as well.
If I could ask a follow-up question: I just looked at the stylesheet Calibre generates, and the class "calibre" which is inserted into the body tag seems to add "Serif" as an attribute, when I'm looking to use a sans-serif font if the app can't display the embedded font. Any way to avoid this? The font iBooks goes to when it doesn't display my embedded font is indeed a serif font instead of a sans-serif font, which I'd prefer. I should mention that although my code examples in the original post cite "serif", I actually use sans-serif as the attribute. Last edited by writerkit; 03-26-2013 at 01:20 AM. Reason: Added details. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not automatically, you would have to edit the css manually after. serif is simply the most common fallback choice. It should only ever come into play if the reader does not support the embedded font for some reason, as in your case.
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
|
Well, it figures that after making myself crazy for 3 days, I hit upon the hack (which may not be a hack), right after I posted this discussion, by examining the stylesheet generated with my epub by Calibre: I wrapped the offending chapters in containers.
Thanks for your help again, Kovid - you rock. |
![]() |
![]() |
![]() |
#6 | |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Jan 2013
Location: Oldenburg, Germany
Device: Kindle Paperwhite, iPad Mini Retina, iBooks on Mavrericks
|
Quote:
I've added customs fonts (Equity A and Concourse 3) to an epub I generated myself and the CSS works fine in Safari - I see exactly what I exped to see, given the css and the xhtml. I also eleminated every error and warning epubcheck reports, passing with flying colors as Epub version 2.0. Yet iBooks on Mac OS X (Mavericks) and iOS 7 don't honor the fonts I declared and provided. Addendum: Opening the epub in Adobe Digital Editions (Mac) shows the correct fonts in use. Last edited by PeterBr; 02-27-2014 at 07:21 AM. Reason: Addendum |
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Jan 2013
Location: Oldenburg, Germany
Device: Kindle Paperwhite, iPad Mini Retina, iBooks on Mavrericks
|
Partly solved.
Apple wants some additional standard in epubs intended for iBooks, META-INF/om.apple.ibooks.display-options.xml Code:
<?xml version="1.0" encoding="UTF-8"?> <display_options> <platform name="*"> <option name="specified-fonts">true</option> </platform> </display_options> There's also am official iBookstoreAssetGuide.pdf, easily to be found with a web search. Specifying your own fonts doesn't disable using the system fonts, by the way, it adds another entry to the font selection menu “original book fonts“ or somesuch. Last edited by PeterBr; 02-27-2014 at 07:50 AM. |
![]() |
![]() |
![]() |
#8 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 173
Karma: 40000
Join Date: Oct 2013
Device: kindle
|
Hello. Similar problem here. I've embedded the font the "standard" way, declaring the font-family attribute for the whole body, and it didn't work in ibooks.
I tried declaring it again for <h3> and <p>, and it showed up in the former only. I tried creating the file you mentioned (which btw doesn't show up in calibre, I had to do it via winrar), and nothing changed. Ty. |
![]() |
![]() |
![]() |
Tags |
embed fonts, ibooks |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
InDesign CS6 and embedded fonts in iBooks 2.2 | YAP-IC | ePub | 5 | 10-09-2012 07:25 PM |
Embedded fonts in iBooks | helenouchkaia | ePub | 1 | 01-05-2012 05:48 AM |
embedded fonts in ibooks? | Uluhara | Apple Devices | 3 | 06-04-2011 05:41 AM |
Just don't understand embedded fonts | Jabby | Sigil | 19 | 05-22-2011 02:12 PM |
iBooks now supports embedded fonts | kjk | Apple Devices | 2 | 04-12-2011 12:58 PM |