projects/guix·blob javascript-team · refs

2453 lines · 95.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015 Andreas Enge <[email protected]>
3;;; Copyright © 2014, 2016 Eric Bavier <[email protected]>
4;;; Copyright © 2016 Mark H Weaver <[email protected]>
5;;; Copyright © 2016, 2017, 2020, 2022, 2023 Efraim Flashner <[email protected]>
6;;; Copyright © 2017 Rene Saavedra <[email protected]>
7;;; Copyright © 2017 Leo Famulari <[email protected]>
8;;; Copyright © 2017 Nikita <[email protected]>
9;;; Copyright © 2017, 2018, 2020–2022 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018, 2024 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2018-2021, 2023, 2026 Ludovic Courtès <[email protected]>
12;;; Copyright © 2019, 2020, 2022 Marius Bakke <[email protected]>
13;;; Copyright © 2020 Roel Janssen <[email protected]>
14;;; Copyright © 2020, 2021, 2024 Nicolas Goaziou <[email protected]>
15;;; Copyright © 2021-2026 Maxim Cournoyer <[email protected]>
16;;; Copyright © 2021 Sarah Morgensen <[email protected]>
17;;; Copyright © 2022 Eric Bavier <[email protected]>
18;;; Copyright © 2022 Felipe Balbi <[email protected]>
19;;; Copyright © 2023 gemmaro <[email protected]>
20;;; Copyright © 2023 John Kehayias <[email protected]>
21;;; Copyright © 2023 Janneke Nieuwenhuizen <[email protected]>
22;;; Copyright © 2023, 2025 pinoaffe <[email protected]>
23;;; Copyright © 2023 Liliana Marie Prikler <[email protected]>
24;;; Copyright © 2024 Sören Tempel <[email protected]>
25;;; Copyright © 2023 Zheng Junjie <[email protected]>
26;;; Copyright © 2024 Sou Bunnbu (宋文武) <[email protected]>
27;;; Copyright © 2025, 2026 Ashish SHUKLA <[email protected]>
28;;; Copyright © 2025 Alexey Abramov <[email protected]>
29;;;
30;;; This file is part of GNU Guix.
31;;;
32;;; GNU Guix is free software; you can redistribute it and/or modify it
33;;; under the terms of the GNU General Public License as published by
34;;; the Free Software Foundation; either version 3 of the License, or (at
35;;; your option) any later version.
36;;;
37;;; GNU Guix is distributed in the hope that it will be useful, but
38;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40;;; GNU General Public License for more details.
41;;;
42;;; You should have received a copy of the GNU General Public License
43;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
45(define-module (gnu packages fontutils)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages build-tools)
51 #:use-module (gnu packages check)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages datastructures)
54 #:use-module (gnu packages docbook)
55 #:use-module (gnu packages compiler-tools)
56 #:use-module (gnu packages fonts)
57 #:use-module (gnu packages freedesktop)
58 #:use-module (gnu packages fribidi)
59 #:use-module (gnu packages gcc)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages ghostscript)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages golang-xyz)
65 #:use-module (gnu packages gperf)
66 #:use-module (gnu packages graphics)
67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages java)
70 #:use-module (gnu packages linux)
71 #:use-module (gnu packages man)
72 #:use-module (gnu packages mc)
73 #:use-module (gnu packages perl)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-build)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages qt)
79 #:use-module (gnu packages sqlite)
80 #:use-module (gnu packages toolkits)
81 #:use-module (gnu packages unicode)
82 #:use-module (gnu packages webkit)
83 #:use-module (gnu packages xdisorg)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages xorg)
86 #:use-module (gnu packages tex)
87 #:use-module (gnu packages textutils)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (guix gexp)
90 #:use-module (guix packages)
91 #:use-module (guix download)
92 #:use-module (guix svn-download)
93 #:use-module (guix git-download)
94 #:use-module (guix build-system copy)
95 #:use-module (guix build-system cmake)
96 #:use-module (guix build-system gnu)
97 #:use-module (guix build-system go)
98 #:use-module (guix build-system meson)
99 #:use-module (guix build-system pyproject)
100 #:use-module (guix utils)
101 #:use-module (srfi srfi-1))
102
103(define-public freetype
104 (package
105 (name "freetype")
106 (version "2.13.3")
107 (source
108 (origin
109 (method url-fetch)
110 (uri (string-append "mirror://savannah/freetype/freetype-"
111 version ".tar.xz"))
112 (sha256
113 (base32 "129j0rprq6iijmckjmk9yyjwnfimpg3mlpdqmr6wf9ylcq33al05"))))
114 (build-system gnu-build-system)
115 (arguments
116 ;; The use of "freetype-config" is deprecated, but other packages still
117 ;; depend on it.
118 (list
119 #:configure-flags #~(list "--enable-freetype-config"
120 ;; armhf-linux: Disable SLP vectorization.
121 ;; gcc-14 optimization bug that breaks
122 ;; ghostscript PostScript font handling (fixed
123 ;; in gcc-15). See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119155
124 #$@(if (target-arm32?)
125 (list "CFLAGS=-g -O2 -fno-tree-slp-vectorize")
126 '()))
127 #:disallowed-references (list (this-package-native-input
128 (if (%current-target-system)
129 (string-append "pkg-config-"
130 (%current-target-system))
131 "pkg-config")))
132 #:phases
133 #~(modify-phases %standard-phases
134 (add-after 'install 'remove-reference-to-pkg-config
135 (lambda* (#:key outputs #:allow-other-keys)
136 (substitute* (search-input-file outputs "bin/freetype-config")
137 (("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)?pkg-config"
138 _ store target)
139 "pkg-config")))))))
140 (native-inputs (list pkg-config))
141 ;; XXX: Not adding harfbuzz here, as it would introduce a dependency
142 ;; cycle.
143 (propagated-inputs (list libpng zlib))
144 (synopsis "Font rendering library")
145 (description
146 "Freetype is a library that can be used by applications to access the
147contents of font files. It provides a uniform interface to access font files.
148It supports both bitmap and scalable formats, including TrueType, OpenType,
149Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
150anti-aliased glyph bitmap generation with 256 gray levels.")
151 (license license:freetype) ; some files have other licenses
152 (home-page "https://freetype.org/")))
153
154;; TODO: Make this change directly in freetype in the next large rebuild cycle
155;; and remove this package.
156(define-public freetype-with-brotli
157 (package
158 (inherit freetype)
159 (name "freetype-with-brotli")
160 (propagated-inputs
161 (modify-inputs propagated-inputs
162 (prepend brotli)))))
163
164(define-public opentype-sanitizer
165 (package
166 (name "opentype-sanitizer")
167 (version "8.2.1")
168 (source (origin
169 (method url-fetch)
170 (uri (string-append "https://github.com/khaledhosny/ots"
171 "/releases/download/v" version
172 "/ots-" version ".tar.xz"))
173 (sha256
174 (base32
175 "17z8cxv48rfig5k7j3xk3bmbf7rm3kxsc3bazix96l0wws58r569"))))
176 (build-system meson-build-system)
177 (native-inputs (list googletest-1.12 pkg-config))
178 (inputs (list freetype lz4 woff2 zlib))
179 (home-page "https://github.com/khaledhosny/ots")
180 (synopsis "Sanitizer for OpenType fonts")
181 (description "The OpenType Sanitizer (OTS) parses and serializes OpenType
182files (OTF, TTF) and WOFF and WOFF2 font files, validating them and sanitizing
183them as it goes.")
184 (license license:bsd-3)))
185
186(define-public python-afdko
187 (package
188 (name "python-afdko")
189 (version "4.0.2")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (pypi-uri "afdko" version))
194 (sha256
195 (base32 "0c6ribidsmcd9rihy32gknfrr3iw8dy2jlmq6lk05pc33s3ix8z1"))
196 (modules '((guix build utils)))
197 (snippet
198 #~(begin
199 (with-directory-excursion "c/makeotf/lib/hotconv"
200 ;; Delete ANTLR-generated code.
201 (for-each delete-file
202 (find-files
203 "." "Feat(Parser|Lexer).*\\.(h|cpp|interp|tokens)$")))))))
204 (build-system pyproject-build-system)
205 (arguments
206 (list
207 #:test-flags
208 #~(list
209 "--dist" "loadfile" "-n"
210 (number->string (parallel-job-count))
211 "-k" (string-join
212 ;; This test fails because of a different date
213 ;; in the copyright header of an expected file
214 ;; since an update to ffmpeg.
215 '("not test_alt_missing_glyph"
216 ;; AssertionError: assert False
217 "test_build_font_and_check_messages"
218 "test_duplicate_warning_messages_bug751"
219 "test_cli_numerics"
220 ;; The test_decimals_ufo and
221 ;; test_type1_supported_hint started failing in
222 ;; 4.0.2, due to small variations compared to the
223 ;; expected output, likely caused by our newer
224 ;; python-fonttools (see:
225 ;; <https://github.com/adobe-type-tools/afdko/issues/1805>).
226 "test_decimals_ufo"
227 "test_type1_supported_hint")
228 " and not "))
229 #:phases
230 #~(modify-phases %standard-phases
231 (add-after 'unpack 'use-c++17
232 (lambda _
233 ;; ANTLR4 4.10 and later require C++ 17.
234 (substitute* "CMakeLists.txt"
235 (("CMAKE_CXX_STANDARD 11")
236 "CMAKE_CXX_STANDARD 17"))))
237 (add-after 'unpack 'patch-problematic-requirements
238 (lambda _
239 (substitute* "requirements.txt"
240 ;; Remove lxml because the version requested here is different
241 ;; than the one propagated by the python-fonttools package.
242 (("^lxml==.*") "")
243 (("<=4.38.0") ">=4.38.0"))))
244 (add-after 'unpack 'patch-setup.py
245 (lambda _
246 ;; There is no use for Python-provided CMake nor Ninja binaries.
247 (substitute* '("pyproject.toml" "setup.py")
248 ((".*cmake.*") "")
249 ((".*ninja.*") ""))))
250 (add-after 'unpack 'unbundle-antlr4-cpp
251 (lambda* (#:key inputs #:allow-other-keys)
252 (substitute* "CMakeLists.txt"
253 (("^include\\(ExternalAntlr4Cpp).*")
254 (format #f "include_directories(SYSTEM ~a)"
255 (search-input-directory inputs
256 "include/antlr4-runtime"))))
257 (substitute* '("c/makeotf/lib/hotconv/CMakeLists.txt"
258 "c/makeotf/lib/cffread/CMakeLists.txt")
259 (("antlr4_static")
260 "antlr4-runtime"))))
261 (add-after 'unpack 'regenerate-hotconv-grammar
262 (lambda _
263 (let ((antlr-version #$(package-version
264 (this-package-native-input "antlr4"))))
265 (with-directory-excursion "c/makeotf/lib/hotconv"
266 (substitute* "BuildGrammar.py"
267 (("antlr_version = .*")
268 (string-append "antlr_version = \""
269 antlr-version
270 "\"")))
271 (invoke "python" "BuildGrammar.py")))))
272 (add-before 'build 'relax-gcc-warnings
273 (lambda _
274 ;; Relax a warning turned error with GCC 14.
275 (setenv "CFLAGS" (string-join
276 (list "-g" "-O2"
277 "-Wno-error=incompatible-pointer-types"
278 "-Wno-error=int-conversion")
279 " "))))
280 ;; The test suite expects the commands to be Python rather than
281 ;; shell scripts, so move the wrap phase after the tests.
282 (delete 'wrap)
283 (add-after 'check 'wrap
284 (assoc-ref %standard-phases 'wrap))
285 (add-before 'wrap 'wrap-PATH
286 (lambda _
287 ;; The commands execute other commands from this package from
288 ;; PATH; by wrapping them with bindir, they can be found even
289 ;; when the command is run from its store location.
290 (let* ((bindir (string-append #$output "/bin"))
291 (commands (find-files bindir)))
292 (for-each (lambda (c)
293 (wrap-program c
294 `("PATH" prefix (,bindir))))
295 commands)))))))
296 (native-inputs
297 (list antlr4
298 ninja
299 pkg-config
300 python-pytest
301 python-pytest-xdist
302 python-scikit-build
303 python-setuptools-scm
304 python-wheel))
305 (inputs
306 (list bash-minimal
307 cpp-antlr4-runtime
308 libxml2
309 `(,util-linux "lib")))
310 (propagated-inputs
311 (list psautohint
312 python-booleanoperations
313 python-defcon
314 python-fontmath
315 python-fonttools
316 python-lxml
317 python-tqdm
318 python-ufonormalizer
319 python-ufoprocessor))
320 (home-page "https://github.com/adobe-type-tools/afdko")
321 (synopsis "Adobe Font Development Kit for OpenType")
322 (description "The Adobe Font Development Kit for OpenType (AFDKO) is a set
323of tools for building OpenType font (OTF) files from PostScript and TrueType
324font data. It includes the following commands:
325@table @command
326@item buildcff2vf
327Assemble a CFF2 variable font from a .designspace file.
328@item buildmasterotfs
329Build master source OpenType/CFF fonts from a @file{.designspace} file
330and UFO master source fonts.
331@item charplot
332@itemx digiplot
333@itemx fontplot
334@itemx fontsetplot
335@itemx hintplot
336@itemx waterfallplot
337Aliases for the corresponding options of the @command{proofpdf} command.
338@item checkoutlinesufo
339Perform outline quality checks. It can also remove path overlaps.
340@item comparefamily
341Look in a specific directory, examine and report on all the OpenType fonts found.
342@item type1
343@itemx detype1
344Compile and decompile, respectively, a Type 1 font to and from a plain-text
345representation.
346@item makeinstancesufo
347Generate UFO font instances from a set of master UFO fonts.
348@item makeotfexe
349Read all the font data and build the final OpenType font.
350@item makeotf
351This command can be used to prepare the input files needed by
352@command{makeotfexe}.
353@item mergefonts
354Merge one or more fonts into a parent font.
355@item otc2otf
356Extract all OpenType fonts from the parent OpenType Collection font.
357@item otf2otc
358Build an OpenType Collection font file from two or more OpenType font
359files.
360@item otf2ttf
361Converts OpenType-CFF fonts to TrueType.
362@item rotatefont
363Apply a Postscript transform matrix to the source font files.
364@item sfntdiff
365Low-level comparison of two OpenType font files.
366@item sfntedit
367Support table-editing, listing, and checksumming options on
368sfnt-formatted files such as OpenType Format (OTF) or TrueType.
369@item spot
370Dump sfnt data from plain files or Macintosh resource files.
371@item ttfcomponentizer
372Take in a TrueType font and look for a UFO font stored in the same directory.
373Use the UFO's components data to compose matching TrueType glyphs.
374@item ttfdecomponentizer
375Take in a TrueType font and decompose any composite glyphs into simple glyphs.
376@item ttxn
377Make a normalized dump of the font, or of selected tables.
378@item tx
379The @command{tx} (Type eXchange) is a test harness for the CoreType libraries
380but also provides many useful font conversion and analysis facilities.
381@end table")
382 (license license:asl2.0)))
383
384(define-public python-afdko-3.6.1
385 ;; This older version does not depend on Java and Antlr4.
386 (package
387 (inherit python-afdko)
388 (version "3.6.1")
389 (source
390 (origin
391 (method url-fetch)
392 (uri (pypi-uri "afdko" version))
393 (sha256
394 (base32 "0187xhgw6spzaji93fs1mnhqnq30pxhdj1p2m88673szvzpf10av"))))
395 (arguments
396 (list
397 #:phases
398 #~(modify-phases %standard-phases
399 (add-after 'unpack 'relax-gcc14-strictness
400 (lambda _
401 (substitute* (string-append
402 "c/makeotf/makeotf_lib/build"
403 "/hotconv/linux/gcc/release/Makefile")
404 (("CFLAGS = ")
405 "CFLAGS = -Wno-error=int-conversion"))
406 (substitute*
407 "c/public/lib/build/t1write/linux/gcc/release/Makefile"
408 (("CFLAGS = ")
409 "CFLAGS = -Wno-error=incompatible-pointer-types"))))
410 (add-before 'build 'set-CC
411 (lambda _
412 (setenv "CC" "gcc")))
413 (replace 'check
414 ;; tests: 646 passed, 4 skipped, 40 warnings
415 ;; TODO: Try to fix more tests if this package is still required.
416 (lambda* (#:key tests? #:allow-other-keys)
417 (when tests?
418 (setenv "HOME" "/tmp")
419 (invoke "pytest" "-vv"
420 "-n" (number->string (min 8 (parallel-job-count)))
421 "--ignore=tests/buildcff2vf_test.py"
422 "--ignore=tests/comparefamily_test.py"
423 "--ignore=tests/makeinstancesufo_test.py"
424 "--ignore=tests/makeotf_test.py"
425 "--ignore=tests/makeotfexe_test.py"
426 "--ignore=tests/otc2otf_test.py"
427 "--ignore=tests/otf2ttf_test.py"
428 "--ignore=tests/proofpdf_test.py"
429 "--ignore=tests/ttxn_test.py")))))))
430 (native-inputs
431 (list pkg-config
432 python-pytest
433 python-pytest-xdist
434 python-setuptools-scm
435 python-wheel))
436 (inputs
437 (list bash-minimal
438 libxml2))
439 (propagated-inputs
440 (list psautohint
441 python-booleanoperations
442 python-defcon
443 python-fontmath
444 python-fonttools
445 python-lxml
446 python-tqdm
447 python-ufonormalizer
448 python-ufoprocessor))))
449
450(define-public python-beziers
451 (package
452 (name "python-beziers")
453 (version "0.6.0")
454 (source
455 (origin
456 (method git-fetch)
457 (uri (git-reference
458 (url "https://github.com/simoncozens/beziers.py")
459 (commit (string-append "v" version))))
460 (file-name (git-file-name name version))
461 (sha256
462 (base32 "1ww2cc4wi3a3i9wknddjcii2p4r8ksilkqpnbkqg6d7z3jqrcf9n"))))
463 (build-system pyproject-build-system)
464 (native-inputs
465 (list python-pytest python-dotmap python-matplotlib python-setuptools))
466 (propagated-inputs (list python-pyclipper))
467 (home-page "https://simoncozens.github.io/beziers.py/index.html")
468 (synopsis "Python bezier manipulation library")
469 (description
470 "Beziers provides a variety of classes for constructing,
471manipulating and drawing Bezier curves and paths. Principally designed for
472font design software, it allows you to join, split, offset, and perform many
473other operations on paths.")
474 (license license:expat)))
475
476(define-public python-booleanoperations
477 (package
478 (name "python-booleanoperations")
479 (version "0.9.0")
480 (source
481 (origin
482 (method git-fetch)
483 (uri (git-reference
484 (url "https://github.com/typemytype/booleanOperations")
485 (commit version)))
486 (file-name (git-file-name name version))
487 (sha256
488 (base32 "0ahfgamyq1ndwbr9n8sdx8qhqc2195xnbahylgjpk877hbr2gxav"))))
489 (build-system pyproject-build-system)
490 (arguments
491 (list
492 ;; Some tests fail due to small differences in the expected result (see:
493 ;; <https://github.com/typemytype/booleanOperations/issues/69>).
494 #:test-flags
495 #~(list "-k"
496 (string-join
497 (list "not test_QTail_reversed_difference"
498 "test_QTail_reversed_intersection"
499 "test_QTail_reversed_union"
500 "test_QTail_reversed_xor"
501 "test_Q_difference"
502 "test_Q_intersection"
503 "test_Q_union"
504 "test_Q_xor")
505 " and not "))))
506 (native-inputs
507 (list python-defcon-bootstrap
508 python-fontpens-bootstrap
509 python-pytest
510 python-setuptools
511 python-setuptools-scm))
512 (propagated-inputs
513 (list python-fonttools-minimal
514 python-pyclipper))
515 (home-page "https://github.com/typemytype/booleanOperations")
516 (synopsis "Boolean operations on paths")
517 (description
518 "Boolean operations on paths which uses a super fast
519@url{http://www.angusj.com/delphi/clipper.php, polygon clipper library by
520Angus Johnson}.")
521 (license license:expat)))
522
523(define-public python-cffsubr
524 (package
525 (name "python-cffsubr")
526 (version "0.3.0")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (pypi-uri "cffsubr" version))
531 (modules '((guix build utils)))
532 (snippet '(delete-file-recursively "external")) ;unbundle ADFKO
533 (sha256
534 (base32 "1yrfjn3mdi48pg78yzlmskdz9i4nf2wg7h8ivnn9yrw1vc5iaibp"))))
535 (build-system pyproject-build-system)
536 (arguments
537 (list
538 #:phases
539 #~(modify-phases %standard-phases
540 (add-after 'unpack 'patch-setup.py
541 (lambda _
542 (substitute* '("pyproject.toml"
543 "setup.py")
544 ;; This is not needed when building the package.
545 (("setuptools-git-ls-files") "")
546 ;; Do not attempt to build the unbundled ADFKO.
547 (("cmdclass\\[\"build_ext\"] = ExecutableBuildExt.*")
548 ""))))
549 (add-after 'unpack 'patch-tx-path
550 (lambda* (#:key inputs #:allow-other-keys)
551 (define tx (search-input-file inputs "bin/tx"))
552 (substitute* "src/cffsubr/__init__.py"
553 (("TX_EXE = \"tx\"")
554 (format #f "TX_EXE = ~s" tx))
555 ;; Use the full 'tx' file name directly.
556 (("with path\\(__name__, TX_EXE) as tx_cli:")
557 "")
558 ((" (return subprocess.run\\(\\[)str\\(tx_cli)(].*)" _ h t)
559 (format #f "~a~s~a" h tx t))))))))
560 (native-inputs
561 (list python-pytest python-setuptools-scm python-setuptools))
562
563 ;; Use version 3.6.1, which matches the bundled version and does not
564 ;; depend on Java.
565 (inputs (list python-afdko-3.6.1))
566
567 (propagated-inputs (list python-fonttools-minimal))
568 (home-page "https://github.com/adobe-type-tools/cffsubr")
569 (synopsis "Compact Font Format (CFF) subroutinizer")
570 (description "This package provides the @command{cffsubr} command, a
571Compact Font Format (CFF) subroutinizer based on the Adobe Font Development
572Kit for OpenType (AFDKO) @command{tx} tool.")
573 (license license:asl2.0)))
574
575(define-public python-compreffor
576 (package
577 (name "python-compreffor")
578 (version "0.5.6")
579 (source
580 (origin
581 (method git-fetch)
582 (uri (git-reference
583 (url "https://github.com/googlefonts/compreffor")
584 (commit version)))
585 (file-name (git-file-name name version))
586 (sha256
587 (base32 "04pgh1ajglvzm229c4janazfillh9156i4zrkhkyn2mb3dm1zq6y"))))
588 (build-system pyproject-build-system)
589 (arguments
590 (list
591 #:test-flags #~(list "--pyargs" "compreffor")))
592 (native-inputs
593 (list python-cython
594 python-pytest
595 python-setuptools
596 python-setuptools-scm))
597 (propagated-inputs (list python-fonttools-minimal))
598 (home-page "https://github.com/googlefonts/compreffor")
599 (synopsis "@acronym{CFF, Compact Font Format} subroutinizer for fontTools")
600 (description
601 "This package provides a @acronym{CFF, Compact Font Format} subroutinizer
602for fontTools.")
603 (license license:asl2.0)))
604
605(define-public python-cu2qu
606 (package
607 (name "python-cu2qu")
608 (version "1.6.7.post2")
609 (source
610 (origin
611 (method url-fetch)
612 (uri (pypi-uri "cu2qu" version ".zip"))
613 (sha256
614 (base32 "022qpzbpi6j56wqz48rnqs6dvksipw13fi4g10k941fnkgcn5x8x"))))
615 (build-system pyproject-build-system)
616 (arguments
617 ;; XXX: Try to remove it when updating python-fonttools.
618 (list #:test-flags #~(list "-k" "not test_ignore_single_points")))
619 (propagated-inputs (list python-fonttools))
620 (native-inputs
621 (list python-cython
622 python-defcon
623 python-pytest
624 python-setuptools
625 python-setuptools-scm
626 python-wheel
627 unzip))
628 (home-page "https://github.com/googlefonts/cu2qu")
629 (synopsis "Cubic-to-quadratic bezier curve conversion")
630 (description "This library provides functions which take in @acronym{UFO,
631Unified Font Object} objects (such as Defcon Fonts or Robofab RFonts) and
632converts any cubic curves to quadratic. The most useful function is probably
633@code{fonts_to_quadratic}.")
634 (license license:asl2.0)))
635
636(define-public python-ufo2ft
637 (package
638 (name "python-ufo2ft")
639 (version "2.33.4")
640 (source
641 (origin
642 (method url-fetch)
643 (uri (pypi-uri "ufo2ft" version))
644 (sha256
645 (base32 "0xnnwlj3rl0p7q19l6wdrfkzzq1f2l5vyl2qs7kl4vvfalgpzakv"))))
646 (build-system pyproject-build-system)
647 (arguments
648 (list #:test-flags
649 #~(list "-k"
650 ;; XXX: These tests all fail with "TTX output is different
651 ;; from expected". Potentially fixed in 3.x release.
652 (string-append "not test_compileVariableTTF "
653 "and not test_compileVariableCFF2 "
654 "and not test_drop_glyph_names_variable "
655 "and not test_buildTables_FeatureLibError "
656 "and not test_kern_zyyy_zinh"))))
657 (native-inputs
658 (list python-pytest
659 python-setuptools-scm
660 python-setuptools
661 python-wheel))
662 (propagated-inputs
663 (list python-booleanoperations
664 python-cffsubr
665 python-compreffor
666 python-cu2qu
667 python-defcon
668 python-fonttools
669 python-skia-pathops
670 python-ufolib2))
671 (home-page "https://github.com/googlefonts/ufo2ft")
672 (synopsis "Generate OpenType fonts from Unified Font Objects (UFOs)")
673 (description "@code{ufo2ft} (UFO to FontTools) is a fork of @code{ufo2fdk}
674intended to leverage FontTools (a Python library) rather than the Adobe Font
675Development Kit for OpenType (AFDKO), a set of C libraries/utilities so that
676it can be more easily extended. Like @code{ufo2fdk}, its primary purpose is
677to generate OpenType font binaries from Unified Font Objects (UFOs).")
678 (license license:expat)))
679
680(define-public python-fontmath
681 (package
682 (name "python-fontmath")
683 (version "0.9.4")
684 (source
685 (origin
686 (method git-fetch)
687 (uri (git-reference
688 (url "https://github.com/robotools/fontMath")
689 (commit version)))
690 (file-name (git-file-name name version))
691 (sha256
692 (base32 "0g8vpwn4flg0rj7ar8wl9xlpjhcgiz01p56fzkjdlf2jqb36akyy"))))
693 (build-system pyproject-build-system)
694 (propagated-inputs (list python-fonttools-minimal))
695 (native-inputs
696 (list python-pytest
697 python-setuptools
698 python-setuptools-scm
699 unzip))
700 (home-page "https://github.com/robotools/fontMath")
701 (synopsis "Fast font mathematical operations library")
702 (description "This package provides a set of objects for performing fast
703font, glyph, etc. mathematical operations on font data.")
704 (license license:expat)))
705
706;;; An untested variant used to break a cycle with python-booleanoperations.
707(define-public python-fontpens-bootstrap
708 (package
709 (name "python-fontpens-bootstrap")
710 (version "0.2.4")
711 (source
712 (origin
713 (method url-fetch)
714 (uri (pypi-uri "fontPens" version ".zip"))
715 (sha256
716 (base32 "1za15dzsnymq6d9x7xdfqwgw4a3003wj75fn2crhyidkfd2s3nd6"))))
717 (build-system pyproject-build-system)
718 (arguments (list #:tests? #f))
719 (propagated-inputs (list python-fonttools-minimal))
720 (native-inputs (list python-setuptools unzip))
721 (home-page "https://github.com/robofab-developers/fontPens")
722 (synopsis "Python classes implementing the pen protocol")
723 (description "This package provides a collection of Python classes
724implementing the pen protocol for manipulating glyphs.")
725 (license license:bsd-3)))
726
727(define-public python-fontpens
728 (hidden-package
729 (package/inherit python-fontpens-bootstrap
730 (name "python-fontpens")
731 (arguments
732 (substitute-keyword-arguments arguments
733 ((#:tests? _ #f)
734 #t)
735 ((#:phases phases #~%standard-phases)
736 #~(modify-phases #$phases
737 (add-after 'unpack 'drop-flaky-docstring
738 ;; XXX This assertion fails on certain (Intel?) machines, but not
739 ;; others (AMD?), so we can't patch in a ‘correct’ value. Just
740 ;; drop it until the proper fix lands upstream. Reported there
741 ;; as <https://github.com/robotools/fontPens/issues/41>.
742 (lambda _
743 (substitute* "Lib/fontPens/penTools.py"
744 ((".*\\(\\(0, 0), \\(50, 20), \\(100, 40)).*") "")
745 ((".*107\\.70329614269009.*") ""))))))))
746 (native-inputs
747 (modify-inputs native-inputs
748 (append python-fontparts-bootstrap
749 python-fontpens-bootstrap
750 python-pytest))))))
751
752;;; A variant used to break a cycle with python-fontpens.
753(define-public python-fontparts-bootstrap
754 (hidden-package
755 (package
756 (name "python-fontparts-bootstrap")
757 (version "0.13.3")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (pypi-uri "fontparts" version ".tar.gz"))
762 (sha256
763 (base32 "0ddyfa975hskaip6l4hn7n2jh50y5s0pw911phyx2fsws54pw5s7"))))
764 (build-system pyproject-build-system)
765 (arguments
766 (list #:test-backend #~'custom
767 #:test-flags #~(list "Lib/fontParts/fontshell/test.py")))
768 (propagated-inputs
769 (list python-booleanoperations
770 python-defcon-bootstrap
771 python-fontmath
772 python-fonttools-minimal))
773 (native-inputs
774 (list python-setuptools
775 python-setuptools-scm))
776 (home-page "https://github.com/robotools/fontParts")
777 (synopsis "Library for interacting with font parts")
778 (description "FontParts is an @acronym{API, Application Programming
779Interface} for interacting with the parts of fonts during the font development
780process. FontParts is the successor of RoboFab.")
781 (license license:expat))))
782
783(define-public python-fontparts
784 (package/inherit python-fontparts-bootstrap
785 (name "python-fontparts")
786 (propagated-inputs
787 (modify-inputs propagated-inputs
788 (replace "python-defcon-bootstrap" python-defcon)))
789 (properties
790 (alist-delete 'hidden?
791 (package-properties python-fontparts-bootstrap)))))
792
793(define-public python-freetype-py
794 (package
795 (name "python-freetype-py")
796 (version "2.5.1")
797 (source
798 (origin
799 (method git-fetch) ;no tests in PyPI archive
800 (uri (git-reference
801 (url "https://github.com/rougier/freetype-py")
802 (commit (string-append "v" version))))
803 (file-name (git-file-name name version))
804 (sha256
805 (base32 "0cls0469zfqzwpq6k4pxa9vrczsqabqk4qh7444xybcyq9qgs1lp"))))
806 (build-system pyproject-build-system)
807 (arguments
808 (list
809 #:test-flags #~(list "tests")
810 #:phases
811 #~(modify-phases %standard-phases
812 (add-after 'unpack 'patch-lib-paths
813 (lambda _
814 (substitute* "freetype/raw.py"
815 (("ctypes.util.find_library\\('freetype'\\)")
816 (format #f "'~a/~a'" #$(this-package-input "freetype")
817 "lib/libfreetype.so"))))))))
818 (native-inputs
819 (list python-pytest
820 python-setuptools
821 python-setuptools-scm))
822 (inputs
823 (list freetype))
824 (home-page "https://github.com/rougier/freetype-py")
825 (synopsis "Freetype python bindings")
826 (description
827 "Freetype Python provides bindings for the FreeType library. Only the
828high-level API is bound.")
829 (license license:bsd-3)))
830
831(define-public python-glyphslib
832 (package
833 (name "python-glyphslib")
834 (version "6.6.1") ;6.6.1 is the last version that works with ufo2ft 2.x
835 (source (origin
836 (method git-fetch)
837 (uri (git-reference
838 (url "https://github.com/googlefonts/glyphsLib")
839 (commit (string-append "v" version))))
840 (file-name (git-file-name name version))
841 (sha256
842 (base32
843 "193h5ixq9p9m2kwz8srfw61rzgqg6gishlndqm759cymwax0cibi"))))
844 (build-system pyproject-build-system)
845 (native-inputs
846 (list python-setuptools-scm
847 python-setuptools
848 ;; For tests.
849 python-pytest
850 python-xmldiff))
851 (propagated-inputs
852 (list python-defcon
853 python-fonttools
854 python-openstep-plist
855 python-ufolib2
856 python-ufo2ft
857 python-ufonormalizer))
858 (home-page "https://github.com/googlefonts/glyphsLib")
859 (synopsis "Bridge Glyphs source files to UFOs")
860 (description
861 "This package provides a bridge from Glyphs source files (@file{.glyphs})
862to UFOs and DesignSpace files via @code{defcon} and @code{designspaceLib}.")
863 (license license:asl2.0)))
864
865(define-public python-glyphsets
866 (package
867 (name "python-glyphsets")
868 (version "0.5.2")
869 (source
870 (origin
871 (method url-fetch)
872 (uri (pypi-uri "glyphsets" version))
873 (sha256
874 (base32 "1dc24i0hkd85gkkg3bqjhagjyw3xsqxazd86yh2l60c1wr5n9y6g"))))
875 (build-system pyproject-build-system)
876 (arguments
877 (list
878 #:phases
879 #~(modify-phases %standard-phases
880 (add-after 'unpack 'loosen-version-constraints
881 (lambda _
882 (substitute* "setup.py"
883 (("setuptools_scm>=4,<6\\.1")
884 "setuptools_scm>=4"))))
885 (replace 'check
886 (lambda* (#:key tests? #:allow-other-keys)
887 (when tests?
888 (invoke "pytest" "-vv" "tests/testglyphdata.py")
889 (invoke "pytest" "-vv" "tests/testusage.py")))))))
890 (native-inputs (list python-pytest python-setuptools-scm python-setuptools))
891 (propagated-inputs
892 (list python-defcon python-fonttools-minimal python-glyphslib))
893 (home-page "https://github.com/googlefonts/glyphsets/")
894 (synopsis "Evaluate coverage of glyph sets")
895 (description
896 "This package provides an API with data about glyph sets for many
897different scripts and languages.")
898 (license license:asl2.0)))
899
900(define-public python-opentype-sanitizer
901 (package
902 (name "python-opentype-sanitizer")
903 (version "9.2.0")
904 (source
905 (origin
906 (method git-fetch)
907 (uri (git-reference
908 (url "https://github.com/googlefonts/ots-python")
909 (commit (string-append "v" version))))
910 (file-name (git-file-name name version))
911 (sha256
912 (base32 "0ffk99vcwmwpy2wzky1b0vj5j0i9xw67mwk81dzj696f6sws1dkm"))))
913 (build-system pyproject-build-system)
914 (arguments
915 (list
916 #:phases
917 #~(modify-phases %standard-phases
918 (add-after 'unpack 'unbundle-opentype-sanitizer
919 (lambda* (#:key inputs #:allow-other-keys)
920 (substitute* "setup.py"
921 (("^cmdclass\\[\"(download|build_ext|egg_info)\"].*")
922 ""))
923 (substitute* "src/python/ots/__init__.py"
924 (("^OTS_SANITIZE = .*")
925 (format #f "OTS_SANITIZE = ~s~%"
926 (search-input-file inputs "bin/ots-sanitize")))))))))
927 (native-inputs
928 (list python-pytest python-setuptools python-setuptools-scm))
929 (inputs (list opentype-sanitizer))
930 (home-page "https://github.com/googlefonts/ots-python")
931 (synopsis "Python wrapper for OpenType Sanitizer")
932 (description "Python wrapper for the OpenType Sanitizer library.")
933 (license license:bsd-3)))
934
935(define-public python-mutatormath
936 (package
937 (name "python-mutatormath")
938 (version "3.0.1")
939 (source
940 (origin
941 (method git-fetch)
942 (uri (git-reference
943 (url "https://github.com/LettError/MutatorMath")
944 (commit version)))
945 (file-name (git-file-name name version))
946 (sha256
947 (base32 "1pvkhvafy2zzk8rr2dld866jq000vl2srzh0dw9x5lb6rhxi2f9b"))))
948 (build-system pyproject-build-system)
949 (arguments
950 (list
951 #:test-backend #~'custom
952 #:test-flags #~(list "Lib/mutatorMath/test/run.py")))
953 (propagated-inputs (list python-defcon python-fontmath
954 python-fonttools-minimal))
955 (native-inputs (list python-setuptools unzip))
956 (home-page "https://github.com/LettError/MutatorMath")
957 (synopsis "Piecewise linear interpolation Python library")
958 (description
959 "MutatorMath is a Python library for the calculation of piecewise linear
960interpolations in n-dimensions with any number of masters. It was developed
961for interpolating data related to fonts, but if can handle any arithmetic
962object.")
963 (license license:bsd-3)))
964
965(define-public psautohint-font-data
966 ;; There is no release tag, so use the latest commit.
967 (let ((revision "0")
968 (commit "1e4c5061d328105c4dcfcb6fdbc27ec49b3e9d23"))
969 (hidden-package
970 (package
971 (name "psautohint-font-data")
972 (version (git-version "0.0.0" revision commit))
973 (source
974 (origin
975 (method git-fetch)
976 (uri (git-reference
977 (url "https://github.com/adobe-type-tools/psautohint-testdata")
978 (commit commit)))
979 (file-name (git-file-name name version))
980 (sha256
981 (base32
982 "0p7g8mnndzp8zpbj9h6lkvfdpvd74fy10q8wmkagbg2ahbdi1zva"))))
983 (build-system copy-build-system)
984 (home-page "https://github.com/adobe-type-tools/psautohint-testdata")
985 (synopsis "Test font data psautohint")
986 (description "This package contains the font data used by the test
987suite of the @code{psautohint} package.")
988 ;; The bundle contains font data from the Cantarell, Libertinus, Source
989 ;; Code Pro, Source Serif Pro, all available under the same license.
990 (license license:silofl1.1)))))
991
992(define-public psautohint
993 (package
994 (name "psautohint")
995 (version "2.4.0")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (pypi-uri "psautohint" version))
1000 (sha256
1001 (base32 "0zzz7hy1kkkjfrrm9ly2di3xv2x1ywdqhbyqy21k670jysldw3nm"))))
1002 (build-system pyproject-build-system)
1003 (arguments
1004 (list
1005 #:test-flags
1006 #~(list "-k"
1007 (string-join
1008 '(;; The CJKSparseVar.subset.hinted.otf test fails with slightly
1009 ;; different output caused by the newer fonttools version used
1010 ;; in Guix.
1011 "not CJKSparseVar.subset.hinted.otf"
1012 ;; These tests fails underministically, See also:
1013 ;; https://github.com/adobe-type-tools/afdko/issues/1678
1014 "not test_hashmap_no_version"
1015 "not test_hashmap_old_version")
1016 " and "))
1017 #:phases
1018 #~(modify-phases %standard-phases
1019 (add-after 'unpack 'copy-font-data
1020 ;; The data is copied as it needs to be writable for the tests.
1021 (lambda _
1022 (copy-recursively
1023 #$(this-package-native-input "psautohint-font-data")
1024 "tests/integration/data")
1025 (for-each make-file-writable
1026 (find-files "tests/integration/data")))))))
1027 (inputs (list python-fonttools))
1028 (native-inputs
1029 (list psautohint-font-data
1030 python-pytest
1031 python-pytest-xdist
1032 python-setuptools-scm
1033 python-setuptools
1034 python-wheel))
1035 (home-page "https://github.com/adobe-type-tools/psautohint")
1036 (synopsis "Adobe's PostScript autohinter")
1037 (description "This package provides the @command{autohinter} command that
1038can be used to hint PostScript fonts. A Python wrapper is also included.")
1039 (license license:asl2.0)))
1040
1041(define-public python-sfdlib
1042 (package
1043 (name "python-sfdlib")
1044 (version "1.2.5")
1045 (source
1046 (origin
1047 (method git-fetch)
1048 (uri (git-reference
1049 (url "https://github.com/aliftype/sfdLib")
1050 (commit (string-append "v" version))))
1051 (file-name (git-file-name name version))
1052 (sha256
1053 (base32 "00vss0pv7y041rqjlbq8si7319w0mzlkp3ckw150mmxzsrx0m58c"))))
1054 (build-system pyproject-build-system)
1055 (arguments (list #:tests? #f)) ; No tests upstream.
1056 (native-inputs (list python-setuptools))
1057 (propagated-inputs (list python-ufolib2))
1058 (home-page "https://github.com/aliftype/sfdLib")
1059 (synopsis "Simple SFD to UFO converter")
1060 (description
1061 "This package provides the @command{sfd2ufo} command, a converter from
1062FontForge’s @acronym{SFD, Spline Font Database} fonts to @acronym{UFO, Unified
1063Font Object} fonts.")
1064 (license license:bsd-3)))
1065
1066(define-public python-skia-pathops
1067 (package
1068 (name "python-skia-pathops")
1069 (version "0.8.0")
1070 (source
1071 (origin
1072 (method url-fetch)
1073 (uri (pypi-uri "skia-pathops" version ".zip"))
1074 (modules '((guix build utils)))
1075 (snippet '(delete-file-recursively "src/cpp")) ;140+ MiB of stuff
1076 (sha256
1077 (base32 "1vlwl1w6sn8c78fsh1w549n3lk9v3v9hcp866vrsdr4byb7g2ani"))))
1078 (build-system pyproject-build-system)
1079 (arguments
1080 (list
1081 #:phases
1082 #~(modify-phases %standard-phases
1083 (add-after 'unpack 'configure-env
1084 (lambda _
1085 (setenv "BUILD_SKIA_FROM_SOURCE" "0")))
1086 (add-after 'unpack 'adjust-c++-language
1087 (lambda _
1088 ;; Our version of Skia requires c++17.
1089 (substitute* "setup.py"
1090 (("-std=c\\+\\+14")
1091 "-std=c++17")))))))
1092 (native-inputs
1093 (list pkg-config
1094 python-cython-0
1095 python-pytest
1096 python-setuptools-scm
1097 unzip))
1098 (inputs (list skia))
1099 (home-page "https://github.com/fonttools/skia-pathops")
1100 (synopsis "Python bindings for the Skia library's Path Ops module")
1101 (description "This package provides Python bindings for the Path Ops
1102module of the Skia library, performing boolean operations on
1103paths (intersection, union, difference, xor).")
1104 (license license:bsd-3)))
1105
1106(define-public python-ufoprocessor
1107 (package
1108 (name "python-ufoprocessor")
1109 (version "1.14.1")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (pypi-uri "ufoprocessor" version ".tar.gz"))
1114 (sha256
1115 (base32 "009vq25bn0w5nispvyglrrm21qpxvvjc3zfkm0dig54v6p6d6f7x"))))
1116 (build-system pyproject-build-system)
1117 (arguments
1118 (list
1119 #:test-backend #~'custom
1120 #:test-flags #~(list "Tests/tests.py")))
1121 (propagated-inputs
1122 (list python-defcon
1123 python-fontmath
1124 python-fontparts
1125 python-fonttools-minimal
1126 python-mutatormath))
1127 (native-inputs (list python-setuptools python-setuptools-scm))
1128 (home-page "https://github.com/LettError/ufoProcessor")
1129 (synopsis "Process and generate @acronym{UFO, Unified Font Object} files")
1130 (description "This Python package processes and generates instances for
1131@acronym{UFO, Unified Font Object} files, glyphs and other data. It can,
1132among other things:
1133@itemize
1134@item Collect source materials.
1135@item Provide mutators for specific glyphs, font info, kerning so that other
1136tools can generate partial instances.
1137@item Support designspace format 4 with layers.
1138@item Apply avar-like designspace bending.
1139@item Apply rules.
1140@item Generate actual UFO instances in formats 2 and 3.
1141@item Round geometry as requested.
1142@end itemize")
1143 (license license:expat)))
1144
1145(define-public python-ufonormalizer
1146 (package
1147 (name "python-ufonormalizer")
1148 (version "0.6.3")
1149 (source
1150 (origin
1151 (method git-fetch)
1152 (uri (git-reference
1153 (url "https://github.com/unified-font-object/ufoNormalizer")
1154 (commit version)))
1155 (file-name (git-file-name name version))
1156 (sha256
1157 (base32 "17r72m5gy5fbng3f4vh3z63xjy84q5rdzj5cyvrvwgj33yl6b18k"))))
1158 (build-system pyproject-build-system)
1159 (arguments
1160 (list
1161 #:test-backend #~'unittest))
1162 (native-inputs (list python-setuptools python-setuptools-scm unzip))
1163 (home-page "https://github.com/unified-font-object/ufoNormalizer")
1164 (synopsis "Script to normalize @acronym{UFO, Unified Font Object} data")
1165 (description
1166 "The purpose of the @command{ufonormalizer} command is to provide a
1167standard formatting so that updates to @acronym{UFO, Unified Font Object} data
1168can be usefully versioned. Examples of formatting applied by ufoNormalizer
1169include:
1170@itemize
1171@item Changing floating-point numbers to integers where it doesn't alter the
1172value (e.g. @samp{x=\"95.0\"} becomes @samp{x=\"95\"})
1173@item Rounding floating-point numbers to 10 digits
1174@item Formatting XML with tabs rather than spaces.
1175@end itemize")
1176 (license license:bsd-3)))
1177
1178(define-public fontobene-qt
1179 (package
1180 (name "fontobene-qt")
1181 (version "1.0.0")
1182 (source (origin
1183 (method git-fetch)
1184 (uri (git-reference
1185 (url "https://github.com/fontobene/fontobene-qt")
1186 (commit version)))
1187 (file-name (git-file-name name version))
1188 (sha256
1189 (base32
1190 "098ys33l563hjyzm6azzw8kmlybja374vacakczwhh2k3ifn37r9"))))
1191 (inputs (list qtbase))
1192 (build-system cmake-build-system)
1193 (arguments
1194 `(#:phases
1195 (modify-phases %standard-phases
1196 (replace 'check
1197 (lambda* (#:key tests? #:allow-other-keys)
1198 (when tests?
1199 (invoke "./tests/fontobene-qt-tests")))))))
1200 (home-page "https://github.com/fontobene/fontobene-qt5")
1201 (synopsis "Parser for FontoBene stroke fonts")
1202 (description "FontoBene-Qt is a header-only library to parse FontoBene
1203stroke fonts with C++11/Qt.")
1204 ;; Dual-licensed, either license applies.
1205 (license (list license:asl2.0 license:expat))))
1206
1207(define-public ttfautohint
1208 (package
1209 (name "ttfautohint")
1210 (version "1.8.3")
1211 (source
1212 (origin
1213 (method url-fetch)
1214 (uri (string-append "mirror://savannah/freetype/ttfautohint-"
1215 version ".tar.gz"))
1216 (sha256
1217 (base32
1218 "0zpqgihn3yh3v51ynxwr8asqrijvs4gv686clwv7bm8sawr4kfw7"))))
1219 (build-system gnu-build-system)
1220 (native-inputs
1221 (list flex bison pkg-config))
1222 (inputs
1223 (list freetype harfbuzz))
1224 (arguments
1225 `(#:configure-flags '("--disable-static"
1226 "--with-qt=no"))) ;no gui
1227 (synopsis "Automated font hinting")
1228 (description
1229 "ttfautohint provides a 99% automated hinting process and a platform for
1230finely hand-hinting the last 1%. It is ideal for web fonts and supports many
1231scripts.")
1232 (license (list license:gpl2+ license:freetype)) ;choose one or the other
1233 (home-page "https://www.freetype.org/ttfautohint/")))
1234
1235(define-public woff-tools
1236 (package
1237 (name "woff-tools")
1238 (version "2009.10.04")
1239 (source
1240 (origin
1241 (method url-fetch)
1242 ;; Upstream source is unversioned, so use Debian's versioned tarball
1243 (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
1244 "woff-tools_" version ".orig.tar.gz"))
1245 (file-name (string-append name "-" version ".tar.gz"))
1246 (sha256
1247 (base32
1248 "1i97gkqa6jfzlslsngqf556kx60knlgf7yc9pzsq2pizc6f0d4zl"))))
1249 (build-system gnu-build-system)
1250 (inputs
1251 (list zlib))
1252 (arguments
1253 `(#:make-flags '(,(string-append "CC=" (cc-for-target)))
1254 #:tests? #f ;no tests
1255 #:phases
1256 (modify-phases %standard-phases
1257 (delete 'configure) ;no configuration
1258 (replace 'install
1259 (lambda* (#:key outputs #:allow-other-keys)
1260 (let* ((out (assoc-ref outputs "out"))
1261 (bin (string-append out "/bin")))
1262 (install-file "sfnt2woff" bin)
1263 (install-file "woff2sfnt" bin))
1264 #t)))))
1265 (synopsis "Convert between OpenType and WOFF fonts")
1266 (description
1267 "This package provides two tools:
1268@table @code
1269@item sfnt2woff
1270Converts OpenType fonts to WOFF fonts
1271@item woff2sfnt
1272Converts WOFF fonts to OpenType fonts
1273@end table")
1274 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
1275 (home-page "https://people.mozilla.com/~jkew/woff/")))
1276
1277(define-public ttf2eot
1278 (package
1279 (name "ttf2eot")
1280 (version "0.0.3")
1281 (source
1282 (origin
1283 (method git-fetch)
1284 (uri (git-reference
1285 (url "https://github.com/wget/ttf2eot")
1286 (commit (string-append "v" version))))
1287 (file-name (git-file-name name version))
1288 (sha256
1289 (base32
1290 "0l2yh2ialx7135pjzhjs204kk3br7zxjr09zwaia493by2adzigr"))
1291 (patches (list (search-patch "ttf2eot-cstddef.patch")))))
1292 (build-system gnu-build-system)
1293 (arguments
1294 `(#:tests? #f ; no tests
1295 #:phases
1296 (modify-phases %standard-phases
1297 (delete 'configure) ; no configuration
1298 (replace 'install ; no install target
1299 (lambda* (#:key outputs #:allow-other-keys)
1300 (let* ((out (assoc-ref outputs "out"))
1301 (bin (string-append out "/bin")))
1302 (install-file "ttf2eot" bin)
1303 #t))))))
1304 (synopsis "Convert from TrueType to Embeddable Open Type")
1305 (description
1306 "This package contains a commandline wrapper around OpenTypeUtilities.cpp
1307from Chromium, used to make EOT (Embeddable Open Type) files from
1308TTF (TrueType/OpenType Font) files.")
1309 ;; While the README states "License: Derived from WebKit, so BSD/LGPL
1310 ;; 2/LGPL 2.1", the single derived source file includes only BSD in its
1311 ;; license header, and the wrapper source contains no license header.
1312 (license license:bsd-2)
1313 (home-page "https://github.com/wget/ttf2eot")))
1314
1315(define-public ttf2pt1
1316 (package
1317 (name "ttf2pt1")
1318 (version "3.4.4")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append "mirror://sourceforge/ttf2pt1/ttf2pt1/"
1322 version "/ttf2pt1-" version ".tgz"))
1323 (sha256
1324 (base32
1325 "1l718n4k4widx49xz7qrj4mybzb8q67kp2jw7f47604ips4654mf"))
1326 (modules '((guix build utils)))
1327 (snippet
1328 #~(begin
1329 ;; Include <unistd.h> for the 'getopt' declaration.
1330 (substitute* "t1asm.c"
1331 (("#include <stdio.h>" all)
1332 (string-append all "\n"
1333 "#include <unistd.h>\n")))
1334
1335 ;; Remove trailing backslashes in the sed expression of the
1336 ;; 'install' rule since sed would otherwise fail.
1337 (substitute* "Makefile"
1338 (("\\|;\\\\[[:space:]]*$") "|; "))
1339 #t))))
1340 (build-system gnu-build-system)
1341 (arguments
1342 (list #:tests? #f ;no tests
1343 #:phases
1344 #~(modify-phases %standard-phases
1345 (replace 'configure
1346 (lambda* (#:key outputs #:allow-other-keys)
1347 (let ((out (assoc-ref outputs "out")))
1348 (substitute* "Makefile"
1349 (("INSTDIR =.*")
1350 (string-append "INSTDIR = " out "\n"))
1351 (("OWNER = .*")
1352 "OWNER = `id -un`\n")
1353 (("GROUP = .*")
1354 "GROUP = `id -g`\n")) #t)))
1355 (replace 'build
1356 (lambda _
1357 (invoke "make" "-j"
1358 (number->string (parallel-job-count))
1359 "all" "CC=gcc"))))))
1360 (inputs (list perl))
1361 (synopsis "Convert TrueType fonts to Postscript Type 1")
1362 (description
1363 "TTF2PT1 provides tools to convert most TrueType fonts (or other formats
1364supported by the FreeType library) to an Adobe Type 1 @file{.pfa} or
1365@file{.pfb} file. Another use is as a hinting engine: feed it an unhinted or
1366poorly hinted Adobe Type 1 font through the FreeType library and get it back
1367with freshly generated hints. The files produced by default are in
1368human-readable form, which further needs to be encoded with t1utilities to
1369work with most software requiring Type 1 fonts.")
1370 (home-page "https://ttf2pt1.sourceforge.net/")
1371 (license license:bsd-3)))
1372
1373(define-public woff2
1374 (package
1375 (name "woff2")
1376 (version "1.0.2")
1377 (source
1378 (origin
1379 (method git-fetch)
1380 (uri
1381 (git-reference
1382 (url "https://github.com/google/woff2")
1383 (commit (string-append "v" version))))
1384 (file-name
1385 (git-file-name name version))
1386 (sha256
1387 (base32 "13l4g536h0pr84ww4wxs2za439s0xp1va55g6l478rfbb1spp44y"))))
1388 (build-system cmake-build-system)
1389 (outputs '("out" "bin"))
1390 (arguments
1391 `(#:tests? #f ;no test suite
1392 #:configure-flags
1393 (list
1394 (string-append "-DCMAKE_INSTALL_BINDIR="
1395 (assoc-ref %outputs "bin")
1396 "/bin")
1397 (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
1398 (assoc-ref %outputs "out")
1399 "/include")
1400 (string-append "-DCMAKE_INSTALL_LIBDIR="
1401 (assoc-ref %outputs "out")
1402 "/lib"))
1403 #:phases
1404 (modify-phases %standard-phases
1405 ;; To install both binaries and libraries.
1406 (add-after 'unpack 'patch-installation
1407 (lambda _
1408 (substitute* "CMakeLists.txt"
1409 (("NOT BUILD_SHARED_LIBS")
1410 "BUILD_SHARED_LIBS")))))))
1411 (native-inputs
1412 (list pkg-config))
1413 (propagated-inputs
1414 (list brotli)) ;libwoff2dec.pc requires libbrotlidec
1415 (synopsis "Libraries and tools for WOFF2 font format")
1416 (description "WOFF2 provides libraries and tools to handle the Web Open
1417Font Format (WOFF).")
1418 (home-page "https://w3c.github.io/woff/woff2/")
1419 (license license:expat)))
1420
1421;;; Update with: guix refresh -u '(@ (gnu packages fontutils) fontconfig)'
1422(define-public fontconfig
1423 (hidden-package
1424 (package
1425 (name "fontconfig-minimal")
1426 (version "2.17.1")
1427 (source (origin
1428 (method url-fetch)
1429 (uri (string-append
1430 "https://gitlab.freedesktop.org/api/v4/projects/890"
1431 "/packages/generic/fontconfig/" version "/fontconfig-"
1432 version ".tar.xz"))
1433 (sha256 (base32
1434 "0hd5dw15q0i7518w1zqjcvyhvmlcf3ycv6df0ny1zz7zyj9swp4z"))
1435 (patches (search-patches "fontconfig-cache-ignore-mtime.patch"))))
1436 (build-system gnu-build-system)
1437 ;; In Requires or Requires.private of fontconfig.pc.
1438 (propagated-inputs (list expat freetype
1439 `(,util-linux "lib")))
1440 (inputs
1441 ;; We use to use 'font-ghostscript' but they are not recognized by newer
1442 ;; versions of Pango, causing many applications to fail to find fonts
1443 ;; otherwise.
1444 (list font-dejavu))
1445 (native-inputs
1446 (list autoconf-2.71
1447 automake
1448 gettext-minimal
1449 gperf
1450 libtool
1451 pkg-config
1452 python-minimal)) ;to avoid a cycle through tk
1453 (arguments
1454 (list
1455 #:configure-flags
1456 #~(list "--disable-docs"
1457 "--with-cache-dir=/var/cache/fontconfig"
1458 ;; register the default fonts
1459 (string-append "--with-default-fonts="
1460 #$(this-package-input "font-dejavu")
1461 "/share/fonts"))
1462 #:phases
1463 #~(modify-phases %standard-phases
1464 (add-before 'check 'skip-problematic-tests
1465 (lambda _
1466 ;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
1467 (unsetenv "SOURCE_DATE_EPOCH")
1468
1469 (substitute* "test/run-test.sh"
1470 ;; The crbug1004254 test attempts to fetch fonts from the
1471 ;; network.
1472 (("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]")
1473 "false"))))
1474 (replace 'install
1475 (lambda _
1476 ;; Don't try to create /var/cache/fontconfig.
1477 (invoke "make" "install"
1478 "fc_cachedir=$(TMPDIR)"
1479 "RUN_FC_CACHE_TEST=false"))))))
1480 (synopsis "Library for configuring and customizing font access")
1481 (description
1482 "Fontconfig can discover new fonts when installed automatically;
1483perform font name substitution, so that appropriate alternative fonts can
1484be selected if fonts are missing;
1485identify the set of fonts required to completely cover a set of languages;
1486have GUI configuration tools built as it uses an XML-based configuration file;
1487efficiently and quickly find needed fonts among the set of installed fonts;
1488be used in concert with the X Render Extension and FreeType to implement
1489high quality, anti-aliased and subpixel rendered text on a display.")
1490 ; The exact license is more X11-style than BSD-style.
1491 (license (license:non-copyleft "file://COPYING"
1492 "See COPYING in the distribution."))
1493 (native-search-paths
1494 ;; Since version 2.13.94, fontconfig knows to find fonts from
1495 ;; XDG_DATA_DIRS.
1496 (list (search-path-specification
1497 (variable "XDG_DATA_DIRS")
1498 (files '("share")))))
1499 (home-page "https://www.freedesktop.org/wiki/Software/fontconfig/"))))
1500
1501;;; The documentation of fontconfig is built in a separate package, as it
1502;;; causes a dramatic increase in the size of the closure of fontconfig.
1503(define-public fontconfig-with-documentation
1504 (package
1505 (inherit fontconfig)
1506 (name "fontconfig")
1507 (outputs (cons "doc" (package-outputs fontconfig)))
1508 (arguments
1509 (substitute-keyword-arguments arguments
1510 ((#:configure-flags configure-flags)
1511 #~(delete "--disable-docs" #$configure-flags))
1512 ((#:phases phases '%standard-phases)
1513 #~(modify-phases #$phases
1514 (add-after 'unpack 'no-pdf-doc
1515 (lambda _
1516 ;; Don't build documentation as PDF.
1517 (substitute* "doc/Makefile.in"
1518 (("^PDF_FILES = .*")
1519 "PDF_FILES =\n"))))
1520 (add-after 'install 'move-man-sections
1521 (lambda* (#:key outputs #:allow-other-keys)
1522 ;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in
1523 ;; "out" for convenience.
1524 (for-each
1525 (lambda (section)
1526 (let ((source (string-append #$output "/share/man/"
1527 section))
1528 (target (string-append #$output:doc "/share/man/"
1529 section)))
1530 (copy-recursively source target)
1531 (delete-file-recursively source)))
1532 '("man3" "man5"))))))))
1533 (native-inputs
1534 (modify-inputs native-inputs
1535 (append docbook-utils)))
1536 (properties (alist-delete 'hidden? (package-properties fontconfig)))))
1537
1538(define-public t1lib
1539 (package
1540 (name "t1lib")
1541 (version "5.1.2")
1542 (source (origin
1543 (method url-fetch)
1544 (uri (list (string-append "ftp://sunsite.unc.edu/pub/Linux/libs/"
1545 "graphics/" name "-" version ".tar.gz")
1546 (string-append "https://fossies.org/linux/misc/old/"
1547 name "-" version ".tar.gz")))
1548 (sha256 (base32
1549 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))
1550 (patches (search-patches
1551 "t1lib-CVE-2010-2642.patch" ; 2011-0443, 2011-5244
1552 "t1lib-CVE-2011-0764.patch"
1553 "t1lib-CVE-2011-1552+.patch")))) ; 2011-1553, 2011-1554
1554 (properties `((lint-hidden-cve . ("CVE-2011-0433"
1555 "CVE-2011-1553"
1556 "CVE-2011-1554"
1557 "CVE-2011-5244"))))
1558 (build-system gnu-build-system)
1559 (arguments
1560 ;; Making the documentation requires latex, but t1lib is also an input
1561 ;; for building texlive.
1562 `(#:tests? #f ; no test target
1563 #:configure-flags
1564 '("CFLAGS=-g -O2 -Wno-error=implicit-int")
1565 #:make-flags
1566 '("without_doc")))
1567 (synopsis "Library for generating bitmaps from Type 1 fonts")
1568 (description
1569 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
1570It is based on the code of the X11 rasteriser of the X11 project.
1571
1572The bitmaps created by t1lib are returned in a data structure with type
1573GLYPH. This special GLYPH-type is also used in the X11 window system to
1574describe character bitmaps. It contains the bitmap data as well as some
1575metric information. But t1lib is in itself entirely independent of the
1576X11-system or any other graphical user interface.")
1577 (license license:gpl2)
1578 (home-page "https://www.t1lib.org/")))
1579
1580(define-public teckit
1581 (package
1582 (name "teckit")
1583 (version "2.5.10") ; signed by key 0xC9183BEA0288CDEE
1584 (source
1585 (origin
1586 (method url-fetch)
1587 (uri (string-append "https://github.com/silnrsi/teckit/releases/"
1588 "download/v" version "/teckit-" version ".tar.gz"))
1589 (sha256
1590 (base32 "12qnf8nhxyr4d5pc01s3vc6h726506957an4vvmmfz633cqi5796"))))
1591 (build-system gnu-build-system)
1592 (arguments
1593 '(#:configure-flags '("--disable-static")))
1594 (inputs
1595 (list zlib expat))
1596 (native-inputs
1597 (list perl)) ;for the tests
1598 (synopsis "Toolkit for encoding conversions")
1599 (description
1600 "TECkit is a low-level toolkit intended to be used by other applications
1601that need to perform encoding conversions (e.g., when importing legacy data
1602into a Unicode-based application). The primary component of the TECkit
1603package is therefore a library that performs conversions; this is the
1604\"TECkit engine\". The engine relies on mapping tables in a specific binary
1605format (for which documentation is available); there is a compiler that
1606creates such tables from a human-readable mapping description (a simple
1607text file).
1608
1609To facilitate the development and testing of mapping tables for TECkit,
1610several applications are also included in the current package; these
1611include simple tools for applying conversions to plain-text and Standard
1612Format files, as well as both command-line and simple GUI versions of the
1613TECkit compiler. However, it is not intended that these tools will be the
1614primary means by which end users perform conversions, and they have not
1615been designed, tested, and debugged to the extent that general-purpose
1616applications should be.")
1617 (license license:lgpl2.1+)
1618 (home-page "https://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
1619
1620;; NOTE: A warning from upstream: This program is currently not actively
1621;; maintained, it seems to work fine, but use at your own risk.
1622(define-public go-wrap
1623 (package
1624 (name "go-wrap")
1625 (version "0.3.2")
1626 (source
1627 (origin
1628 (method git-fetch)
1629 (uri (git-reference
1630 ;; Original URL <https://github.com/Wraparound/wrap>, now
1631 ;; redirects to this.
1632 (url "https://github.com/eprovst/wrap")
1633 (commit (string-append "v" version))))
1634 (file-name (git-file-name name version))
1635 (sha256
1636 (base32 "1xk1zii8vqzfys48phpdnr8ign0xvrsfwzyk9m0is9i3rffm25wh"))
1637 (patches (search-patches
1638 "go-github-com-wraparound-wrap-free-fonts.patch"))))
1639 (build-system go-build-system)
1640 (arguments
1641 (list
1642 #:install-source? #f
1643 #:import-path "github.com/eprovst/wrap/cmd/wrap"
1644 #:unpack-path "github.com/eprovst/wrap"
1645 #:phases
1646 #~(modify-phases %standard-phases
1647 (add-after 'install 'wrap-fonts
1648 (lambda* (#:key inputs outputs #:allow-other-keys)
1649 (for-each
1650 (lambda (program)
1651 (wrap-program program
1652 `("XDG_DATA_DIRS" suffix
1653 ,(map dirname
1654 (search-path-as-list '("share/fonts")
1655 (map cdr inputs))))))
1656 (find-files (string-append (assoc-ref outputs "out")
1657 "/bin"))))))))
1658 (native-inputs
1659 (list go-github-com-spf13-cobra
1660 go-github-com-signintech-gopdf
1661 go-github-com-flopp-go-findfont))
1662 (inputs
1663 (list font-liberation
1664 font-gnu-freefont))
1665 (home-page "https://github.com/eprovst/wrap")
1666 (synopsis "Format Fountain screenplays")
1667 (description
1668 "Wrap is a command line tool that is able to convert Fountain files into
1669a correctly formatted screen- or stageplay as an HTML or a PDF. It supports
1670standard Fountain, but also has some custom syntax extensions such as
1671translated keywords and acts.")
1672 (license license:gpl3)))
1673
1674(define-public graphite2
1675 (package
1676 (name "graphite2")
1677 (version "1.3.13")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
1682 "download/" version "/" name "-" version ".tgz"))
1683 (sha256
1684 (base32
1685 "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
1686 (build-system cmake-build-system)
1687 (native-inputs
1688 (list python python-fonttools-minimal))
1689 (inputs
1690 (list freetype))
1691 (arguments
1692 (list
1693 #:phases
1694 (if (target-hurd?)
1695 #~(modify-phases %standard-phases
1696 (add-after 'unpack 'apply-patch
1697 (lambda _
1698 ;; use same linker settings as on linux
1699 ;; harfbuzz complains about being linked against libstdc++
1700 (let ((patch #$(local-file
1701 (search-patch "graphite2-non-linux.patch"))))
1702 (invoke "patch" "--force" "-p1" "-i" patch)))))
1703 #~%standard-phases)))
1704 (synopsis "Reimplementation of the SIL Graphite text processing engine")
1705 (description
1706 "Graphite2 is a reimplementation of the SIL Graphite text processing
1707engine. Graphite is a smart font technology designed to facilitate the
1708process known as shaping. This process takes an input Unicode text string
1709and returns a sequence of positioned glyphids from the font.")
1710 (license license:lgpl2.1+)
1711 (home-page "https://github.com/silnrsi/graphite")))
1712
1713(define-public potrace
1714 (package
1715 (name "potrace")
1716 (version "1.16")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (string-append "mirror://sourceforge/potrace/" version
1721 "/potrace-" version ".tar.gz"))
1722 (sha256
1723 (base32
1724 "1k3sxgjqq0jnpk9xxys05q32sl5hbf1lbk1gmfxcrmpdgnhli0my"))))
1725 (build-system gnu-build-system)
1726 (native-inputs (list ghostscript)) ;for tests
1727 (inputs (list zlib))
1728 (arguments
1729 `(#:configure-flags
1730 `("--with-libpotrace"))) ; install library and headers
1731 (synopsis "Transform bitmaps into vector graphics")
1732 (description
1733 "Potrace is a tool for tracing a bitmap, which means, transforming a
1734bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
1735or BMP format), and the default output is an encapsulated PostScript
1736file (EPS). A typical use is to create EPS files from scanned data, such as
1737company or university logos, handwritten notes, etc. The resulting image is
1738not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
1739resolution.")
1740 (license license:gpl2+)
1741 (home-page "https://potrace.sourceforge.net/")))
1742
1743(define-public psftools
1744 (package
1745 (name "psftools")
1746 (version "1.1.1")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (string-append "https://www.seasip.info/Unix/PSF/"
1751 "psftools-" version ".tar.gz"))
1752 (sha256
1753 (base32 "1lv6kvrcbspyh7a0hlji84wbmw6xh87r3iaafq3khp88kgh1irri"))))
1754 (build-system gnu-build-system)
1755 (arguments
1756 (list
1757 #:configure-flags #~(list "--disable-static")))
1758 (home-page "https://www.seasip.info/Unix/PSF/")
1759 (synopsis
1760 "Convert PSF fixed-width bitmap (console) fonts from/to other formats")
1761 (description
1762 "@acronym{PSF, PC Screen Font} is the simple monospaced bitmap font format
1763used by the Linux kernel for console fonts. The PSF Tools convert between PSF
1764and many other font formats, similar to what the NetPBM package does for images.
1765
1766It includes converters for a good number of common bitmap font formats such as
1767@file{.BDF}, @file{.FNT}, and @file{.FON} files, Berkeley vfonts, classic
1768Amstrad/Sinclair/Hercules/BBC Micro soft fonts, and raw (DOS-style) fonts.
1769
1770It also supports less traditional formats such as PBM/XBM images, plain text
1771(for rudimentary editing), and C header files.")
1772 (license license:gpl2+)))
1773
1774(define-public libotf
1775 (package
1776 (name "libotf")
1777 (version "0.9.16")
1778 (source (origin
1779 (method url-fetch)
1780 (uri (string-append "mirror://savannah/m17n/libotf-"
1781 version ".tar.gz"))
1782 (sha256
1783 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
1784 (build-system gnu-build-system)
1785 (native-inputs
1786 (list pkg-config))
1787 (propagated-inputs
1788 (list freetype))
1789 (home-page "https://www.nongnu.org/m17n/")
1790 (synopsis "Library for handling OpenType Font")
1791 (description "This library can read Open Type Layout Tables from an OTF
1792file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
1793GPOS. It can convert a Unicode character sequence to a glyph code sequence by
1794using the above tables.")
1795 (license license:lgpl2.0+)))
1796
1797(define-public libspiro
1798 (package
1799 (name "libspiro")
1800 (version "20200505")
1801 (source
1802 (origin
1803 (method url-fetch)
1804 (uri (string-append "https://github.com/fontforge/libspiro/releases"
1805 "/download/" version "/libspiro-dist-" version ".tar.gz"))
1806 (sha256
1807 (base32
1808 "0j8fmyj4wz6mqk17dqs6f8jx0i52n68gv5px17qbrjnbilg9mih6"))))
1809 (build-system gnu-build-system)
1810 (arguments
1811 '(#:configure-flags '("--disable-static")))
1812 (synopsis "Clothoid to bezier conversion library")
1813 (description
1814 "Raph Levien's Spiro package as a library. A mechanism for drawing
1815smooth contours with constant curvature at the spline joins.")
1816 (license license:gpl2+)
1817 (home-page "https://libspiro.sourceforge.net/")))
1818
1819(define-public libuninameslist
1820 (package
1821 (name "libuninameslist")
1822 (version "20200313")
1823 (home-page "https://github.com/fontforge/libuninameslist")
1824 (source
1825 (origin
1826 (method url-fetch)
1827 (uri (string-append home-page "/releases/download/" version
1828 "/libuninameslist-dist-" version ".tar.gz"))
1829 (sha256
1830 (base32
1831 "10ri80c64xb4rhbif3sr87y5vhi3m702zb0m02imvj1jib9rq0m8"))))
1832 (build-system gnu-build-system)
1833 (synopsis "Unicode names and annotation list")
1834 (description
1835 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
1836useful for programs that need Unicode \"Names\", \"Annotations\", and block
1837definitions.")
1838 ;; COPYING specifies GPL2, but according to LICENSE it only covers the
1839 ;; configure script. The actual code is BSD-3, and the Unicode data
1840 ;; is governed by an X11-style license only found on the web.
1841 (license (list license:bsd-3
1842 (license:x11-style
1843 "https://www.unicode.org/copyright.html#License")))))
1844
1845(define-public fontforge
1846 (package
1847 (name "fontforge")
1848 (version "20230101")
1849 (source (origin
1850 (method url-fetch)
1851 (uri (string-append
1852 "https://github.com/fontforge/fontforge/releases/download/"
1853 version "/fontforge-" version ".tar.xz"))
1854 (sha256
1855 (base32 "1y30bk9rdya8bkw4q77y6nq5xfg7nm0qliz5miqdlk8c0r6fr0na"))))
1856 (build-system cmake-build-system)
1857 (native-inputs
1858 (list pkg-config
1859 python-setuptools))
1860 (inputs
1861 (list cairo
1862 bash-minimal
1863 fontconfig ;dlopen'd
1864 freetype
1865 gettext-minimal
1866 libice
1867 libsm
1868 libx11
1869 libxi
1870 libjpeg-turbo
1871 libltdl
1872 libpng
1873 libspiro
1874 libtiff
1875 libungif
1876 libxft
1877 libxml2
1878 pango
1879 potrace
1880 python
1881 ;; XXX: Python 3.12 lacks distutils:
1882 ;; ModuleNotFoundError: No module named 'distutils'
1883 ;; Remove when package is updated.
1884 python-setuptools-bootstrap
1885 zlib))
1886 (arguments
1887 (append
1888 (if (system-hurd?)
1889 (list #:test-exclude "test0001_py|test0001_pyhook")
1890 '())
1891 (list
1892 #:configure-flags #~`(;; TODO: Provide GTK+ for the Wayland-friendly GDK
1893 ;; backend, instead of the legacy X11 backend.
1894 ;; Currently it introduces a circular dependency.
1895 "-DENABLE_X11=ON")
1896 #:phases
1897 #~(modify-phases %standard-phases
1898 (add-after 'unpack 'do-not-override-RPATH
1899 (lambda _
1900 ;; Do not attempt to set a default RPATH, as our ld-wrapper
1901 ;; already does the right thing.
1902 (substitute* "CMakeLists.txt"
1903 (("^set_default_rpath\\(\\)")
1904 ""))))
1905 (add-after 'unpack 'do-not-use-msgfmt--check
1906 (lambda _
1907 ;; msgfmt --check from gettext-0.23 fails on fr.po:
1908 ;; 'msgstr' is not a valid C format string
1909 (substitute* "po/CMakeLists.txt"
1910 ((" --check") ""))))
1911 #$@(if (target-hurd?)
1912 #~((add-after 'unpack 'apply-hurd-patch
1913 (lambda _
1914 (let ((patch-file
1915 #$(local-file
1916 (search-patch "fontforge-hurd.patch"))))
1917 (invoke "patch" "--force" "-p1" "-i" patch-file)))))
1918 #~())
1919 (add-after 'install 'set-library-path
1920 (lambda* (#:key inputs outputs #:allow-other-keys)
1921 (let ((out (assoc-ref outputs "out"))
1922 (potrace (dirname
1923 (search-input-file inputs "bin/potrace"))))
1924 (wrap-program (string-append out "/bin/fontforge")
1925 ;; Fontforge dynamically opens libraries.
1926 `("LD_LIBRARY_PATH" ":" prefix
1927 ,(map (lambda (input)
1928 (string-append (assoc-ref inputs input)
1929 "/lib"))
1930 '("libtiff" "libjpeg-turbo" "libpng" "libungif"
1931 "libxml2" "zlib" "libspiro" "freetype"
1932 "pango" "cairo" "fontconfig-minimal")))
1933 ;; Checks for potrace program at runtime
1934 `("PATH" ":" prefix (,potrace))))))))))
1935 (synopsis "Outline font editor")
1936 (description
1937 "FontForge allows you to create and modify postscript, truetype and
1938opentype fonts. You can save fonts in many different outline formats, and
1939generate bitmaps.")
1940 (license license:gpl3+)
1941 (home-page "https://fontforge.github.io")))
1942
1943(define-public python-statmake
1944 (package
1945 (name "python-statmake")
1946 (version "0.6.0")
1947 (source (origin
1948 (method git-fetch)
1949 (uri (git-reference
1950 (url "https://github.com/daltonmaag/statmake")
1951 (commit (string-append "v" version))))
1952 (file-name (git-file-name name version))
1953 (sha256
1954 (base32
1955 "1k6fkzyhsfkgi599sb017wzf4jzbnp5wjg1kla1b33vgjpa7n5nw"))))
1956 (build-system pyproject-build-system)
1957 (arguments
1958 (list
1959 #:test-flags
1960 ;; The code no longer raises <class 'ValueError'>
1961 '(list "-k" "not test_load_stylespace_broken_range")))
1962 (native-inputs
1963 (list python-poetry-core
1964 python-pytest
1965 python-ufo2ft))
1966 (propagated-inputs
1967 (list python-attrs
1968 python-cattrs
1969 python-fonttools))
1970 (home-page "https://github.com/daltonmaag/statmake")
1971 (synopsis "Apply OpenType STAT information to a variable font")
1972 (description
1973 "@command{statmake} takes a user-written Stylespace that defines
1974@url{https://docs.microsoft.com/en-us/typography/opentype/spec/stat, OpenType
1975STAT information} for an entire font family and then (potentially subsets and)
1976applies it to a specific variable font. This spares users from having to deal
1977with @url{https://github.com/fonttools/fonttools/, raw TTX dumps} and juggling
1978with @samp{nameIDs}.")
1979 (license license:expat)))
1980
1981(define-public python-ufolib2
1982 (package
1983 (name "python-ufolib2")
1984 (version "0.18.1")
1985 (source
1986 (origin
1987 (method url-fetch)
1988 (uri (pypi-uri "ufolib2" version))
1989 (sha256
1990 (base32 "1971ibdsgji8x0jzlk1hc6dv2r5wnfyylz7f6wjkymqw6v6fzq3x"))))
1991 (build-system pyproject-build-system)
1992 (native-inputs
1993 (list python-pytest
1994 python-setuptools
1995 python-setuptools-scm
1996 python-wheel))
1997 (propagated-inputs
1998 (list python-attrs
1999 python-fonttools))
2000 (home-page "https://github.com/fonttools/ufoLib2")
2001 (synopsis "Unified Font Object (UFO) font processing library")
2002 (description "The ufoLib2 Python library is meant to be a thin
2003representation of the Unified Font Object (UFO) version 3 data model, intended
2004for programmatic manipulation and fast batch processing of UFOs. It resembles
2005the defcon library, but does without notifications, the layout engine and
2006other support classes. Where useful and possible, ufoLib2 tries to be
2007API-compatible with defcon.")
2008 (license license:asl2.0)))
2009
2010;;; A variant used to break a cycle between python-fontpens and
2011;;; python-fontparts.
2012(define-public python-defcon-bootstrap
2013 (hidden-package
2014 (package
2015 (name "python-defcon-bootstrap")
2016 (version "0.12.2")
2017 (source
2018 (origin
2019 (method git-fetch)
2020 (uri (git-reference
2021 (url "https://github.com/robotools/defcon")
2022 (commit version)))
2023 (file-name (git-file-name name version))
2024 (sha256
2025 (base32 "1zx4xas6qcpp54d1vcfy5wjv17aazkpfmb7hkjy99g47xsi6crrh"))))
2026 (build-system pyproject-build-system)
2027 (propagated-inputs (list python-fontpens-bootstrap python-fonttools))
2028 (native-inputs
2029 (list python-pytest
2030 python-setuptools
2031 python-setuptools-scm))
2032 (home-page "https://github.com/robotools/defcon")
2033 (synopsis "Flexible objects for representing UFO data")
2034 (description
2035 "Defcon is a set of @acronym{UFO, unified font object} based
2036objects optimized for use in font editing applications. The objects are built
2037to be lightweight, fast and flexible. The objects are very bare-bones and
2038they are not meant to be end-all, be-all objects. Rather, they are meant to
2039provide base functionality so that you can focus on your application’s
2040behavior, not object observing or maintaining cached data. Defcon implements
2041UFO3 as described by the UFO font format.")
2042 (license license:expat))))
2043
2044(define-public python-defcon
2045 (package/inherit python-defcon-bootstrap
2046 (name "python-defcon")
2047 (propagated-inputs
2048 (modify-inputs propagated-inputs
2049 (replace "python-fontpens-bootstrap" python-fontpens)))
2050 (properties
2051 (alist-delete 'hidden?
2052 (package-properties python-fontparts-bootstrap)))))
2053
2054(define-public nototools
2055 (package
2056 (name "nototools")
2057 (version "0.3.2")
2058 (source
2059 (origin
2060 (method git-fetch)
2061 (uri (git-reference
2062 (url "https://github.com/googlefonts/nototools")
2063 (commit (string-append "v" version))))
2064 (file-name (git-file-name name version))
2065 (sha256
2066 (base32 "1sfsmfxcp4kdkra58z274w9cjgyim4by50nxdq60q3z1r5hv9iyj"))))
2067 (build-system pyproject-build-system)
2068 (arguments
2069 (list
2070 #:phases
2071 #~(modify-phases %standard-phases
2072 (replace 'check
2073 (lambda* (#:key tests? #:allow-other-keys)
2074 (with-directory-excursion "tests"
2075 (invoke "./run_tests")))))))
2076 (native-inputs (list python-setuptools-scm python-setuptools))
2077 (propagated-inputs (list python-afdko python-pillow))
2078 (home-page "https://github.com/googlei18n/nototools")
2079 (synopsis "Noto fonts support tools and scripts")
2080 (description
2081 "Nototools is a Python package containing Python scripts used to
2082maintain the Noto Fonts project.")
2083 (license (list license:asl2.0
2084 ;; Sample texts are attributed to UN and OHCHR.
2085 ;; The permissions on the UDHR are pretty lax:
2086 ;; http://www.ohchr.org/EN/UDHR/Pages/Introduction.aspx
2087 ;; "If UDHR translations or materials are reproduced, users
2088 ;; should make reference to this website as a source by
2089 ;; providing a link."
2090 license:public-domain
2091 (license:non-copyleft
2092 "file://sample_texts/attributions.txt"
2093 "See sample_texts/attributions.txt in the distribution.")))))
2094
2095(define-public fcft
2096 (package
2097 (name "fcft")
2098 (version "3.3.3")
2099 (home-page "https://codeberg.org/dnkl/fcft")
2100 (source (origin
2101 (method git-fetch)
2102 (uri (git-reference (url home-page) (commit version)))
2103 (file-name (git-file-name name version))
2104 (sha256
2105 (base32
2106 "0653l611lfkry6lcpbhvcpd9lsrv9ybfabxafpwa39jn3ykaah9j"))))
2107 (build-system meson-build-system)
2108 (native-inputs
2109 (list check pkg-config scdoc))
2110 (propagated-inputs
2111 (list ;; Required by fcft.pc.
2112 utf8proc
2113 fontconfig
2114 freetype
2115 harfbuzz
2116 pixman
2117 tllist))
2118 (synopsis "Font loading and glyph rasterization library")
2119 (description
2120 "@code{fcft} is a small font loading and glyph rasterization library
2121built on-top of FontConfig, FreeType2 and pixman.
2122
2123It can load and cache fonts from a fontconfig-formatted name string, e.g.
2124@code{Monospace:size=12}, optionally with user configured fallback fonts.
2125
2126After a font has been loaded, you can rasterize glyphs. When doing so, the
2127primary font is first considered. If it does not have the requested glyph,
2128the user configured fallback fonts (if any) are considered. If none of the
2129user configured fallback fonts has the requested glyph, the FontConfig
2130generated list of fallback fonts are checked.")
2131 ;; The code is distributed under the Expat license, but embeds Unicode
2132 ;; data files carrying the Unicode license.
2133 (license (list license:expat license:unicode))))
2134
2135(define-public fontmanager
2136 (package
2137 (name "fontmanager")
2138 (version "0.9.0")
2139 (source
2140 (origin
2141 (method git-fetch)
2142 (uri (git-reference
2143 (url "https://github.com/FontManager/font-manager")
2144 (commit version)))
2145 (file-name (git-file-name name version))
2146 (sha256
2147 (base32 "0pxdwpjzsmld4j2m4q423vdrkx23bb6jqszjgk5wqbr2ln772hcx"))))
2148 (build-system meson-build-system)
2149 (arguments
2150 (list #:glib-or-gtk? #t
2151 #:build-type "release"
2152 #:configure-flags
2153 #~(list (string-append "-Dc_link_args=-Wl,-rpath=" #$output
2154 "/lib/font-manager"))
2155 #:phases
2156 #~(modify-phases %standard-phases
2157 (add-after 'unpack 'skip-gtk-update-icon-cache
2158 (lambda _
2159 ;; Remove dependency on needless desktop cache stuff.
2160 (substitute* "meson.build"
2161 (("gtk_update_icon_cache: true")
2162 "gtk_update_icon_cache: false")
2163 (("update_desktop_database: true")
2164 "update_desktop_database: false")))))))
2165 (native-inputs
2166 (list desktop-file-utils
2167 gettext-minimal
2168 `(,glib "bin")
2169 gobject-introspection
2170 pkg-config
2171 python-wrapper
2172 vala
2173 yelp-tools))
2174 (inputs
2175 (list fontconfig
2176 freetype
2177 gsettings-desktop-schemas
2178 gtk
2179 json-glib
2180 libsoup
2181 sqlite
2182 webkitgtk))
2183 (home-page "https://fontmanager.github.io/")
2184 (synopsis "Simple font management for GTK desktop environments")
2185 (description "Font Manager is intended to provide a way for users to
2186easily manage desktop fonts, without having to resort to command-line
2187tools or editing configuration files by hand.
2188While designed primarily with the GNOME Desktop Environment in mind, it should
2189work well with other GTK desktop environments.")
2190 (license license:gpl3+)))
2191
2192(define-public fntsample
2193 (package
2194 (name "fntsample")
2195 (version "5.4")
2196 (source (origin
2197 (method git-fetch)
2198 (uri (git-reference
2199 (url "https://github.com/eugmes/fntsample")
2200 (commit (string-append "release/" version))))
2201 (file-name (git-file-name name version))
2202 (sha256
2203 (base32
2204 "0pcqqdriv6hq64zrqd9vhdd9p2vhimjnajcxdz10qnqgrkmm751v"))))
2205 (build-system cmake-build-system)
2206 (arguments
2207 `(#:tests? #f ; There are no tests.
2208 #:configure-flags
2209 (list (string-append
2210 "-DUNICODE_BLOCKS=" (assoc-ref %build-inputs "ucd")
2211 "/share/ucd/Blocks.txt"))
2212 #:phases
2213 (modify-phases %standard-phases
2214 (add-after 'install 'set-library-path
2215 (lambda* (#:key inputs outputs #:allow-other-keys)
2216 (let* ((out (assoc-ref outputs "out"))
2217 (pdf-api2 (assoc-ref inputs "perl-pdf-api2"))
2218 (intl (assoc-ref inputs "perl-libintl-perl"))
2219 (perllib (string-append pdf-api2
2220 "/lib/perl5/site_perl/"
2221 ,(package-version perl)
2222 ":" intl
2223 "/lib/perl5/site_perl/"
2224 ,(package-version perl))))
2225 (wrap-program (string-append out "/bin/pdfoutline")
2226 `("PERL5LIB" ":" prefix (,perllib)))))))))
2227 (native-inputs
2228 `(("pkg-config" ,pkg-config)
2229 ("gettext" ,gettext-minimal)))
2230 (inputs
2231 `(("cairo" ,cairo)
2232 ("bash-minimal" ,bash-minimal)
2233 ("fontconfig" ,fontconfig)
2234 ("freetype" ,freetype)
2235 ("glib" ,glib)
2236 ("pango" ,pango)
2237 ("perl" ,perl) ;needed for pdfoutline
2238 ("perl-pdf-api2" ,perl-pdf-api2)
2239 ("perl-libintl-perl" ,perl-libintl-perl)
2240 ("ucd" ,ucd)))
2241 (home-page "https://github.com/eugmes/fntsample")
2242 (synopsis "PDF and PostScript font samples generator")
2243 (description "This package provides a tool that can be used to make font
2244samples that show coverage of the font and are similar in appearance to
2245Unicode Charts. It was developed for use with DejaVu Fonts project.
2246
2247This package also includes the @command{pdfoutline} script, which can be used
2248to modify outlines (machine-readable tables of contents) in PDF files.")
2249 (license license:gpl3+)))
2250
2251(define-public libraqm
2252 (package
2253 (name "libraqm")
2254 (version "0.10.1")
2255 (source
2256 (origin
2257 (method git-fetch)
2258 (uri (git-reference
2259 (url "https://github.com/HOST-Oman/libraqm")
2260 (commit (string-append "v" version))))
2261 (file-name (git-file-name name version))
2262 (sha256
2263 (base32 "1bzdrvacgj9629r4mgmag9sm5ay5914fbs8pnxf8xphvrbnbxm8z"))))
2264 (build-system meson-build-system)
2265 (native-inputs
2266 (list gtk-doc/stable pkg-config python-wrapper))
2267 (inputs
2268 (list freetype fribidi harfbuzz))
2269 (home-page "https://github.com/HOST-Oman/libraqm")
2270 (synopsis "Library for complex text layout")
2271 (description
2272 "Raqm is a small library that encapsulates the logic for complex text
2273layout and provides a convenient API.
2274
2275It currently provides bidirectional text support (using FriBiDi),
2276shaping (using HarfBuzz), and proper script itemization. As a result, Raqm
2277can support most writing systems covered by Unicode.")
2278 (license license:expat)))
2279
2280
2281(define-public fontopia
2282 (package
2283 (name "fontopia")
2284 (version "2.0")
2285 (source (origin
2286 (method url-fetch)
2287 (uri (string-append "mirror://gnu/fontopia/fontopia-"
2288 version ".tar.gz"))
2289 (sha256
2290 (base32 "0wv7bd7gdm1ma4xgq9av73ic3xhpwyszj6g6c6311xjk26xm9ahd"))))
2291 (build-system gnu-build-system)
2292 (inputs
2293 (list gnudos))
2294 (home-page "https://www.gnu.org/software/fontopia/")
2295 (synopsis "Text-based, console font editor")
2296 (description
2297 "GNU fontopia is an easy-to-use, text-based, console font editor. You can
2298edit the fonts that your GNU/Linux kernel is using to display your text on text-
2299based (vs graphical) terminals.")
2300 (license license:gpl3+)))
2301
2302(define-public birdfont
2303 (package
2304 (name "birdfont")
2305 (version "2.33.6")
2306 (source (origin
2307 (method git-fetch)
2308 (uri (git-reference
2309 (url "https://github.com/johanmattssonm/birdfont")
2310 (commit (string-append "v" version))))
2311 (file-name (git-file-name name version))
2312 (sha256
2313 (base32
2314 "137qmfjdhs8m06j95iqcdv5hrpp2kf8p6l0sa0jr7vl7ziin65gg"))))
2315 (build-system gnu-build-system)
2316 (arguments (list
2317 #:tests? #f ; no tests
2318 #:phases
2319 #~(modify-phases %standard-phases
2320 (replace 'configure
2321 (lambda* (#:key outputs (configure-flags '()) #:allow-other-keys)
2322 (let ((out (assoc-ref outputs "out")))
2323 (apply system*
2324 "python3"
2325 "configure"
2326 ;; Required for RUNPATH validation.
2327 (string-append "--ldflags=-Wl,-rpath=" out "/lib")
2328 (string-append "--prefix=" out)
2329 configure-flags))))
2330 (replace 'build
2331 (lambda _ (system* "python3" "build.py")))
2332 (replace 'install
2333 (lambda _ (system* "python3" "install.py" "--libdir=/lib"))))))
2334 (inputs (list cairo
2335 gdk-pixbuf
2336 glib
2337 gtk+
2338 libgee
2339 libnotify
2340 libsoup
2341 sqlite
2342 webkitgtk-for-gtk3
2343 xmlbird))
2344 (native-inputs (list gettext-minimal
2345 pkg-config
2346 python-doit
2347 python-wrapper
2348 vala))
2349 (home-page "https://github.com/johanmattssonm/birdfont")
2350 (synopsis "Font editor for creating fonts in TTF, EOT, and SVG format")
2351 (description "Birdfont is a font editor which can create vector graphics and export
2352TTF, EOT, and SVG fonts. It includes a graphical as well as a commandline interface.")
2353 (license license:gpl3)))
2354
2355(define-public lcdf-typetools
2356 (package
2357 (name "lcdf-typetools")
2358 (version "2.108")
2359 (source (origin
2360 (method git-fetch)
2361 (uri (git-reference
2362 (url "https://github.com/kohler/lcdf-typetools")
2363 (commit (string-append "v" version))))
2364 (file-name (git-file-name name version))
2365 (sha256
2366 (base32
2367 "0a6jqaqwq43ldjjjlnsh6mczs2la9363qav7v9fyrfzkfj8kw9ad"))))
2368 (build-system gnu-build-system)
2369 (arguments
2370 `(#:configure-flags
2371 ;; This is only provided by the monolithic texlive distribution.
2372 ;; FIXME: texlive-kpathsea doesn't come with the library and headers
2373 (list "--without-kpathsea")))
2374 (native-inputs
2375 (list autoconf automake))
2376 (home-page "https://lcdf.org/type/")
2377 (synopsis "Multiple font manipulation tools")
2378 (description "LCDF Typetools comprises several programs for manipulating
2379PostScript Type 1, Type 1 Multiple Master, OpenType, and TrueType fonts.
2380These tools are cfftot1, mmafm, mmpfb, otfinfo, otftotfm, t1dotlessj, t1lint,
2381t1rawfm, t1reencode, t1testpage and ttftotype42.")
2382 (license license:gpl2+)))
2383
2384(define-public bdf2sfd
2385 (package
2386 (name "bdf2sfd")
2387 (version "1.1.8")
2388 (source (origin
2389 (method git-fetch)
2390 (uri (git-reference
2391 (url "https://github.com/fcambus/bdf2sfd")
2392 (commit "1.1.8")))
2393 (file-name (git-file-name name version))
2394 (sha256
2395 (base32
2396 "0pa92gjiijp9xqnw9dcvz24s6qk11a4lp5q6s5psd6mpkhpd88zq"))))
2397 (build-system cmake-build-system)
2398 (home-page "https://github.com/fcambus/bdf2sfd")
2399 (synopsis "BDF to SFD converter, allowing to vectorize bitmap fonts")
2400 (description
2401 "bdf2sfd is a
2402@uref{https://en.wikipedia.org/wiki/Glyph_Bitmap_Distribution_Format,
2403BDF} to @uref{https://fontforge.org/docs/techref/sfdformat.html, SFD}
2404converter, allowing to vectorize bitmap fonts. It works by converting
2405each pixel of a glyph to a polygon, which produces large and
2406unoptimized SFD files that should be post-processed using
2407@uref{https://fontforge.org, FontForge}.")
2408 (license license:bsd-2)))
2409
2410(define-public xmbdfed
2411 (package
2412 (name "xmbdfed")
2413 (version "4.7.4")
2414 (source (origin
2415 (method git-fetch)
2416 (uri (git-reference
2417 (url "https://codeberg.org/drj/xmbdfed")
2418 (commit (string-append name "-" version))))
2419 (file-name (git-file-name name version))
2420 (sha256
2421 (base32
2422 "1zl8zsh7jq3719bail9j9ih8hc9z2khg47yk3sag6r84xdpnlp48"))))
2423 (build-system gnu-build-system)
2424 (arguments
2425 (list
2426 #:tests? #f ; no tests
2427 #:make-flags
2428 #~(list "CDEBUGFLAGS=-O2"
2429 (string-append "BINDIR=" #$output "/bin")
2430 (string-append
2431 "FREETYPE2INCLUDES=-I"
2432 (search-input-directory %build-inputs "include/freetype2")))
2433 #:phases
2434 #~(modify-phases %standard-phases
2435 (replace 'configure
2436 (lambda _
2437 (invoke "xmkmf")))
2438 (add-after 'install 'install-man-page
2439 (lambda _
2440 (let ((mandir (string-append #$output "/share/man/man1")))
2441 (mkdir-p mandir)
2442 (copy-file "xmbdfed.man"
2443 (string-append mandir "/xmbdfed.1"))))))))
2444 (native-inputs
2445 (list imake))
2446 (inputs
2447 (list libxmu motif))
2448 (home-page "https://codeberg.org/drj/xmbdfed")
2449 (synopsis "Motif-based BDF font editor")
2450 (description
2451 "XmBDFEditor is a Motif-based BDF font editor, with it you can create new
2452bitmap font files or modify existing ones.")
2453 (license license:expat)))