View Single Post
Old 02-19-2014, 04:51 PM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by cybmole View Post
& if YES then is the effect of leaving in some font-family:serif; commands just to lock the font into that Georgia option ?
does accidental leaving just one of those in, say within one of several paragraph styles, lock the whole book out of font controls ?
Sorry, forgot to answer this bit. There isn't really much Kobo black magic here. If you leave a font-family:serif statement in a particular CSS class, the result will depend on which parts of the book use that particular tag/class. 3 examples:
  1. If your epub has body {font-family:serif} and/or p{font-family:serif}. Your epub will display in the font selected in the Kobo menu because body, p are the tags overridden when you use the Kobo font family menu.
  2. If your epub has h1, h2 {font-family:serif} then the bulk of your epub will display in the font selected in the Kobo menu, but any <h1> or <h2> heading text will display in the default Georgia font.
  3. Worst case is with a calibre conversion. Calibre always assigns the body css to a class. So if your epub has
    <body class="calibre"> for every html file and
    .calibre {font-family:serif} in your css file
    then the font selected in the Kobo menu won't be displayed at all and you'll see the default Georgia everywhere.

As I know you have some understanding of how CSS works, it may help you to think of it like this. When you select a font from the Kobo font menu it's almost as if the css statement
body, p {font-family:my-chosen-font}
had been added as the last line of the epub's css file and all the standard css cascading/inheritance/specificity rules apply as normal.

N.B. This isn't actually what happens but the result is the same. Or maybe I've just added more confusion ...
jackie_w is offline   Reply With Quote