• Fix proportional font rendering with pixel-based horizontal scroll

    kyle released this 2026-03-31 21:18:53 +00:00 | 2 commits to master since this release

    The GUI renderer had two competing horizontal scroll systems: a
    character-based one (coloffs × space_w) and a pixel-based one. For
    proportional fonts the character-based system used "M" width to
    calculate viewport columns, triggering premature scrolling at ~50%
    of the actual display width.

    Switch the GUI renderer to purely pixel-based horizontal scrolling:

    • Remove coloffs↔ImGui scroll_x bidirectional sync
    • Measure rx_to_px from column 0 (absolute) instead of from coloffs
    • Draw full expanded lines; let ImGui clip via its scroll viewport
    • Report content width via SetCursorPosX+Dummy for the scrollbar
    • Use average character width for cols estimate (not "M" width)

    The terminal renderer continues using coloffs correctly—no changes
    needed there.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    Downloads