You are not logged in.

#1 2022-07-17 16:50:35

juanki0396
Member
From: Madrid
Registered: 2022-07-17
Posts: 5
Website

[SOLVED] Cannot change fonts in Alacritty

I have recently download mononoki nerd fonts and I have installed them manually by moving ttf files into /usr/share/fonts/TTF/mononoki-nerd-font directory.
Then I have modified the alacritty conf file ~/.config/alacritty/alacritty.yml in the following way:

fonts:
  normal:
    family: mononoki Nerd Font
    style: Regular
  bold:
    family: mononoki Nerd Font
  italic:
    family: mononoki Nerd Font
  size: 14

However, the font is not correctly rendered. It seems to be using a default font.

Last edited by juanki0396 (2022-07-19 12:11:39)

Offline

#2 2022-07-17 17:09:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,731

Re: [SOLVED] Cannot change fonts in Alacritty

Does that font even exist with that name?

fc-match "mononoki Nerd Font"

If not, find the actual family name by running fc-query on the font you intend to use and actually update the font cache to make it visible to applications if you aren't using a package by running the fc-cache command

Offline

#3 2022-07-17 17:25:33

juanki0396
Member
From: Madrid
Registered: 2022-07-17
Posts: 5
Website

Re: [SOLVED] Cannot change fonts in Alacritty

The font exist, here you have the output of the command:

mononoki-Regular Nerd Font Complete.ttf: "mononoki Nerd Font" "Regular"

I think the problem is related con Xorg but I'm not sure at all.

Offline

#4 2022-07-17 18:23:06

juanki0396
Member
From: Madrid
Registered: 2022-07-17
Posts: 5
Website

Re: [SOLVED] Cannot change fonts in Alacritty

When I run the xlsfonts command, mononoki fonts are not displayed. I have been following the Fonts article in the ArchWiki but nothing seems to fix the problem.

Offline

#5 2022-07-17 19:31:36

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED] Cannot change fonts in Alacritty

fonts:
  normal:
    family: mononoki Nerd Font
    style: Regular
  bold:
    family: mononoki Nerd Font
  italic:
    family: mononoki Nerd Font
  size: 14

"font", not "fonts" - otherwise please post the actual file.

Offline

#6 2022-07-18 19:26:08

juanki0396
Member
From: Madrid
Registered: 2022-07-17
Posts: 5
Website

Re: [SOLVED] Cannot change fonts in Alacritty

seth wrote:
fonts:
  normal:
    family: mononoki Nerd Font
    style: Regular
  bold:
    family: mononoki Nerd Font
  italic:
    family: mononoki Nerd Font
  size: 14

"font", not "fonts" - otherwise please post the actual file.

It was that. Thank you so much smile

Offline

#7 2022-07-18 19:43:02

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED] Cannot change fonts in Alacritty

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB