maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   New FBReader build in Extras-Devel (https://talk.maemo.org/showthread.php?t=36857)

TinaHolmboe 2010-11-25 22:52

Re: New FBReader build in Extras-Devel
 
Having an odd problem here. As mentioned, FBreader has a problem with the CSS involved in epubs. I can't seem to get it to add a margin between paragraphs.

However: I just tried adding the same in the PREFERENCES - and that didn't work either. Am I right in suspecting this to be a bug?

paulkoan 2010-11-25 23:13

Re: New FBReader build in Extras-Devel
 
I had lots of trouble with paragraph spacing and epub. I fixed it in the end manually I recall with a search and replace, or one of the conversion tools had an option to add in a <br>.

Even now, even though I have "always use my CSS" enabled, it still seems to use the epub font size rather than my specified base. This setting does have some effect though, as without it, it uses the epub font type as well as size.

Weird that it isn't "all or nothing" when it comes to css.

Rob1n 2010-11-26 09:30

Re: New FBReader build in Extras-Devel
 
The CSS handling (and particularly the user over-rides) is definitely broken, yes. There looks to have been some changes made to this in the current development version, so I'll see whether I can find what these are and get them backported.

Rob1n 2010-11-26 11:43

Re: New FBReader build in Extras-Devel
 
Quote:

Originally Posted by paulkoan (Post 883346)
Even now, even though I have "always use my CSS" enabled, it still seems to use the epub font size rather than my specified base. This setting does have some effect though, as without it, it uses the epub font type as well as size.

I'm not sure that's a bug - I think that's all it's intended to do.

Rob1n 2010-11-26 20:04

Re: New FBReader build in Extras-Devel
 
I've looked through the current development source code for FBReader and have backported all the changes which are described as bug fixes. I've uploaded a new version incorporating these fixes as 0.12.10-23 (for Diablo and Fremantle).

The descriptions given for the included changesets are:
  • #330 has been fixed
  • fixed ePub cover extracting
  • LitResDataParser code fix
  • Mobipocket image processing has been fixed
  • text drawing optimization (actual for Chinese texts)
  • ZLCharSequence bug has been fixed
  • LZXDecompressor fix
  • RtfReaderStream fixes

The first one is the one that seems to fix CSS handling - this looks to fix all the issues I've seen with CSS and user-overrides anyway.

The source code changes can be downloaded from here.

TinaHolmboe 2010-11-27 10:18

Re: New FBReader build in Extras-Devel
 
Quote:

Originally Posted by Rob1n (Post 884004)
The first one is the one that seems to fix CSS handling - this looks to fix all the issues I've seen with CSS and user-overrides anyway.

I've just tested this with a Calibre-produced ePub, which sports a CSS with text-indent and margin-top on paragraphs. The text-indent still works; the margin top ... not so much. Alas :(

Can't say preferences work either, to be honest. Will fiddle a little more to see if its something I've done wrong, but the book looks fine in other epub readers.

TinaHolmboe 2010-11-27 13:53

Re: New FBReader build in Extras-Devel
 
Quote:

Originally Posted by Rob1n (Post 884004)
The first one is the one that seems to fix CSS handling - this looks to fix all the issues I've seen with CSS and user-overrides anyway.

Thought. Rob1n, can you tell me - I can read source, but you know it better - what level of support FBReader have for CSS in terms of its inclusion?

i.e. does it support STYLE elements? Or just LINK elements with external CSS?

It ought not be THAT simple, but right now the Calibre-produced e-books I've tested use embedded (ie. the STYLE element) CSS, while the Black Library (free) books that works as expected use linked (LINK element) CSS ...

I'll re-write my convert pipeline and test with external CSS later.

Rob1n 2010-11-27 19:23

Re: New FBReader build in Extras-Devel
 
From a quick look at the source, it should support CSS via LINK or STYLE elements, or via STYLE attributes.

Can you provide an example of a book, and I'll try to trace what it's doing while parsing? You can email it to me (maemo at robinhill.me.uk).

TinaHolmboe 2010-11-27 23:16

Re: New FBReader build in Extras-Devel
 
Quote:

Originally Posted by Rob1n (Post 884578)
Can you provide an example of a book, and I'll try to trace what it's doing while parsing? You can email it to me (maemo at robinhill.me.uk).

Done. Verified rendering in Calibre's ebook-viewer and the Mozilla 'epubreader' extension'.

Rob1n 2010-11-29 13:53

Re: New FBReader build in Extras-Devel
 
Quote:

Originally Posted by TinaHolmboe (Post 884686)
Done. Verified rendering in Calibre's ebook-viewer and the Mozilla 'epubreader' extension'.

I've tracked down the issue. FBReader uses the margin & padding settings for the same variable, so your zero padding values are overriding the margin values. Removing the padding values from the CSS fixes this issue. I'll have a dig into this further - adding the values would probably be a better solution, but means dealing with unit conversion.


All times are GMT. The time now is 02:15.

vBulletin® Version 3.8.8