From b2f2b4f087702ca7f0d99b9406eee503dd02f775 Mon Sep 17 00:00:00 2001 From: wk333 <13474090681@163.com> Date: Thu, 28 Nov 2024 15:44:02 +0800 Subject: [PATCH] Fix noto_lint.py scripts error --- nototools.spec | 10 ++++-- ...requireReal-arg-for-fonttools-4.27.0.patch | 31 +++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 remove-requireReal-arg-for-fonttools-4.27.0.patch diff --git a/nototools.spec b/nototools.spec index 8351694..c8dd835 100644 --- a/nototools.spec +++ b/nototools.spec @@ -1,10 +1,11 @@ Name: nototools Version: 0.2.20 -Release: 1 +Release: 2 Summary: Noto fonts support tools and scripts plus web site generation -License: ASL 2.0 +License: Apache-2.0 URL: https://github.com/notofonts/nototools Source0: https://github.com/notofonts/nototools/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: remove-requireReal-arg-for-fonttools-4.27.0.patch BuildArch: noarch BuildRequires: python3-devel python-setuptools python3-wheel python3-setuptools_scm Requires: python3-nototools = %{version}-%{release} @@ -27,7 +28,7 @@ BuildRequires: python3dist(fonttools) The tools package contains python3 scripts. %prep -%autosetup -c -p0 +%autosetup -c -p1 # fix module 'nototools.notoconfig' has no attribute 'values' sed -i 's/notoconfig.values/notoconfig._values/g' */nototools/autofix_for_release.py @@ -69,6 +70,9 @@ cd .. %changelog +* Thu Nov 28 2024 wangkai <13474090681@163.com> - 0.2.20-2 +- Fix noto_lint.py scripts error + * Wed Aug 07 2024 yuanlipeng - 0.2.20-1 - Update to 0.2.20 diff --git a/remove-requireReal-arg-for-fonttools-4.27.0.patch b/remove-requireReal-arg-for-fonttools-4.27.0.patch new file mode 100644 index 0000000..7fdaaca --- /dev/null +++ b/remove-requireReal-arg-for-fonttools-4.27.0.patch @@ -0,0 +1,31 @@ +diff --git a/nototools-0.2.20/nototools/compare_fonts.py b/nototools-0.2.20/nototools/compare_fonts.py +index b0b9379..48a1746 100755 +--- a/nototools-0.2.20/nototools/compare_fonts.py ++++ b/nototools-0.2.20/nototools/compare_fonts.py +@@ -182,10 +182,10 @@ class FontCompare(object): + return result + + def _test_gid(self, cp): +- return self.test.getGlyphID(self.test_cmap[cp], requireReal=True) ++ return self.test.getGlyphID(self.test_cmap[cp]) + + def _target_gid(self, cp): +- return self.target.getGlyphID(self.target_cmap[cp], requireReal=True) ++ return self.target.getGlyphID(self.target_cmap[cp]) + + def _cp_error_msg(self, cp, test_msg, target_msg): + test_gid = self._test_gid(cp) +diff --git a/nototools-0.2.20/nototools/noto_lint.py b/nototools-0.2.20/nototools/noto_lint.py +index 4951832..4c902f1 100755 +--- a/nototools-0.2.20/nototools/noto_lint.py ++++ b/nototools-0.2.20/nototools/noto_lint.py +@@ -1380,7 +1380,7 @@ def check_font( + cmap = font_data.get_cmap(font) + for cp in lint_config.parse_int_ranges(WIN_ANSI_CODEPOINTS, True): + if cp in cmap: +- tmp_gids.add(font.getGlyphID(cmap[cp], requireReal=True)) ++ tmp_gids.add(font.getGlyphID(cmap[cp])) + win_ansi_gids = frozenset(tmp_gids) + + font_ymin = None + -- Gitee