Quote:
Originally Posted by nabsltd
Any renderer that does this is wrong. 1em is a unit a measurement that means "the current font size". So, 1em could mean to render an entity to 4pts or 3000pts...or any size in between.
Now, if you meant to say "most renderers set the default font size to 12 points", then that's as may be, but it's not the same thing as saying "12pt = 1em" or "1em = 12pt".
|
That's in wikipedia. But it's not true for ebooks.
There are only two choices for pt in an ebook:
1) Render a certain number of pixels = 1pt. That's bonkers for an ereader as the font can be scaled by the user.
2) Convert Pt to em by /2. The body font is recommended to be 12pt if using a Wordprocessor to make ebooks. There is no em style. The options in styles for margins are cm, inches, pica (obsolete) anf point. The cm or inches should only be used for PDFs. The point size of fonts isn't even absolute, a different family at 12pt (or 1em on web or ereader) will be a different size.
So 18 pt should be interpreted as 1.5em, which makes sense.
There is no third option of physical size as with PDFs, because we never can be sure on screen size and DPI, and even with PDF, the font metrics decide the physical size, not pt directly.
The problem with kepub is that font sizes in pt are treated differently to margins in pt. That makes no sense.
Also kepub and epub on a kobo don't render the fonts at the same size at the same font scale slider.
Cm and Inches don't work on Web or ebook as reported screen size / dpi / resolution may be wrong. So images for web or ebook should be px (which not always = 1 pixel) or %, never cm or inches (except for PDFs, because they have a fixed known paper size for each page), nor pt or em.
The pt and em can be used interchangeably as 12 pt =1 em for fonts and margins. The cm, inch, pica and rem should never be in ebooks. Images can use px or % (but only on one axis, the other axis then needs to be auto).
We also never need line height in ebooks, because the user can vary that and the default line spacing is decided by the font metrics. A bigger size font (either at same pt/em or say 2em) will automatically use bigger spacing. We use styles in WP, which become CSS in ebook that only set paragraph margins and padding. So on conversion, even epub to epub I automatically strip all line-height.