'How to fix font size in alacritty?
I have the alacritty config file in ~/.config/alacritty/alacritty.yml with the following font set-up:
# 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.
Solution 1:[1]
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
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | LuÃs de Sousa |
| Solution 2 | Bartosz Ró?ycki |

