← Back to team overview

calibre-devs team mailing list archive

Re: Font-sizes

 

On Fri, Dec 26, 2008 at 6:33 PM, Kovid Goyal  wrote:

> We can certainly make the rescaling algorithm input format aware. I'm more
> hesitant about making it output renderer aware, since the whole point of
> reflowable books is that they are supposed to be portable.

Non-portable isn't the same as optimized.  Er, rather optimization doesn't
prevent portability. The output will display fine on other renderers, just
with exactly the user's selected font size(s) on the optimized-for one. But
the main situation I want the info available for is SVG rasterization, which
will be impossible to do correctly without knowledge of the output renderer
resolution.

> How large an input key do you need? Can you post an example?

Sure -- [6.5, 7, 8, 9, 10, 11, 12, 13, 15, 18, 21, 25]. It's ultimately just
a list of font sizes allowed in the output book. I'll be including the code
I have as part of oeb2mobi for mapping to the fixed set of /font[@size]s
Mobipocket supports, which will hopefully be clearer than my explanations.

-Marshall

References