-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Support ligatures using allsorts #5615
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
|
From the CI logs it looks like allsorts does not support the MSRV of alacritty. What do you think is the best action here @chrisduerr? |
chrisduerr
left a comment
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.
From the CI logs it looks like allsorts does not support the MSRV of alacritty. What do you think is the best action here @chrisduerr?
MSRV can be bumped up to the latest stable Rust version available in the Ubuntu repos. If that isn't enough, allsorts is unsuitable.
Why did you pick allsorts over a library that is actually reliably tested?
Because allsorts is rust native. It removes the need of a third party FFI crate, so no FFI overhead and it is cross platform. If you would prefer using Harfbuzz, then I can switch over to Harfbuzz, but I am no expert in coretext and uniscribe to be able to easily come up with a windows/mac support. Would you like me to open another PR that uses harfbuzz to compare their performance? |
I think as the person proposing this change, you should test the performance implications of different solutions. And I'd like to point out that the previous test only verified potential PTY lock contention issues, while the change itself will most likely impact framerate. So to actually verify the performance of these benchmarks one must record the rendering framerate.
That seems more like an argument for laziness rather than picking the correct solution. As far as I'm aware there's basically nobody using allsorts; it's a new library without a lot of development time behind it that has largely dried up over the past 4 months. So all things considered the argument really should be made why not to choose the reliable standard Harfbuzz that has been tweaked wrt API stability and performance for decades. |
This comment has been minimized.
This comment has been minimized.
|
Oops, I retract that comment, that was a bad mistake. I forgot to build with release mode. EDIT: to be honest there is not much of a difference to me. I couldn't tell the difference between allsorts and harfbuzz and no shaping |
Define "tell the difference". You shouldn't have to try and tell anything, benchmarks should always be measured in metrics that can be tracked and compared against each other. So either there is a framerate difference or there isn't. Also of course since vsync might limit the framerate, one should ensure to decrease the font size until Alacritty starts struggling since ultimately that's where this starts to matter. I'd personally assume that Harfbuzz outperforms Allsorts, I think one of the contributors to Allsorts has told me that before. But one still needs to actually compare the numbers directly to see how much it would differ. |
|
That is not a benchmark lol. Calling it a rough estimate would probably still give it too much credit. |
|
I still have the binaries. I am not really familiar with measuring performance of terminals. Could you please provide with some instructions or tools to generate data with? Thank you. |
|
Benchmarking workloads are part of Alacritty's contribution documentation, measuring framerates depends both on your hardware and software so you'll have to figure that out on your own (though it's likely the more relevant piece of information here). |
|
Hello, I'm back. typometervtebenchframerateI used mangohud to observe the framerate of Baseline (no shaping, commit before either change): ~17.1 ms, 58 fps on average Shaping with allsorts: ~32.1 ms, 31 fps on average Shaping with harfbuzz: ~23.4 ms, 42 fps on average binary sizeEDIT: based on I think the overall assessment is that harfbuzz is superior. |
|
That rendering performance seems awful for both harfbuzz and allsorts, considering that the baseline is probably only at 60 because it's limited by vsync. And that's with a trivially slow benchmark like |
|
Well, at least we know which library to choose. I'll try to improve performance with harfbuzz. |
|
Also, note that |






See also alacritty/crossfont#35. Current PR includes a patch to Cargo.toml using my fork. Will change after the crossfont PR gets merged.