01-25-2013, 09:43 PM | #1 |
Member
Posts: 15
Karma: 10
Join Date: Jan 2013
Location: Argentina
Device: Kindle
|
iBooks sans-serif weirdness
Although by the title it may look this is the same as the thread at Sans-serif fonts and iBooks it isn't.
I've got an epub show text in sans in iBooks without embedding fonts nor adding com.apple.ibooks.display-options.xml but somehow in one file, a line of text in sans serif is rendered as serif. There's a test case epub attached. You'll see three pages, nearly identical: Section0001: Code:
<p>no font family specified</p> <p class="serif">serif</p> <p class="sans">sans-serif</p> <p class="serif"><span class="sans">initially serif, overridden with sans-serif</span></p> Section0002: Code:
<p>no font family specified</p> <p class="serif">serif</p> <p class="sans">sans-serif</p> <p class="sans"><span class="serif">initially sans-serif, overridden with serif</span></p> And here's what I don't understand. Section0003: Code:
<p>no font family specified</p> <p class="serif">serif</p> <p class="sans">sans-serif</p> <p class="serif"><span class="sans">initially serif, overridden with sans-serif</span></p> <p class="sans"><span class="serif">initially sans-serif, overridden with serif</span></p> In this last file, the <p> with the text "sans-serif" is rendered as serif. Does anyone know why this happens? Am I doing something wrong or it's a bug? The serif and sans css classes are defined as: Code:
.serif { font-family: serif; } .sans { font-family: sans-serif; } Spoiler:
|
01-25-2013, 10:28 PM | #2 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Adding the following com.apple.ibooks.display-options.xml file:
Code:
<?xml version="1.0" encoding="UTF-8"?> <display_options> <platform name="*"> <option name="specified-fonts">true</option> </platform> </display_options> I would strongly suggest just adding the file. It will save you lots of problems and head scratching. |
01-26-2013, 12:30 AM | #3 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
01-26-2013, 02:39 PM | #4 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
If you're registered as a book publisher with iTunes, download the iBookstore Asset Guide. Otherwise, the following links cover it fairly well:
http://authoradventures.blogspot.com...s-part_24.html http://ideate.verioiponly.com/Noir%2...sMiniguide.pdf |
01-27-2013, 01:00 AM | #5 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
01-27-2013, 08:15 AM | #6 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
From what I understand it fixes some quirkiness on flowable books as well. I just include it in all my ebooks in case someone really wants to use iBooks. It's a very small file and doesn't add to the size of the book anymore than some of the other 'hacks' we have to do to accomodate devices/apps inconsistent implementations.
I just have the file already incorporated into my template when I create a new ePub (I use Sigil) so I don't ever have to think about it being there. Cheers! |
01-27-2013, 05:43 PM | #7 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
01-27-2013, 08:02 PM | #8 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
In other words, the snippet I posted is pretty much everything that reflowable book authors need to know or care about, AFAIK. |
|
01-27-2013, 11:53 PM | #9 |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks again.
|
Tags |
ibooks, sans, sans-serif |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sans-serif fonts and iBooks | Adjust | ePub | 17 | 01-26-2013 07:31 PM |
Which typeface should use for ebook, Serif or Sans-serif | droople | Workshop | 8 | 06-13-2010 07:20 AM |
Serif or Sans Serif for readability? | kilofox | Amazon Kindle | 19 | 02-20-2009 02:22 PM |
Serif and Sans-Serif fonts in Libprs500 | benong | Calibre | 1 | 02-06-2008 04:43 AM |
Do you prefer the Reader's serif or its sans serif font? (poll) | Alexander Turcic | Sony Reader | 9 | 11-25-2006 12:15 PM |