font-patcher: Correct python module missing message

[why]
When the fontforge python bindings are not installed we fail while
importing psMat. The message suggests that fontforge itself is not
installed - which is not the real reason. One can use the libfontforfge
with the python-fontforge without having the GUI program fontforge.

Furthermore we link to outdated installation instructions.

[how]
We already check and report correctly what needs to be done with the
fontforge module import. As both modules are often in the same package
we should probably report the same message. That message holds correct
hints for Debian/Ubuntu. It does not have a link to fontforge, though.

[note]
Also update Debian package name.

Fixes: #725

Reported-by: Aniket Teredesai <a@aniketteredesai.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-02-28 08:56:12 +01:00 committed by Fini
parent 6564e71fce
commit ac60053b3a

View file

@ -14,10 +14,6 @@ projectNameAbbreviation = "NF"
projectNameSingular = projectName[:-1]
import sys
try:
import psMat
except ImportError:
sys.exit(projectName + ": FontForge module is probably not installed. [See: http://designwithfontforge.com/en-US/Installing_Fontforge.html]")
import re
import os
import argparse
@ -30,12 +26,13 @@ try:
except ImportError:
sys.exit(projectName + ": configparser module is probably not installed. Try `pip install configparser` or equivalent")
try:
import psMat
import fontforge
except ImportError:
sys.exit(
projectName + (
": FontForge module could not be loaded. Try installing fontforge python bindings "
"[e.g. on Linux Debian or Ubuntu: `sudo apt install fontforge python-fontforge`]"
"[e.g. on Linux Debian or Ubuntu: `sudo apt install fontforge python3-fontforge`]"
)
)