- Notifications
You must be signed in to change notification settings - Fork1.8k
Vivid curly#4880
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Vivid curly#4880
Uh oh!
There was an error while loading.Please reload this page.
Conversation
tisilent commentedNov 11, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
tisilent commentedNov 13, 2023
@Tyriar hi. fontSize 25 Style 2 can be further beautified. |
Tyriar commentedNov 13, 2023
@tisilent these two have the ideal shape: They just need some anti-aliasing |
tisilent commentedNov 13, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
jerch commentedNov 13, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@tisilent Is that still a tiling algo approach? Your last image kinda implies that. I am not sure, if a tiling algo will ever satisfy glitch-free drawing for a curly line at different font sizes - you'd basically need to find several tiling pattern for different zoom levels / font-sizes in the end. (I may repeat myself here...) I suggest to give up the cell tiling approach for the curve drawing. Instead it might be much easier to find several good looking curves at different font-sizes, then draw those to the full viewport width into a cache, and during rendering clip draw parts of them under cells with curly underlines. Should to the trick. Our eye/perception is more aware of tiny shape breaks on repeating pattern, than it would get bothered by curly shapes not perfectly in line with cell/glyph borders. |
tisilent commentedNov 14, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@jerch This is an attempt made with the existing structure unchanged, It seems that it cannot be perfectly solved...
|
tisilent commentedNov 14, 2023
xterm.js/src/browser/renderer/shared/CellColorResolver.ts Lines 146 to 148 infb2c39c
An extra 3 bits will solve the problem... |
jerch commentedNov 14, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, there are perf implications from my idea above - it would need a quite different row drawing setup like an additional row composition step, e.g. first mask under/overline parts into the empty row, then clip glyphs onto that. This is most likely slower than doing all at cell level at once (the tiling approach suits the kernel idea in opengl much better). Whether thats unbearable slower I cannot tell though. |
Tyriar commentedNov 14, 2023
I find the variant tile idea is quite elegant as everything is done initially when drawing the texture and assigned a new identifier, no additional draw steps are needed. This is why the current curly pattern repeats every cell. To make this nicer with variants we could just keep the pattern repeating every cell (ie. variant 0) and then only when needed to make the underline more natural looking can we add additional variant(s). So based on the width of the cell determine the maximum number of variants to be used which will define the shape of the curl. This is just improving the current situation by giving us more possible shapes to play with. |
tisilent commentedNov 14, 2023
tisilent commentedNov 14, 2023
tisilent commentedNov 18, 2023
@Tyriar Using underlineOfferset,I want to migrate from ext related to underline,But there were some significant changes. |













fix#4064