Quote:
Originally Posted by cybmole
& 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:
- 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.
- 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.
- 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 ...