top | item 44699061

(no title)

systoll | 7 months ago

Based on all this is does seem like there's a 'missing' option to only swap the fonts when they’re off-screen, which avoids:

1. blocking first-paint 2. 'flashes' of anything 3. Not showing the font at all.

A quick mockup: https://codepen.io/pjwdev/pen/ByoLJoR

(This is an intentionally bad fallback. If it were Georgia the effect would be a whole lot more subtle.)

discuss

order

yencabulator|7 months ago

Neat trick. For the sake of the demo, it's easier to visualize by putting a little background color in .offscreened

Any layout change from the font changing off-screen still causes the scroll bar to jump around and change size.