Bayaan draws every mushaf page from text and fonts, not from page images. In the Mushaf 1440 beta, line 3 of page 414 ran 38% wider than the page’s typical line. In the stable layout, all 8,790 full lines of the 604 pages meet both margins. Counted from the app’s layout data and page fonts, 14 Nov 2026; checked by tests, not yet on a phone: where it stops.
Mushaf pages, drawn live
The beta set the new print’s glyphs on the old print’s lines, so lines ran wider or narrower than the page. The rebuilt layout draws each page line for line like the print.
- Live in the app since
- Public code for Mushaf 1440, merged
In short
Page 414, as the beta drew it and as it is drawn now
Mushaf 1440 draws each word as a single glyph from the King Fahd Complex’s fonts for the 1441H Madinah print. Each glyph is already stretched for its place on its printed line. The beta set those glyphs on the lines of the older 1421H print, where a line holds other words, so lines came out too long or too short. Nowhere did a line stand out further from the rest of its page than on page 414.
Page 414: where each line ends, in the beta and now
Each bar is one line, as wide as its glyphs; the dashed rules are the text block’s margins. Beta (2.3): the 1421H print’s lines, centred, the page sized by its widest ordinary line. Now: the 1441H print’s lines, justified. Counted from the app’s layout data and the page font’s glyph advances, 14 Nov 2026.
- A line of text
- Line 3 of the beta’s page
- Margins of the text block
Beta 2.3, 18 Oct 2026
Line 3 runs 38% wider than the page’s typical line. The next surah’s title is stranded at the foot of the page.
Now merged 14 Nov 2026
15 lines of text, each flush with both margins. The title opens the next page, as in the print.
Show the numbers
| Line | Beta | Beta, against the page’s typical line | Now |
|---|---|---|---|
| 1 | 91% | +16.0% | 100% |
| 2 | 100% | +27.7% | 100% |
| 3 | 108% | +38.1% | 100% |
| 4 | 82% | +4.6% | 100% |
| 5 | 87% | +11.5% | 100% |
| 6 | 78% | −0.1% | 100% |
| 7 | 78% | −0.4% | 100% |
| 8 | 74% | −5.8% | 100% |
| 9 | 83% | +5.9% | 100% |
| 10 | 78% | −0.8% | 100% |
| 11 | 78% | −0.6% | 100% |
| 12 | 78% | −0.7% | 100% |
| 13 | 78% | −0.4% | 100% |
| 14 | 78% | +0.1% | 100% |
| 15 | Next surah’s title | — | 100% |
The wrong print’s lines, on every page
Page 414 was the extreme, not the exception. Measured the same way on every page, only 42% of the beta’s 8,790 full lines came within 1% of their page’s margins, and on 251 of the 604 pages at least one line ran more than 10% wider or narrower than the page.
How close each full line comes to the margins
All 8,790 full lines of the 604 pages, by how far a line’s width sits from its page’s text block. Beta: as it drew them. Now: as the stable layout draws them. Counted from the app’s layout data and page fonts, 14 Nov 2026.
- Within 1%
- 1 to 5%
- 5 to 10%
- 10 to 20%
- Over 20%
Show the numbers
| Width against the text block | Beta | Now |
|---|---|---|
| Within 1% | 3,686 (41.9%) | 8,790 (100.0%) |
| 1 to 5% | 2,180 (24.8%) | 0 (0.0%) |
| 5 to 10% | 2,309 (26.3%) | 0 (0.0%) |
| 10 to 20% | 577 (6.6%) | 0 (0.0%) |
| Over 20% | 38 (0.4%) | 0 (0.0%) |
| Full lines | 8,790 | 8,790 |
Justified the way the print is
The stable layout takes the print’s own line breaks, rebuilt from source data: the Quran Foundation API’s mushaf 19 layout, the one the glyphs were drawn for. Words are matched by glyph code rather than by position, because that layout joins two words into one in three places (2:181, 8:6 and 13:37). The build fails on any mismatch, and all 83,668 words land once, in order.
On the print’s own lines the glyphs agree with each other: every full line has nearly the same natural width, 16.09 em in the median, within about 1% on a page. So each page is drawn at the size that makes its widest ordinary line fill the line exactly, and every other line spreads what is left over its word gaps, a fraction of a pixel each. A line that is still too wide gives up to 2% of its width through its gaps; only past that do its glyphs shrink.
- Full lines flush with both margins
- 8,790
- every full line of the 604 pages
- Squeezed through their gaps
- 171
- by at most 2% of the line
- Drawn with smaller glyphs
- 10
- the team’s count; our recount finds 11
The 30 short lines the print centres, on the opening pages and at the end of some surahs, stay centred.
Everything on the page lands on its word
Bookmarks, colour highlights, the playback band, the words a search found and the marks of recitation checking are all placed on the Digital Khatt layout. Mushaf 1440 maps each of them word by word onto the 1441H lines, and a test checks that map on all 604 pages. The printed glyphs exist for Hafs only, so the other rewayat are drawn on the same pages in the Digital Khatt font, with their own verse numbers.
Digital Khatt, and the spaces that were never drawn
Digital Khatt, the app’s mushaf since 2.0 (18 Feb 2026), sets each line the way a calligrapher does. Spaces first widen a little, by up to half a space (two beside an ayah number). Then letters lengthen through the font’s own alternates, OpenType features cv01–cv03 and cv10–cv18, in a fixed order of letter shapes, and whatever is still missing goes back into the spaces. The algorithm is the Digital Khatt project’s own, ported to run in Skia on the phone, and the fits for all 604 pages are worked out once and kept.
The hard case was a line that still needed wider gaps once its letters had stretched. Skia ignores letter- and word-spacing on Arabic text, so the width given to each space was never drawn, and such lines stopped short of the left margin, by up to 18 pt on an iPhone page. The fix sets each space’s width through its font size, then measures every justified line and rebuilds any that misses its width by more than 0.25 px.
Digital Khatt lines that missed the margin, before and after the fix
| Measure | Before | After |
|---|---|---|
| Lines more than 1 pt off the margin, per text | 1,619 to 2,298 | None |
| The line furthest off | 12.6 pt | 0.15 pt |
The same pass found marks cut off under the last line of a page: an open tanween lost a stroke and read like a single kasra. The page’s canvas now reaches far enough below the last line to draw them whole. Before, ink was cut on 9 pages, by up to 4.4 pt, on a large iPhone screen, and on every page, by up to 11.2 pt, on the smallest ones. Measured in CanvasKit, 8 Oct 2026.
Where it stops
- Neither layout ran on a phone before it merged. Mushaf 1440’s pages were checked offline with CanvasKit and the real page fonts; the Digital Khatt fixes were measured in CanvasKit and a simulator.
- Mushaf 1440’s page fonts are not bundled. Each page’s font downloads from a third-party server the first time the page opens.
- The printed glyphs exist for Hafs only. The other rewayat use the Digital Khatt font on the same pages, so their lines are not the 1441H print’s.
- The beta’s widths on this page are our reconstruction: the beta’s layout data and drawing rule, measured with the page fonts’ glyph advances, not a measurement of screenshots. The fix’s own note puts line 3 of page 414 at 40%; our count is 38.1%.
- The team counts 10 lines drawn with smaller glyphs. Our recount of the same files finds 11: one more line passes the limit by a hair.
How we measured
We read the beta’s layout from the repository’s history (the version before the fix), today’s layout, and the 604 page fonts the app downloads. Each line’s width is the sum of its glyphs’ advances, as the app’s own layout test measures it, and each version sizes its page by its own rule. The stable layout reproduces the team’s counts exactly (8,790 full lines, 171 squeezed, a median of 16.09 em), so we trust the same method for the beta. More in the Mushaf 1440 notes, with the team’s own before-and-after image, drawn in CanvasKit from the real page fonts.
Credits
- King Fahd Complex (KFGQPC), the 1441H Madinah print: its page fonts, which Mushaf 1440 draws word by word.
- Digital Khatt (SIL OFL 1.1): the font and page data of the Digital Khatt pages, and the justification algorithm the app ports.
- The Quran Foundation API: the 1441H print’s line layout (mushaf 19), which the build matches to the glyphs.