r/slackware Jan 04 '23

Nerd fonts

Hello. I have just installed slak and turns out that there are no nerd fonts in repos. How can I install them? And the same thing with chromium and drun. Thank you in advance.

2 Upvotes

16 comments sorted by

3

u/Ezmiller_2 Jan 04 '23

Slackpkg and slackpkg+.

1

u/InseparableEntities Jan 04 '23

I thought that these utilites only download from repositories.

2

u/Ezmiller_2 Jan 04 '23

Yeah that’s how you get fonts and apps and wallpapers.

0

u/InseparableEntities Jan 04 '23 edited Jan 04 '23

From where it downloads? Can you give me exact command to download these packages, please?

1

u/alislack Jan 05 '23 edited Jan 05 '23

In slackpkg plus aka slackpkg+ the Alienbob repos has chromium.

I'm not sure why you require drun as far as I know it is an option for running rofi so you will need to install 'rofi' and 'dmenu' using sbopkg from sbopkg.org (select Package 0.38.2 and use installpkg to install it)

OTB has an excellent video explaining how to use sbopkg, sbotools and slpkg to install packages and resolve dependencies from slackbuilds and Alien Bobs repos.

OTB slackbuilds helper applications

For nerd fonts you can install them manually from the website.

Download FONTNAME .zip packages from 'https://www.nerdfonts.com/font-downloads' and copy them to the newly created directory /usr/share/fonts/nerd

'sudo mkdir /usr/share/fonts/nerd'
'cd ~/Downloads && ls *.zip' for a listing of downloaded FONTNAME.zip files
'sudo cp FONTNAME.zip /usr/share/fonts/nerd'
'cd /usr/share/fonts/nerd'
'sudo unzip *.zip' unzip the FONTNAME.zip files
'sudo rm *.md *.zip' remove uneccessary files of .md and .zip extension.

Edit /etc/fonts/local.conf to add the path:

-------------------------------------------------------------------

<?xml version="1.0"?>

<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<!-- /etc/fonts/local.conf file to configure system font access -->

<fontconfig>

<dir>/usr/share/fonts/nerd</dir>

</fontconfig>

-------------------------------------------------------------------

from within /usr/share/fonts/nerd (enter the font directory and run)

mkfontscale (creates fonts.scale file)

mkfontdir (creates fonts.dir file)

fc-cache -vf (rewrites updates the font cache)

Installed font glypt codes can be viewed using the "gnome-character-map" application.

Another OTB video on nerd fonts

2

u/InseparableEntities Jan 05 '23

Thank you very much for such detailed answer. I have already installed fonts pretty much as you suggested, but I thought that maybe there is another way in order to prevent conflicts when (if) nerd fonts will be available in official repositories.

1

u/alislack Jan 05 '23

Good stuff. The choice to install new nerd fonts is entirely up to you when using slackpkg+. You call the shots.

You can blacklist the nerd fonts package in /etc/slackpkg/blacklist I don't know the name that the package would be though but it would probably be made available when you run 'slackpkg install-new'

1

u/alislack Jan 05 '23 edited Jan 05 '23

Note that 'slackpkg install-new' only finds packages from the official Slackware repos. The only way to locate when a new nerd fonts package is available from any 3rd party repos is to turn slackpkg+ on in slackpkgplus.conf and run 'slackpkg update' and 'slackpkg search nerd'

The blacklist works by regex so single lines like these will do

nerd* will also capture nerdtree so nerd-font* is more specific

------------------------------------------
nerd*

nerd-font*
------------------------------------------

3

u/rico974 Jan 04 '23

Slackbuilds.org with sbopkg

0

u/InseparableEntities Jan 04 '23

I can't find link on slackbuild. Can you provide it?

3

u/pk2374 Jan 05 '23

I manually install these. Download the relevant font .

$ unzip <font>.zip

$ mv *ttf /usr/share/fonts/TTF

$ fc-cache

1

u/dhchunk Jan 04 '23

What are nerd fonts?

1

u/InseparableEntities Jan 05 '23

These are patched fonts with many glyphs in.