Repository navigation
Embed Andika in BloomPUBs made for RAB apps (BL-17007) - #8461
andrew-polk wants to merge 6 commits into
Conversation
BloomPUBs don't embed Andika, and RAB apps neither serve it under the names bloom-player requests nor allow bloom-player's online fallback, so Andika text showed in the phone's font. Bloom now lists Andika's four faces in the project's .appDef and copies them into its fonts folder; RAB then declares Andika in every book's fonts.css. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the previous commit's per-app copy of Andika. BloomPUBs leave Andika out because Bloom Reader and other hosts supply it, but a RAB app neither serves it under the names bloom-player requests nor allows bloom-player's online fallback, so Andika text showed in the phone's font. BloomPUBs made for an app now embed the Andika faces the book uses, like any other font. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
[Claude Opus 5.5 from Andrew Polk's machine during preflight] Consulted Devin on 2026-10-09 up to commit 7f96c5e. It raised one bug (Andika New Basic text still uses the phone's font in apps; left open for the developer's decision) and one flag to investigate (cached BloomPUBs bypassing the new flag; not an issue, since the cache is cleared each time the Apps screen opens). Both have their own review threads. No informational items. |
Bloom Reader answers requests for Andika New Basic with Andika, but a Reading App Builder app has nothing that does. So when a BloomPUB is made for an app, text in Andika New Basic now gets the matching Andika faces, and the book's references to Andika New Basic (the language stylesheets, user-modified styles and inline styles) are rewritten to Andika using the existing missing-font rewrite. Found by Devin on PR 8461. Also logs a papercut: RabRealBuildTests cannot pass on a ReFS drive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rewrite that points a book's references to fonts we can't embed (and, in app BloomPUBs, to Andika New Basic) at Andika matched only a bare or single-quoted name in the stylesheets and only a bare name in the book's own styles. A double-quoted name, or a quoted name in a user style, kept the old font and fell back to the device font. Both helpers now accept a bare, single-quoted or double-quoted name, escaped as a literal. Found by Devin on PR 8461. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
[Claude Opus 5.5 from Hatton's machine during preflight] Consulted Devin on 2026-10-10 up to commit 9a8aa8b. Since the last log it found one new bug, that quoted "Andika New Basic" names were not rewritten. That is fixed in 9a8aa8b, and Devin now marks it resolved. It also raised two flags: one about the test was not an issue, and one about the out-of-date PR description was already fixed. The earlier Andika New Basic bug is fixed in 565f078. Each has its own resolved thread. No other findings. |
Problem
In apps built on Publish > Apps (Reading App Builder), text in Andika shows in the phone's own font. A reader sees a two-story "a" instead of Andika's single-story one. Other fonts work. A tester reported it on 6.5.101 Beta.
Cause
BloomPUBs never embed Andika, because Bloom Reader and other hosts supply it to bloom-player. A RAB app doesn't:
host/fonts/Andika-Regular.woff2and similar names, but bloom-player asks forhost/fonts/Andika, so it never finds them (sillsdev/app-builders#2510).Status: a stopgap
The real fix belongs in Reading App Builder (sillsdev/app-builders#2510). We've decided to ship this Bloom-side stopgap until it arrives. After it merges to master, it also goes to
Version6.5in a separate PR.What the PR does
fonts.cssrules. Other BloomPUBs (Bloom Reader, the library, USB/Wi-Fi) are unchanged.An earlier version of this branch, which shipped one copy of Andika per app, showed Andika on a phone. This final version hasn't been on a phone yet. Its APK holds only the faces the book uses (Regular and Bold for the test book), and the book's own Andika rules come last in
fonts.css, so they win.Risk Evaluation
Low. Most of the change sits behind a flag that only the app path sets. When it isn't set,
EmbedFontsbehaves exactly as before. The exception is the font-replacement rewrite (FixCssReferencesForBadFonts,FixXmlDomReferencesForBadFonts), which every ePUB and BloomPUB runs when a book uses a font Bloom can't embed. It now also matches quoted names, and treats the font name as literal text rather than a pattern. When it is set, Andika goes through the same embedding code every other font already uses. Bloom's font lookup already includes the fonts Bloom serves fromDistFiles/fonts, the same route ABeeZee takes.Ecosystem Impact
E2E Coverage
No end-to-end test builds an app, because that needs RAB and a Gradle build. The opt-in
RabRealBuildTestsreal-build test passed on Andrew's machine. New unit tests check thatEmbedFontsembeds Andika, and points Andika New Basic text at it, only when asked.Notion Test Suite
Two existing manual test cases now check Andika and Charis SIL in the built app on an offline phone (6.6 runs). Both are manual (no automation).
Preflight report: https://bloombooks.github.io/dev-process-artifacts/deciders/bloomdesktop-bl-17007-rab-andika.html
Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-17007
🤖 Generated with Claude Code
Devin review
This change is