View Single Post
Old 12-24-2012, 01:37 PM   #4
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by pdurrant View Post
1. You almost certainly don't want to do that. Why do you want to impose your choice of body text font on your reader?
It's perfectly reasonable for an EPUB book to set a font. There's a well-established standard for how these sorts of things are supposed to behave in the HTML/CSS world:

For fonts and other choices that can reasonably be overridden by client stylesheets (in this case, the reader's stylesheet), specify them as you normally would.

By default, the client stylesheet should not override these choices. The client's default font (for files that have no font specified) should generally not be set using stylesheets, but if your client must do so for some reason, it should do so by checking for a font on the HTML tag or BODY tag, and if no font declaration exists, setting one.

If the user asks to use a specific style instead of the publisher-provided style, the client should add a user style that takes precedence over the page style.

If you (the publisher) have a specific style that must not be overridden by the reader (e.g. for special headings that should not be treated like body text), specify !important for that style. The client should never use !important in its user style, so this should never be overridden.

Any deviation from that behavior should be considered a serious bug in the client. Similarly, using !important for styles that aren't really important should be considered a serious bug in the book.

Last edited by dgatwood; 12-24-2012 at 01:43 PM.
dgatwood is offline   Reply With Quote