GithubHelp home page GithubHelp logo

Comments (4)

johnfactotum avatar johnfactotum commented on June 6, 2024

Fixed with johnfactotum/foliate-js@99e246e and johnfactotum/foliate-js@0cebcb9.

center gap between the two pages

I think this is due to the default margin on the body element, which can be fixed with body { margin: 0; }.

from foliate.

initramfs avatar initramfs commented on June 6, 2024

This might be an extremely minor nitpick but even with margin: 0; padding: 0 on the html and body elements there still exists a 1 pixel gap between the spreads:
CSS spread gap screenshot

Thorium renders both variants (stylesheet-less and with stylesheet) as truly gapless:
Thorium spread gap screenshot


Relevant EPUBs here (contains original EPUB + EPUB with stylesheet): FXL-Test.zip

On another note: I'm not well versed with any specifications of default values for CSS properties besides what is shown here (I'm not sure if this is normative), but should the body margin be set to 0 px for FXL content?

from foliate.

johnfactotum avatar johnfactotum commented on June 6, 2024

A slight gap is visible in your Thorium screenshot as well. I think it's an antialiasing artifact (antialiasing being applied to the individual pages which causes the gap to appear). As far as I know it's not really something that can be fixed as the antialiasing is controlled by the browser engine. It works for me, though, when using 200% HiDPI scaling:

Screenshot from 2023-09-10 17-31-43

Regarding the default user agent stylesheet, as far as I can tell, there aren't any special requirements for fixed layout. For EPUB in general, the reading system spec says

a reading system's user agent style sheet SHOULD support the [html] suggested default rendering.

from foliate.

initramfs avatar initramfs commented on June 6, 2024

Okay, I can reproduce the gapless rendering with 200% scale as well, also noticed Thorium's gapless rendering might have a bug as well (where the pages are actually overlapped by 1 or 2 pixels, producing the AA artifacts), though that's hard to confirm (increasing zoom level causes pages to definitively overlap on my system though).

In any case, thanks for fixing this bug, seems to be the only FOSS epub renderer right now that can actually render FXL RTL correctly.

from foliate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.