View Single Post
Old 10-17-2015, 07:41 AM   #57
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by mietek81 View Post
So if I have an ebook about programming and program code is in something like <pre class="programs"> tag and rest of text in <p class="noindent"> tag than with patch altrnative 2 all code will be in publisher font and rest in font of my choice? Am I right?
It would depend on how the publisher had styled p and pre in the stylesheet. If they had something like
Code:
p {font-family: serif;}
pre {font-family: sans-serif;}
then with alternative 2, <p> should be in the user-selected font and <pre> should be in sans-serif (Avenir), while anything without a font-family style specified directly or inherited from somewhere else should inherit the user-selected font from <body>

The only difference with alternative 1 is that <p> would be in serif (Georgia).

There are lots of ways for the publisher to mess this up though, such as using <div> instead of <p> for paragraphs, using <p> for things which are not paragraphs, etc.

Edit: A simpler way to look at it is: if MyFont is the font you have selected from the font menu, then alternative 1 is like adding this to the end of the stylesheet:
Code:
body {font-family: MyFont !important;}
while alternative 2 is like adding this instead:
Code:
body, p {font-family: MyFont !important;}
(if Publisher Default is selected then nothing extra is added to the stylesheet.)

Last edited by GeoffR; 10-17-2015 at 07:53 AM. Reason: Asimpley way to look at it ...
GeoffR is offline   Reply With Quote