You are not logged in.

#1 2025-07-06 13:15:22

mdevino
Member
Registered: 2025-07-06
Posts: 5

How to configure nerd fonts?

Hello. I'm installing Arch Linux for the first time on a VM to learn more about Linux. I've followed the installation guide and, after some struggle, managed to get my system up and running.

The next thing I'm trying to do is to install tools like Zellij and LunarVim. I've installed these tools successfully, but they require Nerd Fonts to display icons properly.

I've installed ttf-hack-nerd and fontconfig packages, but when I run setfont /usr/share/fonts/TTF/HackNerdFontMono-Regular.ttf, I get the following message:


setfont: ERROR setfont.c:550 kfont_load_font: Bad input file size

Searching around, my understanding is that I need a Terminal Emulator such as, say, Alacritty to install Nerd Fonts, which requires something like Wayland or Xorg.

Could anybody confirm if my understanding is correct, please?

I don't plan on installing a graphical environment, or at least not for the time being.

Offline

#2 2025-07-06 14:04:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,277

Re: How to configure nerd fonts?

setfont is for the linux console, you can just install the nerdfont (multiple of them are in the repos) like every other package and then configure it either as global monospace font or your TE of choice (eg. alacritty) to use them explicitly.

They'll however only work in a GUI environment, the linux console does not use the ttf/otf format.

Offline

#3 2025-07-06 14:16:54

mdevino
Member
Registered: 2025-07-06
Posts: 5

Re: How to configure nerd fonts?

Hi seth, thanks for the reply.

I see, so I can't escape from a GUI if I need to use NerdFonts. I'll try to install a gui environment and report later how it goes.

Offline

#4 2025-07-06 14:19:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,277

Offline

#5 2025-07-06 14:22:31

unixman
Member
Registered: 2015-03-12
Posts: 182

Re: How to configure nerd fonts?

mdevino wrote:

Could anybody confirm if my understanding is correct, please?

yes. setfont means its called on terminal.
setfont dont understand .ttf format. (truetype fonts)
you must give it an .psf format. (console/terminal fonts)
it also understant some other format too.

look at package content to find where it installs console fonts.
possibly /usr/share/kbd/consolefonts

there is font-terminus-nerd.

Offline

#6 2025-07-06 14:28:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,277

Re: How to configure nerd fonts?

there is font-terminus-nerd

Where?
The repos only have https://archlinux.org/packages/extra/an … inus-nerd/

Offline

#7 2025-07-06 15:06:29

mdevino
Member
Registered: 2025-07-06
Posts: 5

Re: How to configure nerd fonts?

seth wrote:

there is font-terminus-nerd

Where?
The repos only have https://archlinux.org/packages/extra/an … inus-nerd/

Indeed, the only place I found font-terminus-nerd was on Alpine Linux packages which, from my understanding, wouldn't work on arch.

Offline

#8 2025-07-06 15:12:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,277

Re: How to configure nerd fonts?

Looking at it's contents, it's equivalent to the ttf-terminus-nerd package.
psf is limited to 256 characters - I'd be surprised to see a nerd font for the console (pleasantly surprised, but still surprised)

The mentioned kmscon (no idea how up-to-date the wiki is on that) however would support ttf's - if you want to avoid X11 or wayland at all.

Offline

#9 2025-07-06 16:18:37

mdevino
Member
Registered: 2025-07-06
Posts: 5

Re: How to configure nerd fonts?

seth wrote:

psf is limited to 256 characters - I'd be surprised to see a nerd font for the console (pleasantly surprised, but still surprised)

Yeah, I've read about this limit here. I managed to get what I needed installing KDE Plasma, then Alacritty. It kinda feels like an overkill for enabling Nerd Fonts, though. I'll take a look at kmscon later.

Offline

#10 2025-07-06 16:25:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,277

Re: How to configure nerd fonts?

You don't need KDE…
A minimal wayland compositor or just the xorg-server and some terminal emulator (foot, st, xterm) will do (as alternative to kmscon)

Offline

#11 2025-07-08 11:19:50

mdevino
Member
Registered: 2025-07-06
Posts: 5

Re: How to configure nerd fonts?

seth wrote:

You don't need KDE…
A minimal wayland compositor or just the xorg-server and some terminal emulator (foot, st, xterm) will do (as alternative to kmscon)

Indeed, KDE was just easier because I don't know a lot about the elements that compose a graphical environment. I managed to make it work installing Hyprland but, while Hyprland is powerful, I found the setup quite complex for a beginner.  I'll try installing something simpler and share the steps here once I get the chance.

And thank you very much for the help!

Offline

Board footer

Powered by FluxBB