Skip to content
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

pixel perfect canvas rendering of box and block characters #3416

Merged
merged 41 commits into from
Aug 19, 2021

Conversation

meganrogge
Copy link
Member

@meganrogge meganrogge commented Aug 16, 2021

Fixes #2409

demo/client.ts Outdated Show resolved Hide resolved
@meganrogge meganrogge requested a review from Tyriar August 16, 2021 16:55
@Tyriar
Copy link
Member

Tyriar commented Aug 18, 2021

Progress (canvas):

image

Old webgl rendering:

image

@Tyriar
Copy link
Member

Tyriar commented Aug 18, 2021

w3 alignment tests in canvas:

image

Looks like these are aligned wrong above: ▁▂▃▄▅▆▇█

old in webgl:

image

@Tyriar
Copy link
Member

Tyriar commented Aug 18, 2021

Webgl line height, letter spacing works. Plus the shade characters work 🎉

image

@Tyriar
Copy link
Member

Tyriar commented Aug 19, 2021

Had a think about testing and can't really think of a nice way to do it across all browsers unless we managed to get it drawing exactly across all browsers. But FF and Chrome seem to differ in how they draw corners of paths so not sure. Going to go ahead on this without tests for now, there is a button at the bottom of the demo that writes the alignment tests to the terminal though.

@Tyriar Tyriar added this to the 4.14.0 milestone Aug 19, 2021
@Tyriar
Copy link
Member

Tyriar commented Aug 19, 2021

Moving ahead with this, here's canvas (1.1 line height, 1 letter spacing):

image

Webgl:

image

@Tyriar Tyriar enabled auto-merge August 19, 2021 12:44
@Tyriar Tyriar disabled auto-merge August 19, 2021 12:48
@Tyriar Tyriar merged commit 5697086 into xtermjs:master Aug 19, 2021
@Tyriar Tyriar deleted the merogge/pixelPerfect branch August 19, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manually draw pixel-perfect glyphs for Box Drawing and Block Elements characters
2 participants