Well, to each his own, but, I have a question for you with regards to html2epub. I find that ADE doesn't resize text if absolute font sizes are used (e.g. px or pt). So I've written code to convert absolute font sizes to relative font sizes. But I had to reverse engineer the algorithm ADE uses to calculate the final rendered font size. Can you either give me that algorithm or look at my code and tell me if it is correct?
Basically the algorithm I use is:
Code:
ptu = { # Convert to pt
'px' : 1.0,
'pt' : 1.0,
'pc' : 1/12.,
'in' : 72.,
'cm' : 72/2.54,
'mm' : 72/25.4,
}
val = (val * ptu[unit])/base
where val and unit are the original font size and unit respectively. This algorithm converts font sizes in px, pt, cm, mm, pc, in to a % font size.
In my testing the values in ptu above most closely replicate final rendered font sizes.