Add font ligatures to your Alacritty
Prakhil Thottipully
Posted on April 8, 2022
This article helps you to enable font ligatures on your Alacritty terminal.
We know that Alacritty does not support font ligatures. However, we stick to it due to its performance excellence.
Although, you have good news! Someone made it possible. See the fork of the Alacritty repository with the added font ligatures.
https://github.com/zenixls2/alacritty
Tl;dr
To solve the problem, let's build the repository and install the output binary on our system. Below are the steps to your destiny.
- Clone the repository and build it
- Backup the existing binary and install the new one.
How to do it?
Before we clone and build the repo, you should make sure you have the necessary build tools to build the application. The Rust is used to write the Alacritty. Therefore, you must ensure you have cargo
installed on your system
sudo apt install cargo
- Now, let's clone the repo using the below command.
git clone https://github.com/zenixls2/alacritty
- Use the following commands to build.
cd alacritty
git checkout ligature
cargo build --release
- If all goes well, this should place a binary at
target/release/alacritty
Install the binary
We got the binary file after the build. Now, we only need to move it to the right place. For that, we should backup the existing binary file and use the new one.
- Backup the existing binary using this command
sudo mv /usr/bin/alacritty /usr/bin/alacritty.bak
- Then, let's copy our build binary to the
/usr/bin
folder.
sudo cp ./target/release/alacritty /usr/bin
- Also make sure you have the right font-family on your alacritty config.
font:
normal:
family: Fira Code
style: Regular
bold:
family: Fira Code
style: Bold
italic:
family: Fira Code
style: Italic
There you go!
Relaunch the terminal and see the magic.
Conclusion
We have covered all the steps to enable the font ligatures on the alacritty terminal. Hope this article helps you.
Posted on April 8, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.