Giter Club home page Giter Club logo

Comments (7)

dauwhe avatar dauwhe commented on June 3, 2024 3

The EPUB spec uses the CSS Snapshot as a guide to what CSS should be supported by reading systems. This allows EPUB to evolve as the underlying web standards evolve.

This snapshot includes CSS Fonts Level 3, which does not include variable fonts. Those are defined in Level 4, which is still under development.

from epub-specs.

mattgarrish avatar mattgarrish commented on June 3, 2024

The link you posted seems to go to a missing page so I'm not sure why you're saying they're not supported. EPUB supports OpenType fonts, although that doesn't necessarily mean that reading systems will render variable fonts as intended.

If the problem is support in reading systems, then maybe this is an issue for testing.

from epub-specs.

davelab6 avatar davelab6 commented on June 3, 2024

That's odd, here's a screenshot I just took :)

Screenshot_20230320-222858

Where would I set the equivalent of font-variation-settings CSS property, and font-optical-sizing?

from epub-specs.

mattgarrish avatar mattgarrish commented on June 3, 2024

Where would I set the equivalent of font-variation-settings CSS property, and font-optical-sizing?

In a CSS style sheet for the xhtml page, or any other way you would for the web generally. EPUBs are just packaged web content.

There aren't any restrictions on what CSS properties you can use, but, again, there could very likely be support issues in the wild, just like with browser support for anything new(-ish). I've never personally tried using variable fonts, so I don't have any insight into which reading systems do or do not support their rendering.

But unless there's something specifically that epubcheck flags as an error (unable to link to/import the fonts, unable to list them in the manifest, invalid CSS, etc.), it doesn't sound like the EPUB specification needs to be changed to allow their use.

As for how to improve support, EPUB is currently going through the W3C standardization process so there's a testing group checking support for features. I'm not sure if this is in scope (they're not testing every aspect of every technology that can be used), but it would be one way to expose support issues. The other, of course, is to test manually and open bugs against the major reading systems that don't support rendering.

There was an idea of creating a bug tracker for logging issues against all reading systems but it doesn't look like it panned out. Maybe someone involved can speak to it.

from epub-specs.

davelab6 avatar davelab6 commented on June 3, 2024

That explains it! Any ballpark timeline for L4?

from epub-specs.

mattgarrish avatar mattgarrish commented on June 3, 2024

It sounds like we can close this issue with no action required. You can include OpenType variable fonts in an EPUB and reference the CSS properties, so nothing needs fixing from an authoring perspective. And because we reference the latest CSS snapshot, it will automatically be recommended to support Level 4 Fonts when that spec becomes stable.

from epub-specs.

davelab6 avatar davelab6 commented on June 3, 2024

Excellent, thank you for explaining

from epub-specs.

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.