Overriding the paragraph font size #376
-
Is there any way to set/override a default base font-size for the Navigator? I know of 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 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There's nothing out of the box for setting the base font size. But looking at Readium CSS's documentation, I think you should be able to set the https://github.com/readium/readium-css/blob/master/docs/CSS08-defaults.md#typography For some reason, it looks like I forgot to add it in the constructor of EPUBNavigatorViewController(
config: EPUBNavigatorViewController.Configuration(
readiumCSSRSProperties: CSSRSProperties(
overrides: ["--RS__baseFontSize": "14px"]
)
)
) All the properties in But from the problem you described, I think you might be able to fix it just by reducing the |
Beta Was this translation helpful? Give feedback.
Oh yes, I forgot to mention the
readium-advanced-on
flag. This can help, as well as the text normalization.UserSettings
is deprecated but kept for backward compatibility. What you want isEPUBDefaults
, you can initialize theEPUBNavigatorViewController
with:If you want to let the user control whether or not the
publisherStyles
setting is disabled, you can useEPUBPreferences
andEPUBNavigatorViewController.submitPreferences
instead.EPUBDefaults
are the fallback static setting values …