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