Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2013, 09:04 PM   #1
writerkit
Enthusiast
writerkit began at the beginning.
 
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.
writerkit is offline   Reply With Quote
Old 03-25-2013, 11:52 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 03-26-2013, 01:18 AM   #3
writerkit
Enthusiast
writerkit began at the beginning.
 
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.
writerkit is offline   Reply With Quote
Old 03-26-2013, 01:30 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 03-26-2013, 02:35 AM   #5
writerkit
Enthusiast
writerkit began at the beginning.
 
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.
writerkit is offline   Reply With Quote
Old 02-27-2014, 05:21 AM   #6
PeterBr
Enthusiast
PeterBr began at the beginning.
 
PeterBr's Avatar
 
Posts: 33
Karma: 10
Join Date: Jan 2013
Location: Oldenburg, Germany
Device: Kindle Paperwhite, iPad Mini Retina, iBooks on Mavrericks
Quote:
Originally Posted by writerkit View Post
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.
Could you describe this with a bit of code?

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
PeterBr is offline   Reply With Quote
Old 02-27-2014, 07:45 AM   #7
PeterBr
Enthusiast
PeterBr began at the beginning.
 
PeterBr's Avatar
 
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>
This actually works, but now it disables the ability to switch between justified text and left-ragged. GAH! Well, text-align: justify fixes this.

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.
PeterBr is offline   Reply With Quote
Old 03-19-2015, 08:46 AM   #8
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
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.
1v4n0 is offline   Reply With Quote
Reply

Tags
embed fonts, ibooks


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:28 AM.


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