-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminal Image display has low resolution #5035
Comments
@Tyriar Whats the right way to scale a canvas to operate on real device pixels instead of css pixels? Should that be done on width/height attribute level of the canvas object? For example - lets say we have a DPR of 2 at hand - where should that "doubled" pixel values go? Would this be sufficent (and the browser deals with the low level stuff on its own): const canvasObj = ...
// apply real pixel values to canvas (doubled here)
canvasObj.width = cssWidth * DPR;
canvasObj.height = cssHeight * DPR;
// output is still within the logical css pixels
canvasObj.style.width = cssWidth;
canvasObj.style.height = cssHeight;
// later on during painting:
canvasObj.drawImage(...<metrics here now in real device pixels>...); Would that already fix things? (Sorry if that question looks dumb to you, but I've never done this DPR correction myself, also I cannot really test it...) |
@jerch xterm.js/src/browser/services/CoreBrowserService.ts Lines 18 to 19 in c73793f
However, my scene is relatively simple without scaling, so CSS * DPR is sufficient. xterm.js/src/browser/renderer/shared/TextureAtlas.ts Lines 667 to 676 in c73793f
|
From microsoft/vscode#210672
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
Original image:
In VScode terminal
In Iterm2 terminal
The text was updated successfully, but these errors were encountered: