Skip to content

fix(mobile): enforce reader font sizing#440

Open
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-mobile-reader-font-sizing
Open

fix(mobile): enforce reader font sizing#440
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-mobile-reader-font-sizing

Conversation

@codedogQBY

@codedogQBY codedogQBY commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Analysis

  • bug反馈:最新手机版1.3字体调整无效 #127 reports that changing font size on mobile only changes line spacing while the actual glyph size stays unchanged.
  • The mobile reader injected font-size only on :root/body, while many EPUBs define their own fixed sizes on p, div, span, li, etc. The existing CSS already forced line-height on those nodes, which explains why line spacing changed but glyph size did not.
  • [Bug] 导入字体以后依旧无法修改 #434 reports Android font changes still not taking effect after importing a font. The same override gap can prevent the selected custom font from winning over book CSS.

Changes

  • Force the selected reader font family through the non-vertical body subtree, excluding SVG/math/code-like content.
  • Apply the reader font size directly to common body text elements (p, div, blockquote, dd, li, span) so book-level fixed font sizes no longer override the setting.
  • Keep vertical writing compatibility rules unchanged.
  • Rebuild packages/app-expo/assets/reader/reader.html from the updated template.

Verification

  • pnpm --filter @readany/app-expo run build:reader
  • git diff --check
  • pnpm --filter @readany/app-expo exec tsc --noEmit
  • Static check that generated reader.html includes the new font override selectors

Related: #107 tracks the broader local-font import flow and is not closed by this PR.

Fixes #127
Fixes #434

@codedogQBY codedogQBY added bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression area:reader Reader, pagination, scrolling, layout, TOC area:mobile Mobile, tablet, React Native, Android, iOS area:ui Visual UI, layout, polish, usability labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:mobile Mobile, tablet, React Native, Android, iOS area:reader Reader, pagination, scrolling, layout, TOC area:ui Visual UI, layout, polish, usability bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 导入字体以后依旧无法修改 bug反馈:最新手机版1.3字体调整无效

1 participant