-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add support for drawing undercurls #5837
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
Conversation
2167542
to
2c9df97
Compare
Blocked on #5493 . But besides it everything should work. |
80b8caa
to
54fdc26
Compare
I've tested fps on my machine with underlines and it's the same as on master for me. I've applied latest changes, so it's ready for review. |
Sorry for the interjection (I will be quick). I've just built and tested the branch. Outstanding job on the rendering style. The undercurls, with my font, look excellent. That applies when I scale the font size up and down. A screenshot: Exciting times for Alacritty, box drawing and undercurls, very nice work to all involved. |
a504424
to
de5fca3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I'd say the curves feel a bit aggressive, but since I won't be using it I don't really care.
6b179e4
to
af994b7
Compare
3410788
to
a04321d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think the result looks way too steep and blurry, but if you don't mind it might be okay?
alacritty/res/rect.f.glsl
Outdated
int x = int(gl_FragCoord.x - paddingX) % int(cellWidth); | ||
int y = int(gl_FragCoord.y - paddingY) % int(cellHeight); | ||
|
||
// We use `undercurlPosition` as amplitude, since it's half of descent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// We use `undercurlPosition` as amplitude, since it's half of descent | |
// We use `undercurlPosition` as amplitude, since it's half of the descent |
alacritty/res/rect.f.glsl
Outdated
float undercurl_top = undercurl + (undercurlThickness - 1) / 2.; | ||
float undercurl_bottom = undercurl - (undercurlThickness - 1) / 2.; | ||
|
||
// Assume that `gl_FragCoord.y` is on the curve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment still doesn't make sense to me.
alacritty_terminal/src/term/mod.rs
Outdated
Attr::CancelUnderline => { | ||
cursor.template.flags.remove(Flags::UNDERLINE | Flags::DOUBLE_UNDERLINE); | ||
cursor.template.flags.remove(Flags::ALL_UNDERLINES); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably remove the linewrap here?
af46661
to
f0ed822
Compare
Really glad to see this merged. Thanks a lot to everyone involved! 🎉 |
Added to Alacritty in <alacritty/alacritty#5837>
Fixes #1628.