Notices


Reply
Thread Tools
Posts: 27 | Thanked: 10 times | Joined on Jul 2010
#351
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?
 
Posts: 422 | Thanked: 244 times | Joined on Feb 2008
#352
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.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#353
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.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#354
Originally Posted by paulkoan View Post
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.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#355
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.
 

The Following 7 Users Say Thank You to Rob1n For This Useful Post:
Posts: 27 | Thanked: 10 times | Joined on Jul 2010
#356
Originally Posted by Rob1n View Post
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.
 
Posts: 27 | Thanked: 10 times | Joined on Jul 2010
#357
Originally Posted by Rob1n View Post
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.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#358
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).
 
Posts: 27 | Thanked: 10 times | Joined on Jul 2010
#359
Originally Posted by Rob1n View Post
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'.
 

The Following User Says Thank You to TinaHolmboe For This Useful Post:
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#360
Originally Posted by TinaHolmboe View Post
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.
 

The Following User Says Thank You to Rob1n For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 23:41.