Frustrated with iBooks refusal to play nice with text alignment and with fonts, I downloaded a new book from Gutenberg, Mark Twain's The Jumping Frog, and started fresh. I created the simplest of simple InDesign files, without adding any formatting at all, and then exported the whole thing to EPUB. It was pretty ugly.
One of the things that I haven't understood about the whole Apple-neglects-to-support-standards debacle is how their iPad User Guide (download it from the iBookstore) stays left-aligned even when I've got Full Justification set to its (absurd) default position of ON.
How do they do it?
There's no clue in the CSS. Not even so much as an
!important: (And don't imagine that that
text-align:leftshould have an effect; iBooks ignores it in favor of the Full Justification position in the iPad's general settings.)
Grasping at straws, I tried using Apple's style sheet with my (ok, Twain's) text, changing only the classes in my
pelements to match the styles in Apple's CSS.
iBooks was clearly not fooled.
I took a step back. I changed only two paragraphs in my XHTML file, one header and one paragraph. And lo and behold iBook suddenly remembered how to style a paragraph with a different font:
How can that be? That's the exact same CSS and the exact same XHTML, except that instead of all the paragraphs being marked with the main body text class, only one of them is. There is nothing significantly different.
But look how not only the font is maintained, but also the left alignment. (In all of these examples, Full Justification is ON in Settings.)
Was it only Apple's lovely choice of Verdana? No, I could choose other fonts, like American Typewriter.
Was it the style names themselves that held some sort of magic? No, I could create my own style names with the same style definitions that Apple had used.
Was it the style definitions? No, I could use style definitions that I had used on other projects.
What then? I stopped fussing with the CSS and started fussing more with the XHTML. This time I tried formatting several more paragraphs. It still works:
Emboldened, I try a few more pages:
They still work. I push it just a little further. And I hit the wall. All I changed was the class of a few more paragraphs in the XHTML, and suddenly, all I get is Palatino, full justified, throughout the book, from the first page to the last.
There are some interesting things to note here. First of all, that same paragraph that now appears in Palatino was not altered at all between the penultimate test and this one. I only changed the classes in a few paragraphs at the end of the document, and that is what triggered the loss of all of the font and alignment formatting.
Further, note that the leading and font-size are maintained even as the font family and justification are lost.
I spent all day working on this, and didn't find a solution. I'm not sure there is one. I think its just a buggy program. I'm curious as to why Apple's iPad User Guide doesn't show up in the specified font, but still stays left-aligned. I haven't figured that out yet. In my tests, the font formatting is listened to at the same rate as the alignment.
For those who would say, "Apple recommends not choosing fonts" I would point out that they themselves choose fonts for their own publications, including the iPad User Guide.
And to those who marvel at this waste of time, I would caution that we must all speak up for standards, lest you soon join me in this fruitless exercise of trial and error.