10000 CSS property not applied: `font-variant-numeric: oldstyle-nums` · Issue #294 · buggins/coolreader · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CSS property not applied: font-variant-numeric: oldstyle-nums #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
efermi opened this issue May 24, 2021 · 4 comments
Open

CSS property not applied: font-variant-numeric: oldstyle-nums #294

efermi opened this issue May 24, 2021 · 4 comments

Comments

@efermi
Copy link
efermi commented May 24, 2021

The property is being used in the core CSS of standardebooks.org epubs, see for example https://standardebooks.org/ebooks/p-g-wodehouse/jeeves-stories, and it is not applied to the rendered text even if the font supports oldstyle-nums. I'm not familiar with the project and therefore the following assumption may be wrong, but a search reveals that the feature should be supported given that font-variant: small-caps found nearby is being properly rendered.
Here pictured in comparison cr3 (left) and ebook-viewer of calibre which renders oldstyle-nums as intended:
Screenshot_20210525_000640
1915 and 1925 -- oldstyle numerals, P. G. Wodehouse and Standard Ebooks project -- small capitals.

@poire-z
Copy link
Contributor
poire-z commented May 25, 2021

It is supported (there might be a few caveats with inheritance, but they shouldn't trigger in the case of this book) koreader/koreader#5821 (comment)

The issue with this book is that our CSS parser is confused by some stuff at the start of epub/css/core.css, which makes it skip the first declaration (bug koreader/koreader#7199):

@charset "utf-8";
@namespace epub "http://www.idpf.org/2007/ops";  /* this is what we don't handle well */

dummy {}  /* add a first dummy declaration and the next one works */
body{
        font-variant-numeric: oldstyle-nums;
        hyphens: auto;
            color: blue; /* just to be sure it applies */
        -epub-hyphens: auto;
}

@efermi
Copy link
Author
efermi commented May 25, 2021

I see. Should this issue be closed then in favor of the linked koreader bug?

@poire-z
Copy link
Contributor
poire-z commented Aug 20, 2021

@virxkane : I'm working on this CSS parsing issue (#294 (comment)) - so you don't need to (seeing you're browsing all the issues here, you might get the idea to go at it :)

@virxkane
Copy link
Collaborator

I'm working on this CSS parsing issue (#294 (comment)) - so you don't need to

Ok. But, I was not going to :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0