readium / swift-toolkit

A toolkit for ebooks, audiobooks and comics written in Swift
https://readium.org/mobile/
BSD 3-Clause "New" or "Revised" License
223 stars 96 forks source link

Pinning the font size (for <p>, <li>, <div>, etc) #375

Closed smoores-dev closed 5 months ago

smoores-dev commented 5 months ago

Describe the bug

Sorry, this isn't really a bug, I don't think, but that's the only Issue option right now!

Is there any way to set/override a default base font-size for the Navigator? I know of fontSize (a multiplier on the root font size of the document) and typeScale (a more limited multiplier on font size? I'm actually unsure), but neither of these allow the app to set a baseline font size for all books.

This is coming up because, even just in the handful of published EPUBs I'm using for testing, there are some wild variations in font size, which makes for a jarring reading experience when switching between books. One publisher in particular seems to like to set p { font-size: small } for some godforsaken reason, so the text is absolutely tiny (13px!) on a phone screen.

How to reproduce?

This is really a request for help/feature request if there's no current way to do this; there's no repro steps

Readium version

2.6.1

OS version

17.2

Testing device

iPhone 12 (emulator)

Environment

No response

Additional context

No response

mickael-menu commented 5 months ago

You can open a Q&A discussion instead of an issue for this kind of requests: https://github.com/readium/swift-toolkit/discussions/new?category=q-a