Skip to main content
Version: Next

Preferences

How the reader lays out and styles a publication: theme, font size, margins and the rest. Readium's defaults apply to anything left out, and PublicationReadyEvent.capabilities says which of these the publication you opened responds to.

Every value a preference accepts is a named type — ReaderTheme, ReaderSpread and so on — so your editor offers them. fontFamily is the exception: it takes any family the platform can resolve, with ReaderFontFamily offered as suggestions.

Extends​

  • Omit<SpecPreferences, "fontFamily" | "columnCount">

Properties​

columnCount?​

optional columnCount?: ReaderColumnCount;

How many columns a reflowable publication is laid out in.

Narrowed here rather than in the view's own definition, where it would be generated as a native enum with a case called 1. See ReaderColumnCount.


fontFamily?​

optional fontFamily?:
| ReaderFontFamily
| string & object;

Any font family the platform can resolve, by name. ReaderFontFamily lists the ones Readium knows.


backgroundColor?​

optional backgroundColor?: string;

Inherited from​

Omit.backgroundColor

fontSize?​

optional fontSize?: number;

Inherited from​

Omit.fontSize

fontWeight?​

optional fontWeight?: number;

Inherited from​

Omit.fontWeight

hyphens?​

optional hyphens?: boolean;

Inherited from​

Omit.hyphens

imageFilter?​

optional imageFilter?: ReaderImageFilter;

Inherited from​

Omit.imageFilter

language?​

optional language?: string;

Inherited from​

Omit.language

letterSpacing?​

optional letterSpacing?: number;

Inherited from​

Omit.letterSpacing

ligatures?​

optional ligatures?: boolean;

Inherited from​

Omit.ligatures

lineHeight?​

optional lineHeight?: number;

Inherited from​

Omit.lineHeight

pageMargins?​

optional pageMargins?: number;

Inherited from​

Omit.pageMargins

paragraphIndent?​

optional paragraphIndent?: number;

Inherited from​

Omit.paragraphIndent

paragraphSpacing?​

optional paragraphSpacing?: number;

Inherited from​

Omit.paragraphSpacing

publisherStyles?​

optional publisherStyles?: boolean;

Inherited from​

Omit.publisherStyles

readingProgression?​

optional readingProgression?: ReaderReadingProgression;

Inherited from​

Omit.readingProgression

scroll?​

optional scroll?: boolean;

Inherited from​

Omit.scroll

spread?​

optional spread?: ReaderSpread;

Inherited from​

Omit.spread

textAlign?​

optional textAlign?: ReaderTextAlign;

Inherited from​

Omit.textAlign

textColor?​

optional textColor?: string;

Inherited from​

Omit.textColor

textNormalization?​

optional textNormalization?: boolean;

Inherited from​

Omit.textNormalization

theme?​

optional theme?: ReaderTheme;

Inherited from​

Omit.theme

typeScale?​

optional typeScale?: number;

Inherited from​

Omit.typeScale

verticalText?​

optional verticalText?: boolean;

Inherited from​

Omit.verticalText

wordSpacing?​

optional wordSpacing?: number;

Inherited from​

Omit.wordSpacing

fit?​

optional fit?: ReaderFit;

Inherited from​

Omit.fit

offsetFirstPage?​

optional offsetFirstPage?: boolean;

Inherited from​

Omit.offsetFirstPage

pageSpacing?​

optional pageSpacing?: number;

Inherited from​

Omit.pageSpacing

scrollAxis?​

optional scrollAxis?: ReaderScrollAxis;

Inherited from​

Omit.scrollAxis

visibleScrollbar?​

optional visibleScrollbar?: boolean;

Inherited from​

Omit.visibleScrollbar