How to fix font size in alacritty?

Viewed 14866

My alacritty config file is in ~/.config/alacritty/alacritty.yml with the following font settings:

# Font configuration
font:
  
  [...]

  # Point size
  size: 10.0

All other font configuration options are commented out. I verified that alacritty is indeed reading this config file using the -vvv flag.

However, whenever I open a new terminal window the font seems to be selected at random. Below a picture of two windows opened one right after the other.

enter image description here

2 Answers

This problem is now reported as an issue at the alacritty repository. In general alacritty seems to have many issues with font sizes across different systems.

However, in trying to identify the cause I found that with the -vv flag alacritty always starts the terminal with a font size exactly the double of that in the config file.

So for now it is possible to work around this issue by setting up the font size at half of the desired in the config file. For instance, to obtain a font size of 14:

# Font configuration
font:
  
  [...]

  # Point size
  size: 7.0

And then start alacritty with the -vv flag:

$ alacritty -vv

Possible workaround is to use -o flag when running alacritty and set font.size to desired value. Can be done through .bash_aliases or your WM config to make it faster to use.

Example:

alacritty -o font.size=8

Btw. I couldn't reproduce random font selection but I had problem with setting custom font size through alacritty config file.

Related