View Single Post
Old 01-05-2009, 05:37 AM   #9
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
I done a few experiments using the latest Mobipocket Creator, and then examining the html actually in the created file.

Fractional em sizes don't seem to work at all for anything - you can have 0em, 1em, 2em, etc. But 0.5em doesn't work - it just rounds to 1em

Specifying as point sizes just gets converted to pixel sizes, assuming 96ppi pixels. e.g. 50pt gets converted to 67px (or just 67 - in the absence of units, pixels seem to be assumed.

Specifying negative em for the indent doesn't work. It indents second and subsequent lines correctly, but doesn't hang the first.

When I've specified using pt or px, it has worked.

It looks like the feature isn't fully debugged yet. A work in progress, seeing as it only appeared in Mobipocket Reader 6.

Fascinating how the HTML generated includes a blank div between paragraphs, to enable inter-paragraph spacing to be set, even when the spacing is set to 0.

Goodness - I hadn't realised Mobipocket's rendering engine was quite so non-standard. Mobipocket Creator does a lot of work converting from standard HTML+CSS to Mobipocket's HTML dialect.


Quote:
Originally Posted by llasram View Post
I had seen that, but I took another look and tried a few more things, and the results are just short of unbelievable:
  • <p width="-24pt"> creates a paragraph with a hanging indent.
  • <p width="-24px"> is ignored -- the author of the cited post must have meant width="-30pt" instead of width="-30px".
  • <p width="-1em"> creates a paragraph with a hanging indent at some font sizes, but not at others. As I zoom in and out, the "outdented" initial line moves back and forth seemingly at random.

What the hell, Mobipocket?

Last edited by pdurrant; 01-05-2009 at 07:15 AM.
pdurrant is offline   Reply With Quote