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 :-)
|