This is only for Focal Fossa. This guide is useless on all other Ubuntu version.
Introduction
Want to use Nerd Fonts on Ubuntu MATE with your own font families but can't get FontForge CLI tools working in Ubuntu 20.04? With a little bit of time, effort and the complete abandonment of Python 3 you should be able to perform the steps in this guide to get an older copy of FontForge running, so the Nerd Fonts patcher script cooperates.
Mind, this is subject to change. Once they add in Python 3 compatibilitty and there are special instructions for 20.04 onward, there is no reason for this guide to exist. But for the time being, if you want to patch your own fonts up rather than use the provided copies from Ryan's git repo then this is what I found to work using a live session of Ubuntu MATE 20.04.
You will have to completely give up Python 3 since the sofware relies on Python 2.7, which means if
python-dev-is-python3
was ever installed — Well, sorry about that.
Supporting software
For the font patcher to operate with Python 2.7 libraries, some older software from Ubuntu 19.10 needs to be acquired. As follows:
- https://packages.ubuntu.com/eoan/libspiro0
- https://packages.ubuntu.com/eoan/libfontforge2
- https://packages.ubuntu.com/eoan/python-fontforge
For brevity it will be assumed the received files reside in
$HOME/Downloads
.
Downgrading Python
If you had installed python-dev-is-python3
, then to downgrade Python is relatively simple;
In
x-terminal-emulator
:sudo apt-get install -y python-dev-is-python2
The above will remove most Python 3 entries, which will allow for the installation of older FontForge libraries the rest of this guide will cover.
Installing the software
First install what you can by default:
In
x-terminal-emulator
:sudo apt install -y python-configparser
Then install what you can't without external files :
Assuming
$HOME/Downloads
; modify as necessary.Due to lack of wraparound for commands, multiple
apt
commands are shown. They can be combined into a single command if desired.In
x-terminal-emulator
:cd ~/Downloads sudo apt install -y ./libspiro0_0.5.20150702-8_amd64.deb sudo apt install -y ./libfontforge2_20170731_dfsg-1build1_amd64.deb sudo apt install -y ./python-fontforge_20170731_dfsg-1build1_amd64.deb
Seeing if it works
Once installed, go into the Git repository where the Nerd Fonts patcher is, and attempt to execute it. You can test with the following command:
Assuming you're already at the Nerd Fonts directory.
Inx-terminal-emulator
:./font-patcher --help
If the program outputs helpful text, then you can continue as desired for patching fonts Nerd Fonts doesn't provide by default. Have fun!