mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-09 20:00:11 -06:00
A Ctrl/Cmd+wheel notch eases in over several frames and a pinch changes the scale every frame: each frame was a new size, so its pages were hinted afresh (a new hinting instance per face and every glyph hinted again, about 1.5 ms more per page) and the hint caches filled with sizes nobody rests on, which could clear the one the zoom ends at. While a pointer zoom changes the scale, pages are now drawn unhinted; the hinting is part of the page's texture key, so the first frame at rest draws the page hinted, also at the size the last zoom frame drew. A zoom that leaves the scale as it is (at 10 % or 500 %, or over the ribbon) keeps the pages hinted, and other scale changes (Zoom dialog, slider, a fit zoom following the window) are drawn hinted at once. Rounding sizes into buckets was considered instead: steps between eased frames are far larger than any bucket fine enough to keep the glyphs on the pixel grid at the size the zoom ends at. Tests: an easing Ctrl+wheel zoom draws every in-between size unhinted and the page hinted the frame it stops; the decision for a gesture, the zoom limits and other scale changes; the page key holds the hinting.