View Full Version : Sony/ADE ePub Rant


pdurrant
09-11-2009, 07:19 AM
Bah. Sony's ePub implementation support of SVG is poor. ADE's support is worse.

While my title page looks great, doing the same thing with images has been mixed. Sony doesn't seem to be able to cope well (images off centre/slightly off-screen) when the image embedded in the SVG needs resizing, and ADE actually ignores the requirement to resize proportionally.

Oh - and Sony ignores fonts embedded in SVGs too.

I'm getting close to working code, but it's not as pretty as it should be.

Abecedary
09-11-2009, 01:36 PM
I was able to get the images in the one book I've made so far (http://www.mobileread.com/forums/showthread.php?p=569076) to be resizable using css. These work as they should in the desktop ADE, and the comments from people with Jetbooks indicate that the images scaled correctly on their 640x480 screens, too. As for fonts in SVGs, you're probably best off converting them to outlines instead. First, it lets you preserve any kerning or manipulations you did to the text or characters, and it also gets you around any legal issues of redistributing/including the fonts (even in code form) with your book.

EDIT: I should've mentioned, the cover in that book is an SVG (w/outlined fonts) that scales very well in the desktop ADE.

frabjous
09-11-2009, 02:14 PM
I have to say, I'm a little surprised ADE/Sonys support SVGs at all, even if they are part of the ePub spec., when you consider how slow even mainstream browsers (I'm looking at your IE!) have been to support them.

But by all means keep ranting until they do. It's really a shame that rasterized images have become so acceptable even in situations when they're far from necessary or ideal.

At this rate, how long will we have to wait till vector graphics from MathML, etc., are supported? :cry:

pdurrant
09-12-2009, 03:42 AM
That's very nice indeed. And yes, I've found that in-line images where I can assume that the width is the limiting factor do resize nicely.

It's full page images where I want the image to resize so that it fills the page as much as possible (either in height or in width) are the ones that aren't working right.

Perhaps if I fiddle some more I'll find some magic incantation that will work with ADE.

I notice that you've had to work hard to get the small caps to display in the chapter titles, because ADE doesn't support the font-variant: smallcaps that it should.


I was able to get the images in the one book I've made so far (http://www.mobileread.com/forums/showthread.php?p=569076) to be resizable using css. These work as they should in the desktop ADE, and the comments from people with Jetbooks indicate that the images scaled correctly on their 640x480 screens, too. As for fonts in SVGs, you're probably best off converting them to outlines instead. First, it lets you preserve any kerning or manipulations you did to the text or characters, and it also gets you around any legal issues of redistributing/including the fonts (even in code form) with your book.

EDIT: I should've mentioned, the cover in that book is an SVG (w/outlined fonts) that scales very well in the desktop ADE.

Jellby
09-12-2009, 06:21 AM
That's very nice indeed. And yes, I've found that in-line images where I can assume that the width is the limiting factor do resize nicely.

Until someone turns his Opus around and reads the book in landscape mode, I guess (or you have a tall illustration like this (http://djelibeibi.unex.es/libros/Tenniel/Alice-13.jpg)).

It's full page images where I want the image to resize so that it fills the page as much as possible (either in height or in width) are the ones that aren't working right.

It seems ADE, like most browsers, it seems, is not considering the screen height when calculating proportional heights. It can be understood with media that's going to be mainly scrolled up and down, but not when the content is read page by page.

I notice that you've had to work hard to get the small caps to display in the chapter titles, because ADE doesn't support the font-variant: smallcaps that it should.

Alas, no. And the other CSS workaround, using "text-transform: uppercase" and a smaller size is not supported by the ePUB spec. So far, I've refused hard-coding the uppercase text in the text, if ADE can't show the small-caps, so be it; some day it will.

Abecedary
09-12-2009, 11:17 AM
That's very nice indeed. And yes, I've found that in-line images where I can assume that the width is the limiting factor do resize nicely.

It's full page images where I want the image to resize so that it fills the page as much as possible (either in height or in width) are the ones that aren't working right.

Perhaps if I fiddle some more I'll find some magic incantation that will work with ADE.
I'll readily admit that the resize method I used does have some issues, and it also doesn't help that I only have a single platform to test it on. When doing the floorplan images, I assumed that the reader's screen width would be 600 pixels since that seems to be the most common width currently. Honestly, I'm not really sure what happens on reader displays larger than that. However, I did notice that if I switch the Sony to landscape mode, that it does attempt to stretch the image across the 800 pixel "width" of the rotated screen (resulting in the expected slight image degradation), so that seems to be an indication that the max width attributes are being ignored (at least in this instance). Also, I wasn't able to find a way to horizontally center the resizable images on a page (it works in browsers, but not in ADE). :( Of course, I gave up searching after an hour or two, so that's not to say that it can't be done. I just couldn't find a way with the methods I tried.

I notice that you've had to work hard to get the small caps to display in the chapter titles, because ADE doesn't support the font-variant: smallcaps that it should.
It was a slight annoyance, but really it's the only way to get the characters to display as close to properly as possible on the widest number of displays. It would be nice if it was supported in ADE, but since the small caps would end up being faked a majority of the time anyways (not many fonts actually contain the proper SC glyphs), you may as well fake them yourself to assure the desired effect (as opposed to the lowercased characters you get when the SC attribute is ignored). That said, the Gyre fonts actually do contain properly proportioned small caps (as opposed to simple scaled down uppercase glyphs) and it would be nice to be able to take advantage of them...Oh well, dropping a span class in every few characters isn't exactly difficult. If I were dealing with longer titles or more than 20 chapters or something, I'd probably just resort to using all caps, title case, or possibly even sentence case depending on the chapter names. But here's hoping that ADE does eventually support the small caps property.

pdurrant
09-13-2009, 06:35 AM
[QUOTE=pdurrant;588131Sony doesn't seem to be able to cope well (images off centre/slightly off-screen) when the image embedded in the SVG needs resizing[/QUOTE]

I now have to partially retract this statement. I have found the required magic incantation to get images to resize nicely, which I will detail in a separate post.

Lord KiRon
09-22-2009, 05:01 AM
Just to add neither Adobe SDK no ADE support "dir" attribute makeing imposible to read book on Thai , Hebrew and Arabic on any Adobe SDK based reader or ADE even with embedded fonts.