f92577608a
createFontRowSizeResolver was reaching into TextLayoutEngine, which internally called pretext's heavy layoutWithLines and then walked per-grapheme cursors to build chars arrays. The resolver discarded all that work and used only totalHeight. Replace with direct prepare + layout from @chenglou/pretext — pretext docs explicitly recommend layout() (not layoutWithLines) for the resize hot path: pure arithmetic on cached segment widths, no canvas calls, no string allocations. Test spies on TextLayoutEngine.prototype.layout migrated to vi.mock-ed pretext layout (pretext's ESM exports are frozen — vi.spyOn fails with "Cannot redefine property"). TextLayoutEngine marked @deprecated since it has no remaining consumers; slated for removal after a release cycle.