mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
62 lines
2.1 KiB
Diff
62 lines
2.1 KiB
Diff
Patch-Source: https://github.com/ryanoasis/nerd-fonts/pull/798
|
|
--
|
|
From 3c3d11b49e87f6faa0d4986a9c86956f14cc675b Mon Sep 17 00:00:00 2001
|
|
From: Fini Jastrow <ulf.fini.jastrow@desy.de>
|
|
Date: Mon, 28 Feb 2022 08:56:12 +0100
|
|
Subject: [PATCH] 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>
|
|
---
|
|
font-patcher | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/font-patcher b/font-patcher
|
|
index 7d063ab24..67ba2053e 100755
|
|
--- a/font-patcher
|
|
+++ b/font-patcher
|
|
@@ -11,10 +11,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
|
|
@@ -27,12 +23,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`]"
|
|
)
|
|
)
|
|
|