Conversation
…zoomed Tauri/Electron native zoom does not update window.devicePixelRatio, causing the xterm.js WebGL canvas to render at 1x resolution regardless of zoom level. The native zoom then upscales the bitmap, producing blurry terminal text at zoom levels above 100%. Fix by overriding the devicePixelRatio getter in zoomWebView() to reflect the effective DPR (baseDPR * zoomFactor). The terminal detects DPR changes during fit() and calls clearTextureAtlas() to rebuild glyphs at the new resolution. Also guards _cropDataUrlToRect to use the original base DPR so screenshot cropping is unaffected.
The devicePixelRatio override breaks on Chrome-based Electron and Tauri on other platforms. Restrict it to macOS + Tauri where the native webview zoom does not update DPR.
Add NotificationUI.showHUD() for centered, macOS-style HUD notifications with icon and label. Used by zoom commands to display a magnifying glass icon with the current zoom percentage that auto-dismisses after 1 second.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Blur Fix - Mac only
<not issue in electron/Tauri Edge(chrome) based browsers.
Tauri mac native zoom does not update window.devicePixelRatio, causing the xterm.js WebGL canvas to render at 1x resolution regardless of zoom level. The native zoom then upscales the bitmap, producing blurry terminal text at zoom levels above 100%.
Fix by overriding the devicePixelRatio getter in zoomWebView() to reflect the effective DPR (baseDPR * zoomFactor). The terminal detects DPR changes during fit() and calls clearTextureAtlas() to rebuild glyphs at the new resolution. Also guards _cropDataUrlToRect to use the original base DPR so screenshot cropping is unaffected.
Zoom UI HUD