render/paper_ink/paper_display_face library
Paper & ink's display (DisplayFace): the display is a paper panel in the sheet's ink — a ruled ledger on ruled sheets, a torn index card otherwise — with the serif display face drawing every glyph.
Panel layers (static: the panel repaints only when the face changes):
- a soft contact shadow — ink at 16 % on light sheets, black at 45 % on dark ones, blurred 2.5, 1 dp down — that alone lifts the card off pale sheets (a card has no inked border); on the lite tier an unblurred 1 dp bottom/right edge in ink at 12 % instead;
- the panel (palette
surface): a 2 dp-cornered ledger, or a card with 5 dp top corners and a torn bottom edge; - the paper grain at half the sheet's strength;
- feint rules in the sheet's rule ink at 56/255, at the sheet's own pitch on the ledger — only in the upper 40 % of the panel (display text is bottom-aligned; no baselines hook, so the result and typing lines never sit on a rule), none under the Accessible lock;
- the red-pen margin rule (palette
error): a double rule on the ledger, a single one on the card, always ≤ 12 dp from the left edge (display text starts ≥ 16 dp in), so no text ever sits on it.
The display text is checked against the panel with its grain and
feint-rule composites (paperInkDisplayBackdrops). Mid-morph the
transition re-solves the text against the panel colour only, so an
in-between panel fades its grain and rules out
(PaperDisplayFace.ruleFade).
Classes
- PaperDisplayFace
- The Paper & ink display panel.
Constants
- paperFeintRuleZone → const double
- Feint rules stay in this top fraction of the panel.
- paperMarginRuleMaxX → const double
- Every accent (margin) rule lies at most this far from the panel's left edge (display text starts ≥ 16 dp in).