DEV Community

Prakhil
Prakhil

Posted on

Add font ligatures to your Alacritty

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
Enter fullscreen mode Exit fullscreen mode

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.

  1. Clone the repository and build it
  2. 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
Enter fullscreen mode Exit fullscreen mode
  • Now, let's clone the repo using the below command.
git clone https://github.com/zenixls2/alacritty
Enter fullscreen mode Exit fullscreen mode
  • Use the following commands to build.
cd alacritty
git checkout ligature
cargo build --release
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode
  • Then, let's copy our build binary to the /usr/bin folder.
sudo cp ./target/release/alacritty /usr/bin
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode

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.

Top comments (1)

Collapse
 
dribe profile image
dribe

Worth mentioning that the branch has been unmaintained since Feb 9, 2021