readium / readium-css

šŸŒˆ A set of reference stylesheets for EPUB Reading Systems, starting with Readium Mobile
https://readium.org/readium-css/
BSD 3-Clause "New" or "Revised" License
92 stars 20 forks source link

Font not applying on the header Title of book. #147

Closed Aslanyan99n closed 1 week ago

Aslanyan99n commented 3 months ago

I'm submitting a bug. Font not applying on the header Title of book. I am using swift-toolkit for supporting epub books. When I setting font for book it not applying font for headers, it only work for text content. I expected set correct font for each of text.

Screenshot 2024-06-13 at 09 48 46 Screenshot 2024-06-13 at 09 49 00
JayPanoz commented 3 months ago

Hi,

Weā€™re currently reworking ReadiumCSS into an unopinionated library so this feedback is very useful. Thank you.

Currently, headings are not targeted when changing the font in user settings:

https://github.com/readium/readium-css/blob/2e1bb29d02de1b2d36ec960eb90c2c4ac238b346/css/src/modules/user-settings-submodules/ReadiumCSS-fontFamily_pref.css#L13-L20

However, itā€™s handled differently for the ā€œAccessible fontsā€:

https://github.com/readium/readium-css/blob/2e1bb29d02de1b2d36ec960eb90c2c4ac238b346/css/src/modules/user-settings-submodules/ReadiumCSS-a11yFont_pref.css#L36-L42

Which smells like making an artificial distinction, since a user could use a non-accessibility-specific font for accessibility reasons.

Thereā€™s an accessibility normalisation flag available in that case, but itā€™s pretty global since it will also remove bolding, italicising, etc.

Originally, one goal was to find a balance between Reading System/appsā€™ overrides and authoring ā€“ in typography and book design fonts can carry a lot of meaning, and overriding may not be the ideal solution in some cases as meaning will be lost. So itā€™s not uncommon apps decide not to override the font for headings as a consequence.

That being said, thereā€™s no way to guarantee weā€™re not losing meaning in body copy or divs, or lists, etc. And well, if you want to enjoy the original design, you can always switch back to publishersā€™ fonts.

So itā€™s a default we will have to discuss in the redesign process.

Aslanyan99n commented 3 months ago

Hi. Thank you for your valuable feedback.

Š²Ń‚, 18 ŠøюŠ½. 2024ā€ÆŠ³. Š² 18:38, Jiminy Panoz @.***>:

Hi,

Weā€™re currently reworking ReadiumCSS into an unopinionated library so this feedback is very useful. Thank you.

Currently, headings are not targeted when changing the font in user settings:

https://github.com/readium/readium-css/blob/2e1bb29d02de1b2d36ec960eb90c2c4ac238b346/css/src/modules/user-settings-submodules/ReadiumCSS-fontFamily_pref.css#L13-L20

However, itā€™s handled differently for the ā€œAccessible fontsā€:

https://github.com/readium/readium-css/blob/2e1bb29d02de1b2d36ec960eb90c2c4ac238b346/css/src/modules/user-settings-submodules/ReadiumCSS-a11yFont_pref.css#L36-L42

Which smells like making an artificial distinction, since a user could use a non-accessibility-specific font for accessibility reasons.

Thereā€™s an accessibility normalisation flag available https://readium.org/readium-css/docs/CSS12-user_prefs.html#accessibility-normalization in that case, but itā€™s pretty global since it will also remove bolding, italicising, etc.

Originally, one goal was to find a balance between Reading System/appsā€™ overrides and authoring ā€“ in typography and book design fonts can carry a lot of meaning, and overriding may not be the ideal solution in some cases as meaning will be lost. So itā€™s not uncommon apps decide not to override the font for headings as a consequence.

That being said, thereā€™s no way to guarantee weā€™re not losing meaning in body copy or divs, or lists, etc. And well, if you want to enjoy the original design, you can always switch back to publishersā€™ fonts.

So itā€™s a default we will have to discuss in the redesign process.

ā€” Reply to this email directly, view it on GitHub https://github.com/readium/readium-css/issues/147#issuecomment-2176268564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLEWF7GV3GOMIFXMXHK52LZIBA5HAVCNFSM6AAAAABJHVCR36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGI3DQNJWGQ . You are receiving this because you authored the thread.Message ID: @.***>