Quote:
Originally Posted by Jellby
I don't know how it is for Kindle, but in ePubs pixels are absolute units, just like millimeters or inches, and they are not equivalent to the device's pixels. In particular, they should not change with the device resolution. I think the definition is exactly 1 in = 96 px.
That, at least is what the spec says.
|
Could you point me to the part of the spec that says that. I've found in ePub 2.0.1:
Quote:
3.2.3: Length
All non-zero coordinate and size values must have specified units. All units defined by CSS1 and CSS2 are supported:
px Pixels
|
the CSS2 specification has this to say about pixels:
Quote:
4.3.2 Lengths
Lengths refer to horizontal or vertical measurements.
[snip]
There are two types of length units: relative and absolute. Relative length units specify a length relative to another length property. Style sheets that use relative units will more easily scale from one medium to another (e.g., from a computer display to a laser printer).
Relative units are:
em: the 'font-size' of the relevant font
ex: the 'x-height' of the relevant font
px: pixels, relative to the viewing device
|
Note that pixels are explicitly defined as a relative unit, based on the viewing device.
It may be that some popular ePub renderers choose to interpret pixels as 1/96 inch, but I couldn't find that in the spec. I'd be happy to be wrong.