View Single Post
Old 09-03-2010, 05:06 AM   #36
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: 74,218
Karma: 317184274
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Quote:
Originally Posted by Jellby View Post
Actually, Mobipocket has that exactly (see bottom part here). But last time I tried the Cybook didn't support this, I don't know if the Kindle does.
Goodness me. So it does.

Unfortunately it doesn't work on the Kindle Previewer or on a Kindle 2i. It does work on Mobipocket Reader under Windows. And it does work on Kindle for Mac and Kindle for PC.

I found out something else interesting. On the Kindle, specifying font size as -1 or +1 is exactly equivalent to specifying it as 2 or 4. By this I mean that if a paragraph has a base font size of 5, specify a span in that paragraph as having font size -1 will make the Kindle display text of size 2, not text of size 4. In the Mobipocket reader, you (correctly) get text of size 4 displayed.

Arghh... no wonder I've been having so much difficulty. Amazon bought Mobipocket, and have created a renderer that does match the old Mobipocket renderer, but in ways that make things worse, not better. They've stripped out clever features like poetry alignment, and have broken existing features (like relative font sizes).

And yes, again it's true that the Kindle Previewer and Kindle 2i have this rendering mistake, but Kindle for Mac and Kindle for PC render the relative font sizes correctly!

[UPDATE: Added a sample mobipocket/kindle file (generated with KindleGen 1.1) that's just a paragraph of text:

<p>Ordinary size text <font size="+3">Very Big text <font size="-2">Should still be bigger than ordinary text</font></font> Back to ordinary text.</p>

which shows the problem very well. Read it on any Mobipocket reader (including Kindle for Mac and Kindle for PC!) except an actual Kindle or the Kindle Previewer, and you get ordinary text, very big text, slightly big text and ordinary text. Read it on a Kindle, and you get ordinary text, very big text, quite small text and ordinary text! ]

[Update 2: Oh, and here's screen shots from Kindle Previewer and Kindle for Mac, showing the different renderings.]
Attached Thumbnails
Click image for larger version

Name:	Kindle Previewer.png
Views:	274
Size:	15.9 KB
ID:	57558   Click image for larger version

Name:	Kindle for Mac.png
Views:	247
Size:	19.5 KB
ID:	57559  
Attached Files
File Type: mobi Font Size Sample.mobi (3.2 KB, 165 views)

Last edited by pdurrant; 09-03-2010 at 06:37 AM. Reason: I was wrong about Kindle for Mac and PC
pdurrant is offline   Reply With Quote