-
- All Implemented Interfaces:
-
org.readium.r2.navigator.epub.css.Cssable,org.readium.r2.navigator.epub.css.Properties
public final class UserProperties implements Properties
User settings properties.
See https://readium.org/readium-css/docs/CSS19-api.html#user-settings
-
-
Field Summary
Fields Modifier and Type Field Description private final Viewviewprivate final ColCountcolCountprivate final DoublepageMarginsprivate final Appearanceappearanceprivate final BooleandarkenImagesprivate final BooleaninvertImagesprivate final ColortextColorprivate final ColorbackgroundColorprivate final BooleanfontOverrideprivate final List<String>fontFamilyprivate final LengthfontSizeprivate final BooleanadvancedSettingsprivate final DoubletypeScaleprivate final TextAligntextAlignprivate final Either<Length, Double>lineHeightprivate final LengthparaSpacingprivate final Length.RemparaIndentprivate final Length.RemwordSpacingprivate final Length.RemletterSpacingprivate final HyphensbodyHyphensprivate final Ligaturesligaturesprivate final Booleana11yNormalizeprivate final Map<String, String>overrides
-
Constructor Summary
Constructors Constructor Description UserProperties(View view, ColCount colCount, Double pageMargins, Appearance appearance, Boolean darkenImages, Boolean invertImages, Color textColor, Color backgroundColor, Boolean fontOverride, List<String> fontFamily, Length fontSize, Boolean advancedSettings, Double typeScale, TextAlign textAlign, Either<Length, Double> lineHeight, Length paraSpacing, Length.Rem paraIndent, Length.Rem wordSpacing, Length.Rem letterSpacing, Hyphens bodyHyphens, Ligatures ligatures, Boolean a11yNormalize, Map<String, String> overrides)
-
Method Summary
Modifier and Type Method Description final ViewgetView()final ColCountgetColCount()final DoublegetPageMargins()final AppearancegetAppearance()final BooleangetDarkenImages()final BooleangetInvertImages()final ColorgetTextColor()final ColorgetBackgroundColor()final BooleangetFontOverride()final List<String>getFontFamily()final LengthgetFontSize()final BooleangetAdvancedSettings()final DoublegetTypeScale()final TextAligngetTextAlign()final Either<Length, Double>getLineHeight()final LengthgetParaSpacing()final Length.RemgetParaIndent()final Length.RemgetWordSpacing()final Length.RemgetLetterSpacing()final HyphensgetBodyHyphens()final LigaturesgetLigatures()final BooleangetA11yNormalize()final Map<String, String>getOverrides()Map<String, String>toCssProperties()-
-
Constructor Detail
-
UserProperties
UserProperties(View view, ColCount colCount, Double pageMargins, Appearance appearance, Boolean darkenImages, Boolean invertImages, Color textColor, Color backgroundColor, Boolean fontOverride, List<String> fontFamily, Length fontSize, Boolean advancedSettings, Double typeScale, TextAlign textAlign, Either<Length, Double> lineHeight, Length paraSpacing, Length.Rem paraIndent, Length.Rem wordSpacing, Length.Rem letterSpacing, Hyphens bodyHyphens, Ligatures ligatures, Boolean a11yNormalize, Map<String, String> overrides)
- Parameters:
view- User view: paged or scrolled.colCount- The number of columns (column-count) the user wants displayed (one-page view or two-page spread).pageMargins- A factor applied to horizontal margins (padding-left and padding-right) the user wants to set.appearance- This flag applies a reading mode (sepia or night).darkenImages- This will only apply in night mode to darken images and impact img.invertImages- This will only apply in night mode to invert images and impact img.textColor- The color for textual contents.backgroundColor- The background-color for the whole screen.fontOverride- This flag is required to change the font-family user setting.fontFamily- The typeface (font-family) the user wants to read with.fontSize- Increasing and decreasing the root font-size.advancedSettings- This flag is required to apply the font-size and/or advanced user settings.typeScale- The type scale the user wants to use for the publication.textAlign- The alignment (text-align) the user prefers.lineHeight- Increasing and decreasing leading (line-height).paraSpacing- The vertical margins (margin-top and margin-bottom) for paragraphs.paraIndent- The text-indent for paragraphs.wordSpacing- Increasing space between words (word-spacing, related to a11y).letterSpacing- Increasing space between letters (letter-spacing, related to a11y).bodyHyphens- Enabling and disabling hyphenation.ligatures- Enabling and disabling ligatures in Arabic (related to a11y).a11yNormalize- It impacts font style, weight and variant, text decoration, super and subscripts.
-
-
Method Detail
-
getColCount
final ColCount getColCount()
-
getPageMargins
final Double getPageMargins()
-
getAppearance
final Appearance getAppearance()
-
getDarkenImages
final Boolean getDarkenImages()
-
getInvertImages
final Boolean getInvertImages()
-
getTextColor
final Color getTextColor()
-
getBackgroundColor
final Color getBackgroundColor()
-
getFontOverride
final Boolean getFontOverride()
-
getFontFamily
final List<String> getFontFamily()
-
getFontSize
final Length getFontSize()
-
getAdvancedSettings
final Boolean getAdvancedSettings()
-
getTypeScale
final Double getTypeScale()
-
getTextAlign
final TextAlign getTextAlign()
-
getLineHeight
final Either<Length, Double> getLineHeight()
-
getParaSpacing
final Length getParaSpacing()
-
getParaIndent
final Length.Rem getParaIndent()
-
getWordSpacing
final Length.Rem getWordSpacing()
-
getLetterSpacing
final Length.Rem getLetterSpacing()
-
getBodyHyphens
final Hyphens getBodyHyphens()
-
getLigatures
final Ligatures getLigatures()
-
getA11yNormalize
final Boolean getA11yNormalize()
-
getOverrides
final Map<String, String> getOverrides()
-
toCssProperties
Map<String, String> toCssProperties()
-
-
-
-