[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
78/166: gnu: Add python-afdko.
From: |
guix-commits |
Subject: |
78/166: gnu: Add python-afdko. |
Date: |
Tue, 19 Apr 2022 09:18:00 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython+polyglossia
in repository guix.
commit 6d47926b96e8db57711ebc7d4f6dbb66177c019e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Apr 7 17:27:55 2022 -0400
gnu: Add python-afdko.
* gnu/packages/fontutils.scm (python-afdko): New variable.
---
gnu/packages/fontutils.scm | 139 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index e128ed1003..0c479cd5de 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -53,8 +53,10 @@
#:use-module (gnu packages graphics)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
+ #:use-module (gnu packages java)
#:use-module (gnu packages linux)
#:use-module (gnu packages man)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -134,6 +136,143 @@ files (OTF, TTF) and WOFF and WOFF2 font files,
validating them and sanitizing
them as it goes.")
(license license:bsd-3)))
+(define-public python-afdko
+ (package
+ (name "python-afdko")
+ (version "3.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "afdko" version))
+ (sha256
+ (base32 "171r9f7n8fgz37dkcgpzj508lxfafcyzzx43ps12j1z2nk1sk905"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-problematic-requirements
+ (lambda _
+ (substitute* "requirements.txt"
+ ;; Remove lxml because the version requested here is different
+ ;; than the one propagated by the python-fonttools package.
+ (("^lxml==.*") ""))))
+ (add-after 'unpack 'patch-setup.py
+ (lambda _
+ ;; There is no use for Python-provided CMake nor Ninja binaries.
+ (substitute* '("pyproject.toml" "setup.py")
+ ((".*cmake.*") "")
+ ((".*ninja.*") ""))))
+ (add-after 'unpack 'unbundle-antlr4-cpp
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ (("^include\\(ExternalAntlr4Cpp).*")
+ (format #f "include_directories(SYSTEM ~a)"
+ (search-input-directory inputs
+ "include/antlr4-runtime"))))
+ (substitute* "c/makeotf/lib/hotconv/CMakeLists.txt"
+ (("antlr4_static")
+ "antlr4-runtime"))))
+ ;; The test suite expects the commands to be Python rather than
+ ;; shell scripts, so move the wrap phase after the tests.
+ (delete 'wrap)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp")
+ (invoke "pytest" "-vv"))))
+ (add-after 'check 'wrap
+ (assoc-ref %standard-phases 'wrap))
+ (add-before 'wrap 'wrap-PATH
+ (lambda _
+ ;; The commands execute other commands from this package from
+ ;; PATH; by wrapping them with bindir, they can be found even
+ ;; when the command is run from its store location.
+ (let* ((bindir (string-append #$output "/bin"))
+ (commands (find-files bindir)))
+ (for-each (lambda (c)
+ (wrap-program c
+ `("PATH" prefix (,bindir))))
+ commands)))))))
+ (native-inputs
+ (list ninja python-pytest python-scikit-build python-wheel))
+ (inputs (list java-antlr4-runtime-cpp `(,util-linux "lib")))
+ (propagated-inputs
+ (list psautohint
+ python-booleanoperations
+ python-defcon
+ python-fontmath
+ python-fonttools-next
+ python-lxml
+ python-tqdm
+ python-ufonormalizer
+ python-ufoprocessor))
+ (home-page "https://github.com/adobe-type-tools/afdko")
+ (synopsis "Adobe Font Development Kit for OpenType")
+ (description "The Adobe Font Development Kit for OpenType (AFDKO) is a set
+of tools for building OpenType font (OTF) files from PostScript and TrueType
+font data. It includes the following commands:
+@table @command
+@item buildcff2vf
+Assemble a CFF2 variable font from a .designspace file.
+@item buildmasterotfs
+Build master source OpenType/CFF fonts from a @file{.designspace} file
+and UFO master source fonts.
+@item charplot
+@itemx digiplot
+@itemx fontplot
+@itemx fontsetplot
+@itemx hintplot
+@itemx waterfallplot
+Aliases for the corresponding options of the @command{proofpdf} command.
+@item checkoutlinesufo
+Perform outline quality checks. It can also remove path overlaps.
+@item comparefamily
+Look in a specific directory, examine and report on all the OpenType fonts
found.
+@item type1
+@itemx detype1
+Compile and decompile, respectively, a Type 1 font to and from a plain-text
+representation.
+@item makeinstancesufo
+Generate UFO font instances from a set of master UFO fonts.
+@item makeotfexe
+Read all the font data and build the final OpenType font.
+@item makeotf
+This command can be used to prepare the input files needed by
+@command{makeotfexe}.
+@item mergefonts
+Merge one or more fonts into a parent font.
+@item otc2otf
+Extract all OpenType fonts from the parent OpenType Collection font.
+@item otf2otc
+Build an OpenType Collection font file from two or more OpenType font
+files.
+@item otf2ttf
+Converts OpenType-CFF fonts to TrueType.
+@item rotatefont
+Apply a Postscript transform matrix to the source font files.
+@item sfntdiff
+Low-level comparison of two OpenType font files.
+@item sfntedit
+Support table-editing, listing, and checksumming options on
+sfnt-formatted files such as OpenType Format (OTF) or TrueType.
+@item spot
+Dump sfnt data from plain files or Macintosh resource files.
+@item ttfcomponentizer
+Take in a TrueType font and look for a UFO font stored in the same directory.
+Use the UFO's components data to compose matching TrueType glyphs.
+@item ttfdecomponentizer
+Take in a TrueType font and decompose any composite glyphs into simple glyphs.
+@item ttxn
+Make a normalized dump of the font, or of selected tables.
+@item tx
+The @command{tx} (Type eXchange) is a test harness for the CoreType libraries
+but also provides many useful font conversion and analysis facilities.
+@end table")
+ (license license:asl2.0)))
+
+ (license license:asl2.0)))
+
(define-public python-cu2qu
(package
(name "python-cu2qu")
- 55/166: gnu: Add python-pytest-enabler., (continued)
- 55/166: gnu: Add python-pytest-enabler., guix-commits, 2022/04/19
- 57/166: gnu: Add python-pip-run., guix-commits, 2022/04/19
- 59/166: gnu: Add python-pytest-perf., guix-commits, 2022/04/19
- 61/166: gnu: python-faker: Update to 13.3.4 and honor TESTS?., guix-commits, 2022/04/19
- 62/166: gnu: Add python-pytest-randomly., guix-commits, 2022/04/19
- 64/166: gnu: Add psautohint., guix-commits, 2022/04/19
- 65/166: gnu: Add python-ordered-set., guix-commits, 2022/04/19
- 71/166: gnu: python-pytest-cov: Update to 3.0.0., guix-commits, 2022/04/19
- 72/166: gnu: Add python-scikit-build., guix-commits, 2022/04/19
- 77/166: gnu: Add python-fonttools-next., guix-commits, 2022/04/19
- 78/166: gnu: Add python-afdko.,
guix-commits <=
- 79/166: gnu: Add python-cffsubr., guix-commits, 2022/04/19
- 81/166: gnu: Add python-skia-pathops., guix-commits, 2022/04/19
- 85/166: gnu: Add python-sfdlib., guix-commits, 2022/04/19
- 88/166: gnu: Add texlive-bidi., guix-commits, 2022/04/19
- 93/166: gnu: python-black: Update to 22.3.0., guix-commits, 2022/04/19
- 94/166: gnu: pylint: Run tests in parallel., guix-commits, 2022/04/19
- 26/166: gnu: Add python-mutatormath., guix-commits, 2022/04/19
- 27/166: gnu: Add python-fontpens-bootstrap., guix-commits, 2022/04/19
- 33/166: gnu: Add python-cu2qu., guix-commits, 2022/04/19
- 36/166: gnu: Add python-types-toml., guix-commits, 2022/04/19