Skip to content

Let a document set text smaller than the WebView's floor - #625

Merged
andiwand merged 2 commits into
mainfrom
let-a-document-set-text-smaller-than-the-webviews-floor
Aug 27, 2026
Merged

Let a document set text smaller than the WebView's floor#625
andiwand merged 2 commits into
mainfrom
let-a-document-set-text-smaller-than-the-webviews-floor

Conversation

@andiwand

@andiwand andiwand commented Aug 26, 2026

Copy link
Copy Markdown
Member

The WebView will not draw text below 8px - 6pt - and nothing in the app ever moved that floor, so WebSettings' defaults (minimumFontSize 8, minimumLogicalFontSize 8) have been in force all along.

A document is entitled to ask for less than 6pt: a footnote, a table's fine print, the labels on a chart. What the WebView does with those is not decline them, it draws them at 6pt - so a page's smallest sizes all arrive on screen the same size, and where the layout is positioned absolutely, which is every pdf page odrcore renders, the enlarged text runs over what sits beside it.

Measured on a Pixel 6 Pro, with an .odt whose seven paragraphs ask for 3, 4, 5, 6, 8, 12 and 24pt: before this, the first four lines came out one size, indistinguishable. After it, each is its own.

Both floors go. minimumFontSize is the hard one, applied to every size a page states; minimumLogicalFontSize is the smart one, applied where the page left the size to the browser - a keyword, a percentage, anything inherited - which the first does not cover. 1 and not 0: the setting pins 0 back up to 1.

font-size:0 is exempt from either floor in Blink, so the collapsed struts the pdf frontend lays down are unaffected.

🤖 Generated with Claude Code

andiwand and others added 2 commits August 26, 2026 23:04
The WebView refuses to draw text below 8px - 6pt - and a document is entitled
to ask for less: a footnote, a table's fine print, the labels on a chart. What
it does instead of drawing them small is draw them at 6pt, so a page's smallest
four sizes all come out the same size, and in a layout positioned absolutely -
every pdf page - the enlarged text runs over what sits next to it.

Both floors go, the hard one and the smart one behind keywords, percentages and
anything inherited. 1 rather than 0, which the setting pins back up to 1 anyway.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014EoXWw195RDe9rKQhFLHxC
… into let-a-document-set-text-smaller-than-the-webviews-floor
@andiwand
andiwand merged commit 2e75d9c into main Aug 27, 2026
2 checks passed
@andiwand
andiwand deleted the let-a-document-set-text-smaller-than-the-webviews-floor branch August 27, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant