View Single Post
Old 03-23-2016, 10:40 AM   #1040
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,139
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by chrisridd View Post
Something I often find myself doing with purchased epubs is "normalising" the font sizes. It would be nice if this could be automated.

What I mean by this is that all the font-size declarations in the CSS are altered (almost always increased, what is it with publishers and small fonts?) so that the body text is all CSS "medium". So I'd normally do something like this:

xx-small -> x-small
x-small -> small
small -> medium
medium -> large
large -> x-large
x-large -> xx-large
xx-large -> xx-large (not sure it matters)

Of course there are also relative font sizes specified in percentages, which would be a similar sort of problem.

Identifying "body text" is probably statistical - counting the declarations used by "most" divs and ps in the text will give a good idea. I just open a good-sized chapter in Sigil and look at the start of the source and have a stab :-)
I convert named sizes to (my value) em
font-size: 'medium' just gets removed, since that is my Base font size the I set in <body>

BTW I run the 'chained' (Group) Saved Search feature in Sigil to do this

Last edited by theducks; 03-23-2016 at 10:42 AM. Reason: added comment
theducks is offline   Reply With Quote