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-onflag. This can help, as well as the text normalization.UserSettingsis deprecated but kept for backward compatibility. What you want isEPUBDefaults, you can initialize theEPUBNavigatorViewControllerwith:If you want to let the user control whether or not the
publisherStylessetting is disabled, you can useEPUBPreferencesandEPUBNavigatorViewController.submitPreferencesinstead.EPUBDefaultsare the fallback static setting values …