-
Notifications
You must be signed in to change notification settings - Fork 20
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
Paragraphs and headings not affected by font-size #112
Comments
I believe the culprit is: readium-css/css/src/modules/ReadiumCSS-fs_normalize.css Lines 18 to 24 in 5830114
...and: readium-css/css/src/ReadiumCSS-default.css Lines 96 to 135 in 5830114
@JayPanoz if you have time, do you know a workaround for this aggressive normalization of font size via REM units? |
@danielweck I don’t have any workaround except not using this “fs-normalize” and switch to a native API for the font-size setting. Remember this normalize exists because of EPUBs using absolute units e.g. EDITED BY @danielweck --- copied @JayPanoz 's comment here: Yep, that’s the normalisation due to some EPUB authors using absolute values for font-size. As usual the advice is to use a “native feature” to handle font-size setting if available/possible. Cf. #34 |
I wonder how other reading systems deal with this? (Apple iBooks in particular) In Readium "1" we used runtime-expensive script-driven DOM tree walk + style computation (effective pixel size) + scale factor ... so definitely not something we want to replicate with ReadiumCSS which is entirely declarative at this point. |
Thank you for considering this issue. There is another normalization issue which I think would be important to adress, the normalization of heading sizes: edrlab/thorium-reader#1508. Headings are such an important element in book layout and typography. It is difficult to use Thorium for previewing epubs in a production process, or to recommend it to readers and colleagues, as long as it does not respect the book's stylesheet. The epub specification agrees that author stylesheets need to be respected: https://www.w3.org/publishing/epub3/epub-contentdocs.html#sec-css-rs-overrides |
Note that I have now merged issue edrlab/thorium-reader#1508 here. |
Reminder of this informative discussion: #34 |
Related / duplicate issue? #111 From Nancy Zhang. A sample was requested. I’ve just noticed that text in Blockquote displays in smaller font size in Thorium although it is set up the same size as other text in the stylesheet.ccs file but in Sigil, it is like this: the two portions of text in the same size: and it looks like it is not adjustable in the Text panel; other text would change in size with the slider, but text in blockquote remains the same. I was wondering what I have missed, why this portion of text shows smaller, and how I could make changes to the font size in blockquote in Thorium, if possible. |
Reported in Thorium by @dualpixel-digital : Hi, I have one more improvement/fix suggestion for the next release. I have an alpha version of version 2, with debug option. I would like to understand why Thorium doesn't respect the font-size value, in space in the h1-h6 tags? Note the difference between the desired result (Readium) and the result of Thorium Is there a best formatting practice in CSS to ensure text sizes are recognized? |
Another related issue from Thorium: Reported by @spudthebud ===> This is a fictitious user story to illustrate the point User story This also applies to an book from a university publisher, as the next image shows: |
Merged from edrlab/thorium-reader#1106 It seems I have a similar problem: (Thorium-Reader on Windows 10, epub) Even though I can read the "normal" text with the screen reader, it is better understanding to read the code examples myself. Helpful would be therefore:
But otherwise this is a really nice program, thanks! |
Merged from edrlab/thorium-reader#1106 Reading some programming books in EPUB format, I thought it would be cool to render code snippets, that are styled in CSS accordingly, in monospace font. @danielweck, sorry, looks like I have instinctively switched the font because default one looks so Windows9x-ish and it's hard to read, I honestly don't remember when I did this 🙄 |
Indeed but we’re only applying So it seems to me the user setting is applied to code because it’s using That said, it wouldn’t solve this rendering issue raised by @weiss-d
That’s quite tricky with CSS only since emulating defaults (for But I can imagine Electron has something for that? |
Now here's an actual user story: I'm working for a large publisher, we're creating 1500-2000 EPUBs each year and have just moved from ADE to Thorium without knowing about this issue. We've got a well-tuned CSS in place for use in the majority our EPUBs, which is using rem values for regulating font size in the title page, and other places. Has there really not been any progress on this issue in 18 months? It still persists because, rather than letting people who are erroneously using absolute units in an EPUBs CSS take the fall, the decision was made that font size must be aggressively normalized, even if relative units are used? Whereas font size is handled well enough by Apple Books, KPR and ADE? Without a checkbox to easily turn this normalization off? Sorry, I'm honestly baffled.
|
Hello @man-we , thank you for your feedback. Readium CSS is an open-source project that could do with some love from developers / maintainers. In Thorium we implemented a few tweaks / workarounds in order to address weird edge-cases in ReadiumCSS, but we always report problems upstream (here in this repository) just in case the issues we encounter specifically in Electron/Chromium also generally affect other projects (e.g. the Readium "mobile" iOS and Android toolkits). Besides exploring issues related to proportional font scaling, I have been looking at ways to disable some ReadiumCSS features in order to come as close as possible to "leave me alone" (i.e. strict minimum alterations of publisher styles in order to preserve "essential" reading-system overrides, such as colour themes, word/line/paragraph spacing, etc.). However, whenever I turn off some of the "normalised" styling, I seem to come across weird edge-case issues with image dimensions / scaling (especially in paginated / CSS columns mode, not so much in vertical scrolling mode), or internationalisation problems (locales that have specific glyph rendering rules) ... the original developer of ReadiumCSS did a lot of research in order to come up with a sane baseline. All that said, I completely agree that this particular font sizing issue needs to be bumped up the list of priorities. Let me have a look at Thorium/Electron/Chromium specifically. I need to revisit the workarounds I tried in past iterations. |
Related issue: #95 |
report from @CLnordcompo Here is the problem: Thanks in advance |
From edrlab/thorium-reader#2073 Hi, The code clearly shows that it is h1 header tag on xhtml file: |
Issue originally reported by @jonaslil :
edrlab/thorium-reader#1550
Summary
All p elements are displayed with the same font size, regardless of publisher css.
Problem
Lack of variation in font size distorts the layout of title pages and other special text elements. Endnotes, bibliographies, figcaptions containing p:s, which are usually styled smaller, are rendered with body text size (= 1 em).
Variations in font size are a basic typographic means to communicate text structure and hierarchy.
Tested with v1.7.2 on Windows.
Example
Title page in Thorium
Main title much too small, publisher info much too large:
Title page in ADE
Sample book
Download book here
Code
HTML
CSS
p.book-author {
font-size: 1.4em;
font-style: italic;
line-height: 1;
margin-top: 2em;
text-indent: 0;
}
p.book-title {
font-family: "Source Serif Subhead", serif;
text-transform: uppercase;
font-size: 2.2em;
letter-spacing: 0.025em;
font-weight: bold;
line-height: 1;
margin-top: 1.5em;
text-indent: 0;
}
p.book-author + p.book-title {
margin-top: 1.5rem;
}
p.book-subtitle {
font-size: 1.4em;
line-height: 1.3;
margin-top: 1.2rem;
text-indent: 0;
}
p.editors {
font-size: 1.25em;
line-height: 1.3;
margin-top: 3rem;
font-style: italic;
text-indent: 0;
}
p.publisher {
font-size: 0.9em;
line-height: 1.4;
margin-top: 4rem;
text-indent: 0;
font-variant: small-caps;
letter-spacing: 0.08em;
page-break-before: avoid;
}
Issue originally reported by @apgrover :
edrlab/thorium-reader#1508
Summary
Setting font-size on h1-h6 tags does not render a visual change. Default h1-h6 font sizes appear instead.
Scope
Observed in Thorium for PC/Mac v1.6.0
Expected
Setting font-size: 2.5em on h1-h6 will set each element to the same font size.
Observed
font-size: 2.5em is ignored on h1-h6 and default font size appears instead.
Code Example
HTML
CSS
Sample file available upon request.
The text was updated successfully, but these errors were encountered: