gnu: webkitgtk: Update to 2.28.2.
[jackhill/guix/guix.git] / gnu / packages / fontutils.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
7 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2017 ng0 <ng0@n0.is>
9 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
12 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
13 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
14 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;;
16 ;;; This file is part of GNU Guix.
17 ;;;
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
22 ;;;
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
27 ;;;
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31 (define-module (gnu packages fontutils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages gettext)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages python-xyz)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gperf)
48 #:use-module (gnu packages xorg)
49 #:use-module (gnu packages fribidi)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages xml)
52 #:use-module (gnu packages sqlite)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages freedesktop)
55 #:use-module ((guix licenses) #:prefix license:)
56 #:use-module (guix packages)
57 #:use-module (guix download)
58 #:use-module (guix svn-download)
59 #:use-module (guix git-download)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system gnu)
62 #:use-module (guix build-system python)
63 #:use-module (guix build-system meson))
64
65 (define-public freetype
66 (package
67 (name "freetype")
68 (version "2.10.1")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append "mirror://savannah/freetype/freetype-"
72 version ".tar.xz"))
73 (sha256 (base32
74 "0vx2dg1jh5kq34dd6ifpjywkpapp8a7p1bvyq9yq5zi1i94gmnqn"))))
75 (build-system gnu-build-system)
76 (arguments
77 ;; The use of "freetype-config" is deprecated, but other packages still
78 ;; depend on it.
79 `(#:configure-flags (list "--enable-freetype-config")))
80 (native-inputs
81 `(("pkg-config" ,pkg-config)))
82 (propagated-inputs
83 ;; These are all in the Requires.private field of freetype2.pc.
84 ;; XXX: add harfbuzz.
85 `(("libpng" ,libpng)
86 ("zlib" ,zlib)))
87 (synopsis "Font rendering library")
88 (description
89 "Freetype is a library that can be used by applications to access the
90 contents of font files. It provides a uniform interface to access font files.
91 It supports both bitmap and scalable formats, including TrueType, OpenType,
92 Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
93 anti-aliased glyph bitmap generation with 256 gray levels.")
94 (license license:freetype) ; some files have other licenses
95 (home-page "https://www.freetype.org/")))
96
97 (define-public ttfautohint
98 (package
99 (name "ttfautohint")
100 (version "1.5")
101 (source
102 (origin
103 (method url-fetch)
104 (uri (string-append "mirror://savannah/freetype/ttfautohint-"
105 version ".tar.gz"))
106 (sha256
107 (base32
108 "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
109 (patches (list (search-patch "ttfautohint-source-date-epoch.patch")))))
110 (build-system gnu-build-system)
111 (native-inputs
112 `(("flex" ,flex)
113 ("bison" ,bison)
114 ("pkg-config" ,pkg-config)))
115 (inputs
116 `(("freetype" ,freetype)
117 ("harfbuzz" ,harfbuzz)))
118 (arguments
119 `(#:configure-flags '("--with-qt=no"))) ;no gui
120 (synopsis "Automated font hinting")
121 (description
122 "ttfautohint provides a 99% automated hinting process and a platform for
123 finely hand-hinting the last 1%. It is ideal for web fonts and supports many
124 scripts.")
125 (license (list license:gpl2+ license:freetype)) ;choose one or the other
126 (home-page "https://www.freetype.org/ttfautohint/")))
127
128 (define-public woff-tools
129 (package
130 (name "woff-tools")
131 (version "2009.10.04")
132 (source
133 (origin
134 (method url-fetch)
135 ;; Upstream source is unversioned, so use Debian's versioned tarball
136 (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
137 "woff-tools_" version ".orig.tar.gz"))
138 (file-name (string-append name "-" version ".tar.gz"))
139 (sha256
140 (base32
141 "1i97gkqa6jfzlslsngqf556kx60knlgf7yc9pzsq2pizc6f0d4zl"))))
142 (build-system gnu-build-system)
143 (inputs
144 `(("zlib" ,zlib)))
145 (arguments
146 `(#:make-flags '("CC=gcc")
147 #:tests? #f ;no tests
148 #:phases
149 (modify-phases %standard-phases
150 (delete 'configure) ;no configuration
151 (replace 'install
152 (lambda* (#:key outputs #:allow-other-keys)
153 (let* ((out (assoc-ref outputs "out"))
154 (bin (string-append out "/bin")))
155 (install-file "sfnt2woff" bin)
156 (install-file "woff2sfnt" bin)))))))
157 (synopsis "Convert between OpenType and WOFF fonts")
158 (description
159 "This package provides two tools:
160 @table @code
161 @item sfnt2woff
162 Converts OpenType fonts to WOFF fonts
163 @item woff2sfnt
164 Converts WOFF fonts to OpenType fonts
165 @end table")
166 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
167 (home-page "https://people.mozilla.com/~jkew/woff/")))
168
169 (define-public ttf2eot
170 (package
171 (name "ttf2eot")
172 (version "0.0.3")
173 (source
174 (origin
175 (method git-fetch)
176 (uri (git-reference
177 (url "https://github.com/wget/ttf2eot.git")
178 (commit (string-append "v" version))))
179 (file-name (git-file-name name version))
180 (sha256
181 (base32
182 "0l2yh2ialx7135pjzhjs204kk3br7zxjr09zwaia493by2adzigr"))
183 (patches (list (search-patch "ttf2eot-cstddef.patch")))))
184 (build-system gnu-build-system)
185 (arguments
186 `(#:tests? #f ; no tests
187 #:phases
188 (modify-phases %standard-phases
189 (delete 'configure) ; no configuration
190 (replace 'install ; no install target
191 (lambda* (#:key outputs #:allow-other-keys)
192 (let* ((out (assoc-ref outputs "out"))
193 (bin (string-append out "/bin")))
194 (install-file "ttf2eot" bin)
195 #t))))))
196 (synopsis "Convert from TrueType to Embeddable Open Type")
197 (description
198 "This package contains a commandline wrapper around OpenTypeUtilities.cpp
199 from Chromium, used to make EOT (Embeddable Open Type) files from
200 TTF (TrueType/OpenType Font) files.")
201 ;; While the README states "License: Derived from WebKit, so BSD/LGPL
202 ;; 2/LGPL 2.1", the single derived source file includes only BSD in its
203 ;; license header, and the wrapper source contains no license header.
204 (license license:bsd-2)
205 (home-page "https://github.com/wget/ttf2eot")))
206
207 (define-public ttf2pt1
208 (package
209 (name "ttf2pt1")
210 (version "3.4.4")
211 (source (origin
212 (method url-fetch)
213 (uri (string-append "mirror://sourceforge/ttf2pt1/ttf2pt1/"
214 version "/ttf2pt1-" version ".tgz"))
215 (sha256
216 (base32
217 "1l718n4k4widx49xz7qrj4mybzb8q67kp2jw7f47604ips4654mf"))
218 (modules '((guix build utils)))
219 (snippet
220 '(begin
221 ;; Remove trailing backslashes in the sed expression of the
222 ;; 'install' rule since sed would otherwise fail.
223 (substitute* "Makefile"
224 (("\\|;\\\\[[:space:]]*$") "|; "))
225 #t))))
226 (build-system gnu-build-system)
227 (arguments
228 '(#:tests? #f ;no tests
229 #:phases (modify-phases %standard-phases
230 (replace 'configure
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (substitute* "Makefile"
234 (("INSTDIR =.*")
235 (string-append "INSTDIR = " out "\n"))
236 (("OWNER = .*")
237 "OWNER = `id -un`\n")
238 (("GROUP = .*")
239 "GROUP = `id -g`\n"))
240 #t)))
241 (replace 'build
242 (lambda _
243 (invoke "make" "-j"
244 (number->string (parallel-job-count))
245 "all" "CC=gcc"))))))
246 (inputs `(("perl" ,perl)))
247 (synopsis "Convert TrueType fonts to Postscript Type 1")
248 (description
249 "TTF2PT1 provides tools to convert most TrueType fonts (or other formats
250 supported by the FreeType library) to an Adobe Type 1 @file{.pfa} or
251 @file{.pfb} file. Another use is as a hinting engine: feed it an unhinted or
252 poorly hinted Adobe Type 1 font through the FreeType library and get it back
253 with freshly generated hints. The files produced by default are in
254 human-readable form, which further needs to be encoded with t1utilities to
255 work with most software requiring Type 1 fonts.")
256 (home-page "http://ttf2pt1.sourceforge.net/")
257 (license license:bsd-3)))
258
259 (define-public woff2
260 (package
261 (name "woff2")
262 (version "1.0.2")
263 (source (origin
264 (method git-fetch)
265 (uri (git-reference
266 (url "https://github.com/google/woff2.git")
267 (commit (string-append "v" version))))
268 (file-name (string-append name "-" version ".git"))
269 (sha256
270 (base32
271 "13l4g536h0pr84ww4wxs2za439s0xp1va55g6l478rfbb1spp44y"))))
272 (build-system cmake-build-system)
273 (native-inputs
274 `(("pkg-config" ,pkg-config)))
275 (inputs
276 `(("google-brotli" ,google-brotli)))
277 (arguments
278 ;; package has no tests
279 `(#:tests? #f
280 ;; we can’t have both, shared libraries and binaries, so turn off the
281 ;; former
282 #:configure-flags (list "-DBUILD_SHARED_LIBS=OFF")))
283 (synopsis "Compress TrueType fonts to WOFF2")
284 (description
285 "This package provides utilities for compressing/decompressing TrueType
286 fonts to/from the WOFF2 format.")
287 (license license:asl2.0)
288 (home-page "https://github.com/google/woff2")))
289
290 (define-public fontconfig
291 (package
292 (name "fontconfig")
293 (version "2.13.1")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append
297 "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
298 version ".tar.bz2"))
299 (sha256 (base32
300 "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
301 (build-system gnu-build-system)
302 ;; In Requires or Requires.private of fontconfig.pc.
303 (propagated-inputs `(("expat" ,expat)
304 ("freetype" ,freetype)
305 ("libuuid" ,util-linux)))
306 (inputs `(("gs-fonts" ,gs-fonts)))
307 (native-inputs
308 `(("gperf" ,gperf)
309 ("pkg-config" ,pkg-config)))
310 (arguments
311 `(#:configure-flags
312 (list "--with-cache-dir=/var/cache/fontconfig"
313 ;; register gs-fonts as default fonts
314 (string-append "--with-default-fonts="
315 (assoc-ref %build-inputs "gs-fonts")
316 "/share/fonts")
317
318 ;; Register fonts from user and system profiles.
319 (string-append "--with-add-fonts="
320 "~/.guix-profile/share/fonts,"
321 "/run/current-system/profile/share/fonts")
322
323 ;; python is not actually needed
324 "PYTHON=false")
325 #:phases
326 (modify-phases %standard-phases
327 (replace 'install
328 (lambda _
329 ;; Don't try to create /var/cache/fontconfig.
330 (invoke "make" "install"
331 "fc_cachedir=$(TMPDIR)"
332 "RUN_FC_CACHE_TEST=false"))))))
333 (synopsis "Library for configuring and customizing font access")
334 (description
335 "Fontconfig can discover new fonts when installed automatically;
336 perform font name substitution, so that appropriate alternative fonts can
337 be selected if fonts are missing;
338 identify the set of fonts required to completely cover a set of languages;
339 have GUI configuration tools built as it uses an XML-based configuration file;
340 efficiently and quickly find needed fonts among the set of installed fonts;
341 be used in concert with the X Render Extension and FreeType to implement
342 high quality, anti-aliased and subpixel rendered text on a display.")
343 ; The exact license is more X11-style than BSD-style.
344 (license (license:non-copyleft "file://COPYING"
345 "See COPYING in the distribution."))
346 (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))
347
348 (define-public t1lib
349 (package
350 (name "t1lib")
351 (version "5.1.2")
352 (source (origin
353 (method url-fetch)
354 (uri (list (string-append "ftp://sunsite.unc.edu/pub/Linux/libs/"
355 "graphics/" name "-" version ".tar.gz")
356 (string-append "https://fossies.org/linux/misc/old/"
357 name "-" version ".tar.gz")))
358 (sha256 (base32
359 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))
360 (patches (search-patches
361 "t1lib-CVE-2010-2642.patch" ; 2011-0443, 2011-5244
362 "t1lib-CVE-2011-0764.patch"
363 "t1lib-CVE-2011-1552+.patch")))) ; 2011-1553, 2011-1554
364 (properties `((lint-hidden-cve . ("CVE-2011-0433"
365 "CVE-2011-1553"
366 "CVE-2011-1554"
367 "CVE-2011-5244"))))
368 (build-system gnu-build-system)
369 (arguments
370 ;; Making the documentation requires latex, but t1lib is also an input
371 ;; for building texlive.
372 `(#:tests? #f ; no test target
373 #:make-flags
374 '("without_doc")))
375 (synopsis "Library for generating bitmaps from Type 1 fonts")
376 (description
377 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
378 It is based on the code of the X11 rasteriser of the X11 project.
379
380 The bitmaps created by t1lib are returned in a data structure with type
381 GLYPH. This special GLYPH-type is also used in the X11 window system to
382 describe character bitmaps. It contains the bitmap data as well as some
383 metric information. But t1lib is in itself entirely independent of the
384 X11-system or any other graphical user interface.")
385 (license license:gpl2)
386 (home-page "https://www.t1lib.org/")))
387
388 (define-public teckit
389 (package
390 (name "teckit")
391 (version "2.5.9") ;signed by key 0xC9183BEA0288CDEE
392 (source
393 (origin
394 (method url-fetch)
395 (uri (string-append "https://github.com/silnrsi/teckit/releases/"
396 "download/v" version "/teckit-" version ".tar.gz"))
397 (sha256
398 (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8"))))
399 (build-system gnu-build-system)
400 (inputs
401 `(("zlib" ,zlib)
402 ("expat" ,expat)))
403 (native-inputs
404 `(("perl" ,perl))) ;for the tests
405 (synopsis "Toolkit for encoding conversions")
406 (description
407 "TECkit is a low-level toolkit intended to be used by other applications
408 that need to perform encoding conversions (e.g., when importing legacy data
409 into a Unicode-based application). The primary component of the TECkit
410 package is therefore a library that performs conversions; this is the
411 \"TECkit engine\". The engine relies on mapping tables in a specific binary
412 format (for which documentation is available); there is a compiler that
413 creates such tables from a human-readable mapping description (a simple
414 text file).
415
416 To facilitate the development and testing of mapping tables for TECkit,
417 several applications are also included in the current package; these
418 include simple tools for applying conversions to plain-text and Standard
419 Format files, as well as both command-line and simple GUI versions of the
420 TECkit compiler. However, it is not intended that these tools will be the
421 primary means by which end users perform conversions, and they have not
422 been designed, tested, and debugged to the extent that general-purpose
423 applications should be.")
424 (license license:lgpl2.1+)
425 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
426
427 (define-public graphite2
428 (package
429 (name "graphite2")
430 (version "1.3.13")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
435 "download/" version "/" name "-" version ".tgz"))
436 (sha256
437 (base32
438 "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
439 (build-system cmake-build-system)
440 (arguments
441 `(#:phases (modify-phases %standard-phases
442 (add-after 'unpack 'adjust-test-PYTHONPATH
443 (lambda _
444 ;; Tell the build system not to override PYTHONPATH
445 ;; while running the Python tests.
446 (substitute* "Graphite.cmake"
447 (("ENVIRONMENT PYTHONPATH=")
448 (string-append "ENVIRONMENT PYTHONPATH="
449 (getenv "PYTHONPATH") ":")))
450 #t)))))
451 (native-inputs
452 `(("python" ,python)
453 ("python-fonttools" ,python-fonttools)))
454 (inputs
455 `(("freetype" ,freetype)))
456 (synopsis "Reimplementation of the SIL Graphite text processing engine")
457 (description
458 "Graphite2 is a reimplementation of the SIL Graphite text processing
459 engine. Graphite is a smart font technology designed to facilitate the
460 process known as shaping. This process takes an input Unicode text string
461 and returns a sequence of positioned glyphids from the font.")
462 (license license:lgpl2.1+)
463 (home-page "https://github.com/silnrsi/graphite")))
464
465 (define-public potrace
466 (package
467 (name "potrace")
468 (version "1.15")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (string-append "mirror://sourceforge/potrace/" version
473 "/potrace-" version ".tar.gz"))
474 (sha256
475 (base32
476 "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))
477 (patches (search-patches "potrace-tests.patch"))))
478 (build-system gnu-build-system)
479 (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
480 (inputs `(("zlib" ,zlib)))
481 (arguments
482 `(#:configure-flags
483 `("--with-libpotrace"))) ; install library and headers
484 (synopsis "Transform bitmaps into vector graphics")
485 (description
486 "Potrace is a tool for tracing a bitmap, which means, transforming a
487 bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
488 or BMP format), and the default output is an encapsulated PostScript
489 file (EPS). A typical use is to create EPS files from scanned data, such as
490 company or university logos, handwritten notes, etc. The resulting image is
491 not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
492 resolution.")
493 (license license:gpl2+)
494 (home-page "http://potrace.sourceforge.net/")))
495
496 (define-public libotf
497 (package
498 (name "libotf")
499 (version "0.9.16")
500 (source (origin
501 (method url-fetch)
502 (uri (string-append "mirror://savannah/m17n/libotf-"
503 version ".tar.gz"))
504 (sha256
505 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
506 (build-system gnu-build-system)
507 (native-inputs
508 `(("pkg-config" ,pkg-config)))
509 (propagated-inputs
510 `(("freetype" ,freetype)))
511 (home-page "https://www.nongnu.org/m17n/")
512 (synopsis "Library for handling OpenType Font")
513 (description "This library can read Open Type Layout Tables from an OTF
514 file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
515 GPOS. It can convert a Unicode character sequence to a glyph code sequence by
516 using the above tables.")
517 (license license:lgpl2.0+)))
518
519 (define-public libspiro
520 (package
521 (name "libspiro")
522 (version "0.5.20150702")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (string-append "https://github.com/fontforge/libspiro/releases"
527 "/download/" version "/libspiro-dist-" version ".tar.gz"))
528 (sha256
529 (base32
530 "153ckwj6h3wwlsgcppzqj8cymv1927hi8ar8fzpchq5q89cj2kai"))))
531 (build-system gnu-build-system)
532 (synopsis "Clothoid to bezier conversion library")
533 (description
534 "Raph Levien's Spiro package as a library. A mechanism for drawing
535 smooth contours with constant curvature at the spline joins.")
536 (license license:gpl2+)
537 (home-page "http://libspiro.sourceforge.net/")))
538
539 (define-public libuninameslist
540 (package
541 (name "libuninameslist")
542 (version "20190701")
543 (home-page "https://github.com/fontforge/libuninameslist")
544 (source
545 (origin
546 (method url-fetch)
547 (uri (string-append home-page "/releases/download/" version
548 "/libuninameslist-dist-" version ".tar.gz"))
549 (sha256
550 (base32
551 "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn"))))
552 (build-system gnu-build-system)
553 (synopsis "Unicode names and annotation list")
554 (description
555 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
556 useful for programs that need Unicode \"Names\", \"Annotations\", and block
557 definitions.")
558 ;; COPYING specifies GPL2, but according to LICENSE it only covers the
559 ;; configure script. The actual code is BSD-3, and the Unicode data
560 ;; is governed by an X11-style license only found on the web.
561 (license (list license:bsd-3
562 (license:x11-style
563 "https://www.unicode.org/copyright.html#License")))))
564
565 (define-public fontforge
566 (package
567 (name "fontforge")
568 (version "20190801")
569 (source (origin
570 (method url-fetch)
571 (uri (string-append
572 "https://github.com/fontforge/fontforge/releases/download/"
573 version "/fontforge-" version ".tar.gz"))
574 (sha256
575 (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"))))
576 (build-system gnu-build-system)
577 (native-inputs
578 `(("pkg-config" ,pkg-config)))
579 (inputs `(("cairo" ,cairo)
580 ("fontconfig" ,fontconfig) ;dlopen'd
581 ("freetype" ,freetype)
582 ("gettext" ,gettext-minimal)
583 ("libICE" ,libice)
584 ("libSM" ,libsm)
585 ("libX11" ,libx11)
586 ("libXi" ,libxi)
587 ("libjpeg" ,libjpeg)
588 ("libltdl" ,libltdl)
589 ("libpng" ,libpng)
590 ("libspiro" ,libspiro)
591 ("libtiff" ,libtiff)
592 ("libungif" ,libungif)
593 ("libuninameslist" ,libuninameslist)
594 ("libxft" ,libxft)
595 ("libxml2" ,libxml2)
596 ("pango" ,pango)
597 ("potrace" ,potrace)
598 ("python" ,python)
599 ("zlib" ,zlib)))
600 (arguments
601 '(#:phases
602 (modify-phases %standard-phases
603 (add-after 'install 'set-library-path
604 (lambda* (#:key inputs outputs #:allow-other-keys)
605 (let ((out (assoc-ref outputs "out"))
606 (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
607 (wrap-program (string-append out "/bin/fontforge")
608 ;; Fontforge dynamically opens libraries.
609 `("LD_LIBRARY_PATH" ":" prefix
610 ,(map (lambda (input)
611 (string-append (assoc-ref inputs input)
612 "/lib"))
613 '("libtiff" "libjpeg" "libpng" "libungif"
614 "libxml2" "zlib" "libspiro" "freetype"
615 "pango" "cairo" "fontconfig")))
616 ;; Checks for potrace program at runtime
617 `("PATH" ":" prefix (,potrace)))
618 #t))))))
619 (synopsis "Outline font editor")
620 (description
621 "FontForge allows you to create and modify postscript, truetype and
622 opentype fonts. You can save fonts in many different outline formats, and
623 generate bitmaps.")
624 (license license:gpl3+)
625 (home-page "https://fontforge.github.io")))
626
627 (define-public python2-ufolib
628 (package
629 (name "python2-ufolib")
630 (version "2.1.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "ufoLib" version ".zip"))
635 (sha256
636 (base32 "07qy6mx7z0wi9a30lc2hj5i9q1gnz1n8l40dmjz2c19mj9s6mz9l"))))
637 (build-system python-build-system)
638 (arguments
639 `(#:python ,python-2))
640 (propagated-inputs
641 `(("python2-fonttools" ,python2-fonttools)))
642 (native-inputs
643 `(("unzip" ,unzip)
644 ("python2-pytest" ,python2-pytest)
645 ("python2-pytest-runner" ,python2-pytest-runner)))
646 (home-page "https://github.com/unified-font-object/ufoLib")
647 (synopsis "Low-level UFO reader and writer")
648 (description
649 "UfoLib reads and writes Unified Font Object (UFO)
650 files. UFO is a file format that stores fonts source files.")
651 (license license:bsd-3)))
652
653 (define-public python2-defcon
654 (package
655 (name "python2-defcon")
656 (version "0.3.5")
657 (source
658 (origin
659 (method url-fetch)
660 (uri (pypi-uri "defcon" version ".zip"))
661 (sha256
662 (base32
663 "03jlm2gy9lvbwj68kfdm43yaddwd634jwkdg4wf0jxx2s8mwbg22"))))
664 (build-system python-build-system)
665 (arguments
666 `(#:python ,python-2))
667 (native-inputs
668 `(("unzip" ,unzip)
669 ("python2-pytest" ,python2-pytest)
670 ("python2-pytest-runner" ,python2-pytest-runner)))
671 (propagated-inputs
672 `(("python2-fonttools" ,python2-fonttools)
673 ("python2-ufolib" ,python2-ufolib)))
674 (home-page "https://pypi.org/project/defcon/")
675 (synopsis "Flexible objects for representing @acronym{UFO, unified font object} data")
676 (description
677 "Defcon is a set of @acronym{UFO, unified font object} based objects
678 optimized for use in font editing applications. The objects are built to
679 be lightweight, fast and flexible. The objects are very bare-bones and
680 they are not meant to be end-all, be-all objects. Rather, they are meant
681 to provide base functionality so that you can focus on your application’s
682 behavior, not object observing or maintaining cached data. Defcon
683 implements UFO3 as described by the UFO font format.")
684 (license license:expat)))
685
686 (define-public nototools
687 (package
688 (name "nototools")
689 (version "20170925")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (string-append "https://github.com/googlei18n/nototools/"
694 "archive/v2017-09-25-tooling-for-phase3-"
695 "update.tar.gz"))
696 (file-name (string-append name "-" version ".tar.gz"))
697 (sha256
698 (base32
699 "1pvacw18cm9l4sb66pqyjc7hc74xhhfxc7kd5ald8lixf4wzg0s8"))))
700 (build-system python-build-system)
701 (arguments
702 `(#:python ,python-2))
703 (propagated-inputs
704 `(("python2-booleanoperations" ,python2-booleanoperations)
705 ("python2-defcon" ,python2-defcon)
706 ("python2-fonttools" ,python2-fonttools)
707 ("python2-pillow" ,python2-pillow)
708 ("python2-pyclipper" ,python2-pyclipper)
709 ("python2-ufolib" ,python2-ufolib)))
710 (home-page "https://github.com/googlei18n/nototools")
711 (synopsis "Noto fonts support tools and scripts")
712 (description
713 "Nototools is a Python package containing Python scripts used to
714 maintain the Noto Fonts project.")
715 (license (list license:asl2.0
716 ;; Sample texts are attributed to UN and OHCHR.
717 ;; The permissions on the UDHR are pretty lax:
718 ;; http://www.ohchr.org/EN/UDHR/Pages/Introduction.aspx
719 ;; "If UDHR translations or materials are reproduced, users
720 ;; should make reference to this website as a source by
721 ;; providing a link."
722 license:public-domain
723 (license:non-copyleft
724 "file://sample_texts/attributions.txt"
725 "See sample_texts/attributions.txt in the distribution.")))))
726
727 (define-public fontmanager
728 (package
729 (name "fontmanager")
730 (version "0.7.5")
731 (source
732 (origin
733 (method git-fetch)
734 (uri (git-reference
735 (url "https://github.com/FontManager/font-manager")
736 (commit version)))
737 (file-name (git-file-name name version))
738 (sha256
739 (base32
740 "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g"))))
741 (build-system meson-build-system)
742 (arguments
743 `(#:glib-or-gtk? #t
744 #:build-type "release"
745 #:configure-flags
746 (list (string-append "-Dc_link_args=-Wl,-rpath="
747 (assoc-ref %outputs "out")
748 "/lib/font-manager"))))
749 (native-inputs
750 `(("pkg-config" ,pkg-config)
751 ("vala" ,vala)
752 ("yelp-tools" ,yelp-tools)
753 ("gettext" ,gettext-minimal)
754 ("glib" ,glib "bin")
755 ("gobject-introspection" ,gobject-introspection)
756 ("desktop-file-utils" ,desktop-file-utils)))
757 (inputs
758 `(("json-glib" ,json-glib)
759 ("sqlite-with-column-metadata" ,sqlite-with-column-metadata)
760 ("fonconfig" ,fontconfig)
761 ("freetype" ,freetype)
762 ("gtk+" ,gtk+)))
763 (home-page "https://fontmanager.github.io/")
764 (synopsis "Simple font management for GTK+ desktop environments")
765 (description "Font Manager is intended to provide a way for users to
766 easily manage desktop fonts, without having to resort to command-line
767 tools or editing configuration files by hand.
768 While designed primarily with the GNOME Desktop Environment in mind, it should
769 work well with other GTK+ desktop environments.")
770 (license license:gpl3+)))
771
772 (define-public fntsample
773 (package
774 (name "fntsample")
775 (version "5.3")
776 (source (origin
777 (method url-fetch)
778 (uri (string-append
779 "https://github.com/eugmes/fntsample/archive/release/"
780 version ".tar.gz"))
781 (file-name (string-append name "-" version ".tar.gz"))
782 (sha256
783 (base32
784 "0awp4dh1g40ivzvm5xqlvcpcdw1vplrx3drjmbylr62y185vbs74"))))
785 (build-system cmake-build-system)
786 (arguments
787 `(#:tests? #f ; There are no tests.
788 #:configure-flags
789 (list (string-append
790 "-DUNICODE_BLOCKS=" (assoc-ref %build-inputs "unicode-blocks")))
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'install 'set-library-path
794 (lambda* (#:key inputs outputs #:allow-other-keys)
795 (let* ((out (assoc-ref outputs "out"))
796 (pdf-api2 (assoc-ref inputs "perl-pdf-api2"))
797 (intl (assoc-ref inputs "perl-libintl-perl"))
798 (perllib (string-append pdf-api2
799 "/lib/perl5/site_perl/"
800 ,(package-version perl)
801 ":" intl
802 "/lib/perl5/site_perl/"
803 ,(package-version perl))))
804 (wrap-program (string-append out "/bin/pdfoutline")
805 `("PERL5LIB" ":" prefix (,perllib)))
806 #t))))))
807 (native-inputs
808 `(("pkg-config" ,pkg-config)
809 ("gettext" ,gettext-minimal)))
810 (inputs
811 `(("cairo" ,cairo)
812 ("fontconfig" ,fontconfig)
813 ("freetype" ,freetype)
814 ("glib" ,glib)
815 ("pango" ,pango)
816 ("perl-pdf-api2" ,perl-pdf-api2)
817 ("perl-libintl-perl" ,perl-libintl-perl)
818 ("unicode-blocks"
819 ,(origin
820 (method url-fetch)
821 (uri "https://unicode.org/Public/UNIDATA/Blocks.txt")
822 (file-name "unicode-blocks.txt")
823 (sha256
824 (base32
825 "1xs8fnhh48gs41wg004r7m4r2azh9khmyjjlnvyzy9c6zrd212x2"))))))
826 (home-page "https://github.com/eugmes/fntsample")
827 (synopsis "PDF and PostScript font samples generator")
828 (description "This package provides a tool that can be used to make font
829 samples that show coverage of the font and are similar in appearance to
830 Unicode Charts. It was developed for use with DejaVu Fonts project.")
831 (license license:gpl3+)))
832
833 (define-public libraqm
834 (package
835 (name "libraqm")
836 (version "0.7.0")
837 (source
838 (origin
839 (method url-fetch)
840 (uri (string-append "https://github.com/HOST-Oman/libraqm/"
841 "releases/download/v" version "/"
842 "raqm-" version ".tar.gz"))
843 (sha256
844 (base32 "0hgry3fj2y3qaq2fnmdgd93ixkk3ns5jds4vglkiv2jfvpn7b1g2"))))
845 (build-system gnu-build-system)
846 (arguments
847 `(#:configure-flags (list "--disable-static")))
848 (native-inputs
849 `(("gtk-doc" ,gtk-doc)
850 ("pkg-config" ,pkg-config)
851 ("python" ,python-wrapper)))
852 (inputs
853 `(("freetype" ,freetype)
854 ("fribidi" ,fribidi)
855 ("harfbuzz" ,harfbuzz)))
856 (home-page "https://github.com/HOST-Oman/libraqm")
857 (synopsis "Library for complex text layout")
858 (description
859 "Raqm is a small library that encapsulates the logic for complex text
860 layout and provides a convenient API.
861
862 It currently provides bidirectional text support (using FriBiDi),
863 shaping (using HarfBuzz), and proper script itemization. As a result, Raqm
864 can support most writing systems covered by Unicode.")
865 (license license:expat)))