- Bookmarks
- Text selection, highlights, notes, annotation editing, and annotation export
- System dictionary and text-processing integration
-- Typeface, text size, line height, margin, alignment, publisher-style, and hyphenation controls
+- Publisher or Atkinson Hyperlegible Next typeface, plus text size, line height, margin, alignment, publisher-style, and hyphenation controls
- One high-contrast e-ink appearance with colors aligned to the display's 16 grayscale levels, plus contrast and screen-brightness controls
- Fixed-page fit-to-page, fit-to-width page streams with line-preserving cuts, and 50–400% custom zoom and bounded pan
- Shared or separate even/odd crop margins with a visual crop editor
$publisherCss
</style>
<style id="alex-reader-styles">
-@font-face { font-family:'Alexandria Serif'; src:url('file:///android_asset/fonts/LibertinusSerif-Regular.otf'); font-style:normal; font-weight:400; }
-@font-face { font-family:'Alexandria Serif'; src:url('file:///android_asset/fonts/LibertinusSerif-Bold.otf'); font-style:normal; font-weight:700; }
-@font-face { font-family:'Alexandria Serif'; src:url('file:///android_asset/fonts/LibertinusSerif-Italic.otf'); font-style:italic; font-weight:400; }
-@font-face { font-family:'Alexandria Serif'; src:url('file:///android_asset/fonts/LibertinusSerif-BoldItalic.otf'); font-style:italic; font-weight:700; }
-@font-face { font-family:'Alexandria Sans'; src:url('file:///android_asset/fonts/NotoSans-Regular.ttf'); font-style:normal; font-weight:400; }
-@font-face { font-family:'Alexandria Sans'; src:url('file:///android_asset/fonts/NotoSans-Bold.ttf'); font-style:normal; font-weight:700; }
-@font-face { font-family:'Atkinson Hyperlegible'; src:url('file:///android_asset/fonts/Atkinson.otf'); }
-@font-face { font-family:'Alexandria Mono'; src:url('file:///android_asset/fonts/SourceCode-Regular.otf'); }
-:root { --alex-side:32px; --alex-v:22px; --alex-font-size:20px; --alex-line-height:1.32; --alex-font:'Alexandria Serif'; --alex-paper:#fff; --alex-ink:#000; --alex-link:#111; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_extra_light.otf') format('opentype'); font-style:normal; font-weight:200; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_extra_light_italic.otf') format('opentype'); font-style:italic; font-weight:200; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_light.otf') format('opentype'); font-style:normal; font-weight:300; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_light_italic.otf') format('opentype'); font-style:italic; font-weight:300; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_regular.otf') format('opentype'); font-style:normal; font-weight:400; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_regular_italic.otf') format('opentype'); font-style:italic; font-weight:400; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_medium.otf') format('opentype'); font-style:normal; font-weight:500; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_medium_italic.otf') format('opentype'); font-style:italic; font-weight:500; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_semi_bold.otf') format('opentype'); font-style:normal; font-weight:600; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_semi_bold_italic.otf') format('opentype'); font-style:italic; font-weight:600; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_bold.otf') format('opentype'); font-style:normal; font-weight:700; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_bold_italic.otf') format('opentype'); font-style:italic; font-weight:700; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_extra_bold.otf') format('opentype'); font-style:normal; font-weight:800; }
+@font-face { font-family:'Atkinson Hyperlegible Next'; src:url('file:///android_res/font/atkinson_hyperlegible_next_extra_bold_italic.otf') format('opentype'); font-style:italic; font-weight:800; }
+:root { --alex-side:32px; --alex-v:22px; --alex-font-size:20px; --alex-line-height:1.32; --alex-font:'Atkinson Hyperlegible Next'; --alex-paper:#fff; --alex-ink:#000; --alex-link:#111; }
html { margin:0 !important; padding:0 !important; width:100%; height:100%; overflow:hidden; background:var(--alex-paper); color:var(--alex-ink); }
-body { margin:0 !important; width:100%; color:var(--alex-ink); background:var(--alex-paper); font-family:var(--alex-font), serif; font-size:var(--alex-font-size); line-height:var(--alex-line-height); text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased; }
+body { margin:0 !important; width:100%; color:var(--alex-ink); background:var(--alex-paper); font-size:var(--alex-font-size); line-height:var(--alex-line-height); text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased; }
body.alex-paged { box-sizing:border-box; height:100vh; padding:var(--alex-v) var(--alex-side) !important; column-width:calc(100vw - (2 * var(--alex-side))); column-gap:calc(2 * var(--alex-side)); column-fill:auto; overflow:visible !important; }
body.alex-continuous { box-sizing:border-box; min-height:100%; height:auto; padding:var(--alex-v) var(--alex-side) !important; overflow:visible !important; }
html.alex-continuous { overflow-x:hidden; overflow-y:auto; }
body.alex-paged .x-ebookmaker-cover { height:calc(100vh - (2 * var(--alex-v))) !important; max-height:calc(100vh - (2 * var(--alex-v))) !important; overflow:hidden; }
svg[height="100%"], .x-ebookmaker-cover svg { display:block; height:calc(100vh - (2 * var(--alex-v))) !important; max-height:calc(100vh - (2 * var(--alex-v))) !important; }
table { max-width:100%; border-collapse:collapse; }
-pre, code { font-family:'Alexandria Mono', monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
+pre, code { white-space:pre-wrap; overflow-wrap:anywhere; }
a { color:var(--alex-link); text-decoration:underline; }
body.alex-hyphenate { -webkit-hyphens:auto; hyphens:auto; }
body.alex-no-hyphenate { -webkit-hyphens:none !important; hyphens:none !important; }
-body.alex-font-override, body.alex-font-override p, body.alex-font-override div, body.alex-font-override h1, body.alex-font-override h2, body.alex-font-override h3, body.alex-font-override h4, body.alex-font-override h5, body.alex-font-override h6 { font-family:var(--alex-font), serif !important; }
+body.alex-font-override, body.alex-font-override p, body.alex-font-override div, body.alex-font-override h1, body.alex-font-override h2, body.alex-font-override h3, body.alex-font-override h4, body.alex-font-override h5, body.alex-font-override h6 { font-family:var(--alex-font), sans-serif !important; }
body.alex-align-left .alex-chapter, body.alex-align-left p { text-align:left !important; }
body.alex-align-right .alex-chapter, body.alex-align-right p { text-align:right !important; }
body.alex-align-center .alex-chapter, body.alex-align-center p { text-align:center !important; }
function applySettings(settings, keep) {
state.settings = settings || {};
var root = document.documentElement, body = document.body;
- var family = settings.fontFamily || 'Alexandria Serif';
+ var family = settings.fontFamily || 'Atkinson Hyperlegible Next';
root.style.setProperty('--alex-font', "'" + family.replace(/'/g, '') + "'");
root.style.setProperty('--alex-font-size', Math.max(12, Math.min(38, settings.fontSize || 20)) + 'px');
root.style.setProperty('--alex-line-height', Math.max(1, Math.min(2, settings.lineHeight || 1.32)));
}
data class ReaderSettings(
- val fontFamily: String = "Alexandria Serif",
+ val fontFamily: String = ATKINSON_HYPERLEGIBLE_NEXT,
val fontSize: Int = 20,
val lineHeight: Float = 1.32f,
val margin: Int = 32,
}
companion object {
+ const val PUBLISHER = "Publisher"
+ const val ATKINSON_HYPERLEGIBLE_NEXT = "Atkinson Hyperlegible Next"
+ val FONT_FAMILIES = listOf(PUBLISHER, ATKINSON_HYPERLEGIBLE_NEXT)
+
fun fromJson(value: JSONObject): ReaderSettings = ReaderSettings(
- fontFamily = value.optString("fontFamily", "Alexandria Serif"),
+ fontFamily = when (value.optString("fontFamily", ATKINSON_HYPERLEGIBLE_NEXT)) {
+ PUBLISHER -> PUBLISHER
+ else -> ATKINSON_HYPERLEGIBLE_NEXT
+ },
fontSize = value.optInt("fontSize", 20).coerceIn(12, 38),
lineHeight = value.optDouble("lineHeight", 1.32).toFloat().coerceIn(1f, 2f),
margin = value.optInt("margin", 32).coerceIn(0, 96),
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Native UI and reader WebView share these resources; do not duplicate them under assets. -->
+<font-family xmlns:android="http://schemas.android.com/apk/res/android">
+ <font android:font="@font/atkinson_hyperlegible_next_extra_light" android:fontStyle="normal" android:fontWeight="200"/>
+ <font android:font="@font/atkinson_hyperlegible_next_extra_light_italic" android:fontStyle="italic" android:fontWeight="200"/>
+ <font android:font="@font/atkinson_hyperlegible_next_light" android:fontStyle="normal" android:fontWeight="300"/>
+ <font android:font="@font/atkinson_hyperlegible_next_light_italic" android:fontStyle="italic" android:fontWeight="300"/>
+ <font android:font="@font/atkinson_hyperlegible_next_regular" android:fontStyle="normal" android:fontWeight="400"/>
+ <font android:font="@font/atkinson_hyperlegible_next_regular_italic" android:fontStyle="italic" android:fontWeight="400"/>
+ <font android:font="@font/atkinson_hyperlegible_next_medium" android:fontStyle="normal" android:fontWeight="500"/>
+ <font android:font="@font/atkinson_hyperlegible_next_medium_italic" android:fontStyle="italic" android:fontWeight="500"/>
+ <font android:font="@font/atkinson_hyperlegible_next_semi_bold" android:fontStyle="normal" android:fontWeight="600"/>
+ <font android:font="@font/atkinson_hyperlegible_next_semi_bold_italic" android:fontStyle="italic" android:fontWeight="600"/>
+ <font android:font="@font/atkinson_hyperlegible_next_bold" android:fontStyle="normal" android:fontWeight="700"/>
+ <font android:font="@font/atkinson_hyperlegible_next_bold_italic" android:fontStyle="italic" android:fontWeight="700"/>
+ <font android:font="@font/atkinson_hyperlegible_next_extra_bold" android:fontStyle="normal" android:fontWeight="800"/>
+ <font android:font="@font/atkinson_hyperlegible_next_extra_bold_italic" android:fontStyle="italic" android:fontWeight="800"/>
+</font-family>