This new major version brings a new philosophy to the project. It is as unopinionated as possible to put developers into complete control of EPUB rendering and user settings.
This version removes most pain points developers have experienced during years of implementation, in addition to bug fixes and quality-of-life improvements.
It consequently comes with its fair share of breaking changes but we have a migration guide available to help you transition more smoothly.
🚀 New Features
- The library now supports a line-length, that applies a
max-widthto thebody(#151) - The library now supports variable fonts and provides settings for
weightandwidth(#151) - The theming system has been revamped and replaces the limited subset of reading modes (#163 + #194)
- You can now add
paddingin the scroll view to handle safe-area insets or make sure content is not hidden behind some of your app’s UI elements (#186) - The library provides an experimental stylesheet for Web Publications (#201)
- We introduced experimental flags to test more advanced heuristics in some user settings (#200)
✨ Enhancements
- Letter-spacing has been enabled for CJK (#150)
- You can now hide ruby annotations in Japanese (#150)
- Columns now accept any integer and not only
1or2(#151) - Overflow management has been improved (#151)
- The font-family user setting has been extended to more elements (#151)
- Word spacing is now enabled for right-to-left languages (#157)
- The font-size user setting has been completely rewritten and now relies on browser zoom (#162)
- User settings no longer require advanced and font flags, the value you set is applied directly (#170)
- Text align user setting has been improved (#200)
🐛 Bug Fixes
- A problematic style impacting performance in Chromium has been removed (#117)
- Japanese font stacks have been corrected (#146)
- Audio and SVG safeguards have been corrected (#150)
- Inheritance of
text-align: starthas been fixed (#150) - MathML namespace has been corrected (#156)
- Text normalisation has been corrected as it was overriding variable font settings (#199)
🛠️ Refactoring & Maintenance
- Sourcemaps have been disabled (#150)
- Highlights module has been removed (#150)
- Responsive columns have been removed (#151)
- A new flag allows to opt out of vertical writing pagination in CJK (#151)
- The list of recommended fonts has been updated (#151)
- The package now exports JSON so that you can retrieve values of some pagination, color, and fonts properties in your app (#161)
- You can opt out of overflow management if necessary (#185)
- Reading modes have been removed (#194)
pageGutternow only applies in columns (#210)- Fonts are no longer declared and distributed in the package (#212)
- The default line-length is now
100%of body, and is no longer limited to40rem(#213)
➡️ Migrate
- User setting that needed advanced + font flags will keep working even if you do not remove these flags
- The new font-size implementation can be disabled by opting in the deprecated one if you need to test it first (#175)
- Responsive pagination is no longer implemented, you will have to implement it yourself if you want to.
- Page margins have been replaced with line-length.
- Fonts are no longer distributed with Readium CSS, you will have to provide them and their
@font-facerules yourself. - This means Accessible DfA and iA Writer Duospace are no longer officially supported through user settings.
- Reading modes have been removed, you will need to migrate to the new theming system.
pageGutterno longer applies in scroll, only in paginated mode. You can usescrollPaddingproperties in scroll view instead.- The default line-length is now
100%of the body width, it is no longer limited to40rem.
TS toolkit Navigator can also serve as a reference implementation if needed.
Full Changelog: v.1.1.1...v2.0.0