gnu: fontconfig: Update to 2.12.6.
[jackhill/guix/guix.git] / gnu / packages / fontutils.scm
CommitLineData
b387a1c5 1;;; GNU Guix --- Functional package management for GNU
f1597358 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
1e69db8f 3;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
e86409c5 4;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
1c598515 5;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
37e78bc7 6;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
4c20b0bc 7;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
427a51fd 8;;; Copyright © 2017 ng0 <ng0@n0.is>
e6d7686f 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
b387a1c5
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
a86177d6 26(define-module (gnu packages fontutils)
b387a1c5 27 #:use-module (gnu packages)
e5c0701f 28 #:use-module (gnu packages compression)
427a51fd 29 #:use-module (gnu packages check)
b972db72 30 #:use-module (gnu packages ghostscript)
319e2d17 31 #:use-module (gnu packages perl)
6e4da6ea 32 #:use-module (gnu packages pkg-config)
f945bf06 33 #:use-module (gnu packages autotools)
0c115d8c 34 #:use-module (gnu packages gettext)
319e2d17 35 #:use-module (gnu packages python)
0c115d8c 36 #:use-module (gnu packages image)
1e69db8f
EB
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages flex)
0c115d8c 39 #:use-module (gnu packages glib)
70564e71 40 #:use-module (gnu packages gperf)
0c115d8c
EB
41 #:use-module (gnu packages xorg)
42 #:use-module (gnu packages gtk)
6e4da6ea 43 #:use-module (gnu packages xml)
b5b73a82 44 #:use-module ((guix licenses) #:prefix license:)
b387a1c5
AE
45 #:use-module (guix packages)
46 #:use-module (guix download)
1436c5c7 47 #:use-module (guix svn-download)
579760d0 48 #:use-module (guix git-download)
319e2d17 49 #:use-module (guix build-system cmake)
427a51fd 50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system python))
b387a1c5
AE
52
53(define-public freetype
54 (package
55 (name "freetype")
5bb20a25 56 (version "2.8.1")
b387a1c5
AE
57 (source (origin
58 (method url-fetch)
36ee486f 59 (uri (string-append "mirror://savannah/freetype/freetype-"
9e91418b 60 version ".tar.bz2"))
b387a1c5 61 (sha256 (base32
5bb20a25 62 "0y3xrimgp0k39gwq1vdi7b7wjy0z9fhwmzafisxqfardw015yhz5"))))
b387a1c5 63 (build-system gnu-build-system)
6983ba56
SB
64 (native-inputs
65 `(("pkg-config" ,pkg-config)))
66 (propagated-inputs
67 ;; These are all in the Requires.private field of freetype2.pc.
68 ;; XXX: add harfbuzz.
69 `(("libpng" ,libpng)
70 ("zlib" ,zlib)))
35b9e423 71 (synopsis "Font rendering library")
b387a1c5
AE
72 (description
73 "Freetype is a library that can be used by applications to access the
35b9e423 74contents of font files. It provides a uniform interface to access font files.
b387a1c5 75It supports both bitmap and scalable formats, including TrueType, OpenType,
35b9e423 76Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
b387a1c5 77anti-aliased glyph bitmap generation with 256 gray levels.")
79c398a2 78 (license license:freetype) ; some files have other licenses
c70047f1 79 (home-page "https://www.freetype.org/")))
6e4da6ea 80
1e69db8f
EB
81(define-public ttfautohint
82 (package
83 (name "ttfautohint")
84 (version "1.5")
85 (source
86 (origin
87 (method url-fetch)
88 (uri (string-append "mirror://savannah/freetype/ttfautohint-"
89 version ".tar.gz"))
90 (sha256
91 (base32
92 "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
93 (patches (list (search-patch "ttfautohint-source-date-epoch.patch")))))
94 (build-system gnu-build-system)
95 (native-inputs
96 `(("flex" ,flex)
97 ("bison" ,bison)
98 ("pkg-config" ,pkg-config)))
99 (inputs
100 `(("freetype" ,freetype)
101 ("harfbuzz" ,harfbuzz)))
102 (arguments
103 `(#:configure-flags '("--with-qt=no"))) ;no gui
104 (synopsis "Automated font hinting")
105 (description
106 "ttfautohint provides a 99% automated hinting process and a platform for
107finely hand-hinting the last 1%. It is ideal for web fonts and supports many
108scripts.")
109 (license (list license:gpl2+ license:freetype)) ;choose one or the other
110 (home-page "http://www.freetype.org/ttfautohint/")))
111
508a85df
EB
112(define-public woff-tools
113 (package
114 (name "woff-tools")
115 (version "2009.10.04")
116 (source
117 (origin
118 (method url-fetch)
119 ;; Upstream source is unversioned, so use Debian's versioned tarball
120 (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
121 "woff-tools_" version ".orig.tar.gz"))
122 (file-name (string-append name "-" version ".tar.gz"))
123 (sha256
124 (base32
125 "1i97gkqa6jfzlslsngqf556kx60knlgf7yc9pzsq2pizc6f0d4zl"))))
126 (build-system gnu-build-system)
127 (inputs
128 `(("zlib" ,zlib)))
129 (arguments
130 `(#:make-flags '("CC=gcc")
131 #:tests? #f ;no tests
132 #:phases
133 (modify-phases %standard-phases
134 (delete 'configure) ;no configuration
135 (replace 'install
136 (lambda* (#:key outputs #:allow-other-keys)
137 (let* ((out (assoc-ref outputs "out"))
138 (bin (string-append out "/bin")))
139 (install-file "sfnt2woff" bin)
140 (install-file "woff2sfnt" bin)))))))
141 (synopsis "Convert between OpenType and WOFF fonts")
142 (description
143 "This package provides two tools:
144@table @code
145@item sfnt2woff
146Converts OpenType fonts to WOFF fonts
147@item woff2sfnt
148Converts WOFF fonts to OpenType fonts
149@end table")
150 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
151 (home-page "https://people.mozilla.com/~jkew/woff/")))
152
1555aee7
EB
153(define-public ttf2eot
154 (package
155 (name "ttf2eot")
156 (version "0.0.2-2")
157 (source
158 (origin
159 (method url-fetch)
160 (uri (string-append "https://storage.googleapis.com/"
161 "google-code-archive-downloads/v2/"
162 "code.google.com/ttf2eot/"
163 "ttf2eot-" version ".tar.gz"))
164 (sha256
165 (base32
166 "1f4dzzmhn0208dvbm3ia5ar6ls9apwc6ampy5blmfxkigi6z0g02"))
167 (patches (list (search-patch "ttf2eot-cstddef.patch")))))
168 (build-system gnu-build-system)
169 (arguments
170 `(#:tests? #f ;no tests
171 #:phases
172 (modify-phases %standard-phases
173 (delete 'configure) ;no configuration
174 (replace 'install
175 (lambda* (#:key outputs #:allow-other-keys)
176 (let* ((out (assoc-ref outputs "out"))
177 (bin (string-append out "/bin")))
178 (install-file "ttf2eot" bin)))))))
179 (synopsis "Convert from TrueType to Embeddable Open Type")
180 (description
181 "This package contains a commandline wrapper around OpenTypeUtilities.cpp
182from Chromium, used to make EOT (Embeddable Open Type) files from
183TTF (TrueType/OpenType Font) files.")
184 ;; While the README states "License: Derived from WebKit, so BSD/LGPL
185 ;; 2/LGPL 2.1", the single derived source file includes only BSD in its
186 ;; license header, and the wrapper source contains no license header.
187 (license license:bsd-2)
188 (home-page "https://code.google.com/archive/p/ttf2eot/")))
189
579760d0
EB
190(define-public woff2
191 (let ((commit "4e698b8c6c5e070d53c340db9ddf160e21070ede")
192 (revision "1"))
193 (package
194 (name "woff2")
195 (version (string-append "20160306-" revision "."
196 (string-take commit 7)))
197 (source (origin
198 (method git-fetch)
199 (uri (git-reference
200 (url "https://github.com/google/woff2.git")
201 (commit commit)))
202 (file-name (string-append name "-" version ".tar.xz"))
203 (sha256
204 (base32
205 "0wka0yhf0cjmd4rv2jckxpyv6lb5ckj4nj0k1ajq5hrjy7f30lcp"))
206 (patches (list (search-patch "woff2-libbrotli.patch")))))
207 (build-system gnu-build-system)
208 (native-inputs
209 `(("pkg-config" ,pkg-config)))
210 (inputs
211 `(("brotli" ,brotli)))
212 (arguments
213 `(#:tests? #f ;no tests
214 #:phases (modify-phases %standard-phases
215 (delete 'configure)
216 (replace 'install
217 (lambda* (#:key outputs #:allow-other-keys)
218 (let* ((out (assoc-ref outputs "out"))
219 (bin (string-append out "/bin")))
220 (install-file "woff2_compress" bin)
221 (install-file "woff2_decompress" bin)
222 #t))))))
223 (synopsis "Compress TrueType fonts to WOFF2")
224 (description
225 "This package provides utilities for compressing/decompressing TrueType
226fonts to/from the WOFF2 format.")
227 (license license:asl2.0)
228 (home-page "https://github.com/google/woff2"))))
229
6e4da6ea
AE
230(define-public fontconfig
231 (package
232 (name "fontconfig")
2b174b4e 233 (version "2.12.6")
6e4da6ea
AE
234 (source (origin
235 (method url-fetch)
236 (uri (string-append
5cc3096c 237 "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
6e4da6ea 238 version ".tar.bz2"))
2b174b4e 239 (patches (search-patches "fontconfig-remove-debug-printf.patch"))
6e4da6ea 240 (sha256 (base32
2b174b4e 241 "05zh65zni11kgnhg726gjbrd55swspdvhqbcnj5a5xh8gn03036g"))))
6e4da6ea 242 (build-system gnu-build-system)
80650d77
MW
243 (propagated-inputs `(("expat" ,expat)
244 ("freetype" ,freetype)))
245 (inputs `(("gs-fonts" ,gs-fonts)))
c4c4cc05 246 (native-inputs
2b174b4e 247 `(("gperf" ,gperf)
70564e71 248 ("pkg-config" ,pkg-config)))
0ceea4f3 249 (arguments
030fa12e
SB
250 `(#:configure-flags
251 (list "--with-cache-dir=/var/cache/fontconfig"
252 ;; register gs-fonts as default fonts
253 (string-append "--with-default-fonts="
254 (assoc-ref %build-inputs "gs-fonts")
255 "/share/fonts")
e71ef7ad 256
f8835ff4
AK
257 ;; Register fonts from user and system profiles.
258 (string-append "--with-add-fonts="
259 "~/.guix-profile/share/fonts,"
260 "/run/current-system/profile/share/fonts")
e71ef7ad 261
030fa12e
SB
262 ;; python is not actually needed
263 "PYTHON=false")
264 #:phases
265 (modify-phases %standard-phases
266 (replace 'install
267 (lambda _
268 ;; Don't try to create /var/cache/fontconfig.
269 (zero? (system* "make" "install"
270 "fc_cachedir=$(TMPDIR)"
271 "RUN_FC_CACHE_TEST=false")))))))
9e771e3b 272 (synopsis "Library for configuring and customizing font access")
6e4da6ea
AE
273 (description
274 "Fontconfig can discover new fonts when installed automatically;
275perform font name substitution, so that appropriate alternative fonts can
276be selected if fonts are missing;
277identify the set of fonts required to completely cover a set of languages;
278have GUI configuration tools built as it uses an XML-based configuration file;
279efficiently and quickly find needed fonts among the set of installed fonts;
280be used in concert with the X Render Extension and FreeType to implement
281high quality, anti-aliased and subpixel rendered text on a display.")
282 ; The exact license is more X11-style than BSD-style.
166191b3 283 (license (license:non-copyleft "file://COPYING"
6e4da6ea
AE
284 "See COPYING in the distribution."))
285 (home-page "http://www.freedesktop.org/wiki/Software/fontconfig")))
313b9012
AE
286
287(define-public t1lib
288 (package
289 (name "t1lib")
290 (version "5.1.2")
291 (source (origin
292 (method url-fetch)
a60c705b
EF
293 (uri (list (string-append "ftp://sunsite.unc.edu/pub/Linux/libs/"
294 "graphics/" name "-" version ".tar.gz")
295 (string-append "https://fossies.org/linux/misc/old/"
296 name "-" version ".tar.gz")))
313b9012 297 (sha256 (base32
4f3e02f1
EF
298 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))
299 (patches (search-patches
300 "t1lib-CVE-2010-2642.patch"
301 "t1lib-CVE-2011-0764.patch"
302 "t1lib-CVE-2011-1552+CVE-2011-1553+CVE-2011-1554.patch"))))
313b9012
AE
303 (build-system gnu-build-system)
304 (arguments
305 ;; Making the documentation requires latex, but t1lib is also an input
306 ;; for building texlive.
307 `(#:tests? #f ; no test target
308 #:make-flags
309 '("without_doc")))
9e771e3b 310 (synopsis "Library for generating bitmaps from Type 1 fonts")
313b9012
AE
311 (description
312 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
313It is based on the code of the X11 rasteriser of the X11 project.
314
315The bitmaps created by t1lib are returned in a data structure with type
35b9e423
EB
316GLYPH. This special GLYPH-type is also used in the X11 window system to
317describe character bitmaps. It contains the bitmap data as well as some
318metric information. But t1lib is in itself entirely independent of the
319X11-system or any other graphical user interface.")
313b9012
AE
320 (license license:gpl2)
321 (home-page "http://www.t1lib.org/")))
e5c0701f
AE
322
323(define-public teckit
324 (package
325 (name "teckit")
6baf1b72 326 (version "2.5.7")
e5c0701f 327 (source (origin
6baf1b72
RJ
328 (method url-fetch)
329 (uri (string-append
330 "https://github.com/silnrsi/teckit/releases/download/v"
331 version "/teckit-" version ".tar.gz"))
1436c5c7
AE
332 (sha256
333 (base32
6baf1b72 334 "1pbp97vcpj6x4yixx6ww0vsi1rrr99fksxdjafs6gdargzd24cj4"))))
e5c0701f 335 (build-system gnu-build-system)
6baf1b72
RJ
336 (inputs
337 `(("zlib" ,zlib)
338 ("expat" ,expat)))
1436c5c7
AE
339 (native-inputs
340 `(("autoconf" ,autoconf)
341 ("automake" ,automake)
342 ("libtool" ,libtool)
343 ("perl" ,perl))) ; for the tests
35b9e423 344 (synopsis "Toolkit for encoding conversions")
e5c0701f
AE
345 (description
346 "TECkit is a low-level toolkit intended to be used by other applications
347that need to perform encoding conversions (e.g., when importing legacy data
35b9e423 348into a Unicode-based application). The primary component of the TECkit
e5c0701f 349package is therefore a library that performs conversions; this is the
35b9e423 350\"TECkit engine\". The engine relies on mapping tables in a specific binary
e5c0701f
AE
351format (for which documentation is available); there is a compiler that
352creates such tables from a human-readable mapping description (a simple
353text file).
354
355To facilitate the development and testing of mapping tables for TECkit,
356several applications are also included in the current package; these
357include simple tools for applying conversions to plain-text and Standard
358Format files, as well as both command-line and simple GUI versions of the
35b9e423 359TECkit compiler. However, it is not intended that these tools will be the
e5c0701f
AE
360primary means by which end users perform conversions, and they have not
361been designed, tested, and debugged to the extent that general-purpose
362applications should be.")
363 (license license:lgpl2.1+)
364 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
319e2d17
AE
365
366(define-public graphite2
367 (package
368 (name "graphite2")
54d9479d 369 (version "1.3.10")
319e2d17
AE
370 (source
371 (origin
372 (method url-fetch)
6983ba56
SB
373 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
374 "download/" version "/" name "-" version ".tgz"))
4c20b0bc 375 (patches (search-patches "graphite2-ffloat-store.patch"))
319e2d17 376 (sha256
297a36ab 377 (base32
54d9479d 378 "1bm1rl2ww0m8rvmknh8fpajyz9xqv43qs9qrzf7xd5gaz6rf7zch"))))
319e2d17 379 (build-system cmake-build-system)
e6f22a82
SB
380 (native-inputs
381 `(("python" ,python-2) ; because of "import imap" in tests
382 ("python-fonttools" ,python2-fonttools)))
319e2d17 383 (inputs
e6f22a82 384 `(("freetype" ,freetype)))
35b9e423 385 (synopsis "Reimplementation of the SIL Graphite text processing engine")
319e2d17
AE
386 (description
387 "Graphite2 is a reimplementation of the SIL Graphite text processing
388engine. Graphite is a smart font technology designed to facilitate the
389process known as shaping. This process takes an input Unicode text string
390and returns a sequence of positioned glyphids from the font.")
391 (license license:lgpl2.1+)
e86409c5 392 (home-page "https://github.com/silnrsi/graphite")))
ee69f85c
EB
393
394(define-public potrace
395 (package
396 (name "potrace")
21e5eb4e 397 (version "1.15")
ee69f85c
EB
398 (source
399 (origin
400 (method url-fetch)
de67e922
LF
401 (uri (string-append "mirror://sourceforge/potrace/" version
402 "/potrace-" version ".tar.gz"))
ee69f85c
EB
403 (sha256
404 (base32
21e5eb4e 405 "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))))
ee69f85c
EB
406 (build-system gnu-build-system)
407 (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
408 (inputs `(("zlib" ,zlib)))
4797d84d
AE
409 (arguments
410 `(#:configure-flags
411 `("--with-libpotrace"))) ; install library and headers
ee69f85c
EB
412 (synopsis "Transform bitmaps into vector graphics")
413 (description
414 "Potrace is a tool for tracing a bitmap, which means, transforming a
415bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
416or BMP format), and the default output is an encapsulated PostScript
417file (EPS). A typical use is to create EPS files from scanned data, such as
418company or university logos, handwritten notes, etc. The resulting image is
419not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
420resolution.")
421 (license license:gpl2+)
422 (home-page "http://potrace.sourceforge.net/")))
5277dbb0 423
6ef0ec76
RJ
424(define-public libotf
425 (package
426 (name "libotf")
427 (version "0.9.13")
428 (source (origin
429 (method url-fetch)
6a703976
MW
430 (uri (string-append "mirror://savannah/m17n/libotf-"
431 version ".tar.gz"))
6ef0ec76
RJ
432 (sha256
433 (base32 "0239zvfan56w7vrppriwy77fzb10ag9llaz15nsraps2a2x6di3v"))))
434 (build-system gnu-build-system)
435 (propagated-inputs
436 `(("freetype" ,freetype)))
437 (home-page "http://www.nongnu.org/m17n/")
438 (synopsis "Library for handling OpenType Font")
439 (description "This library can read Open Type Layout Tables from an OTF
440file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
441GPOS. It can convert a Unicode character sequence to a glyph code sequence by
442using the above tables.")
443 (license license:lgpl2.0+)))
444
5277dbb0
EB
445(define-public libspiro
446 (package
447 (name "libspiro")
448 (version "20071029")
449 (source
450 (origin
451 (method url-fetch)
452 (uri (string-append "mirror://sourceforge/libspiro/libspiro/"
453 version "/libspiro_src-" version ".tar.bz2"))
454 (sha256
455 (base32
456 "1kylz8pvwnb85yya150r9i6mhbpzx38f32qy523qg3ylgd9b3zhy"))))
457 (build-system gnu-build-system)
458 (arguments `(#:tests? #f)) ;no tests
459 (synopsis "Clothoid to bezier conversion library")
460 (description
461 "Raph Levien's Spiro package as a library. A mechanism for drawing
462smooth contours with constant curvature at the spline joins.")
463 (license license:gpl2+)
464 (home-page "http://libspiro.sourceforge.net/")))
f945bf06
EB
465
466(define-public libuninameslist
467 (package
468 (name "libuninameslist")
6a534909 469 (version "20170807")
f945bf06
EB
470 (source
471 (origin
472 (method url-fetch)
473 (uri (string-append "https://github.com/fontforge/libuninameslist/"
474 "archive/" version ".tar.gz"))
efe0be6d 475 (file-name (string-append name "-" version ".tar.gz"))
f945bf06
EB
476 (sha256
477 (base32
6a534909 478 "0axwxjgcrwms9682vmpsq1x4swdx6q6qk6997rkfr8xrgi124c6a"))))
f945bf06
EB
479 (build-system gnu-build-system)
480 (native-inputs `(("autoconf" ,autoconf)
481 ("automake" ,automake)
3246cc91 482 ("libtool" ,libtool)))
f945bf06 483 (arguments
7286dd21
EF
484 `(#:phases
485 (modify-phases %standard-phases
486 (add-after 'unpack 'bootstrap
487 (lambda _ (zero? (system* "autoreconf" "-vi")))))))
f945bf06
EB
488 (synopsis "Unicode names and annotation list")
489 (description
490 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
491useful for programs that need Unicode \"Names\", \"Annotations\", and block
492definitions.")
493 (license license:gpl2)
494 (home-page "https://github.com/fontforge/libuninameslist")))
0c115d8c
EB
495
496(define-public fontforge
497 (package
498 (name "fontforge")
c80f837a 499 (version "20170731")
0c115d8c
EB
500 (source (origin
501 (method url-fetch)
56586557
AE
502 (uri (string-append
503 "https://github.com/fontforge/fontforge/releases/download/"
c80f837a 504 version "/fontforge-dist-" version ".tar.xz"))
0c115d8c 505 (sha256 (base32
c80f837a 506 "08l8h3yvk4v7652jvmd3ls7nf5miybkx2fmkf1mpwwfixpxxw2l4"))))
0c115d8c 507 (build-system gnu-build-system)
56586557
AE
508 (native-inputs
509 `(("pkg-config" ,pkg-config)))
510 (inputs `(("cairo" ,cairo)
511 ("fontconfig" ,fontconfig) ;dlopen'd
512 ("freetype" ,freetype)
b94a6ca0 513 ("gettext" ,gettext-minimal)
56586557 514 ("glib" ,glib) ;needed for pango detection
0c115d8c
EB
515 ("libICE" ,libice)
516 ("libSM" ,libsm)
56586557
AE
517 ("libX11" ,libx11)
518 ("libXi" ,libxi)
519 ("libjpeg" ,libjpeg)
520 ("libltdl" ,libltdl)
521 ("libpng" ,libpng)
0c115d8c 522 ("libspiro" ,libspiro)
56586557 523 ("libtiff" ,libtiff)
de946028 524 ("libungif" ,libungif)
0c115d8c 525 ("libuninameslist" ,libuninameslist)
56586557
AE
526 ("libxft" ,libxft)
527 ("libxml2" ,libxml2)
0c115d8c 528 ("pango" ,pango)
56586557 529 ("potrace" ,potrace)
c80f837a 530 ("python" ,python-wrapper)
56586557 531 ("zlib" ,zlib)))
0c115d8c 532 (arguments
c80f837a 533 '(#:phases
5ab869f9 534 (modify-phases %standard-phases
5ab869f9
EB
535 (add-after 'install 'set-library-path
536 (lambda* (#:key inputs outputs #:allow-other-keys)
537 (let ((out (assoc-ref outputs "out"))
538 (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
539 (wrap-program (string-append out "/bin/fontforge")
540 ;; Fontforge dynamically opens libraries.
541 `("LD_LIBRARY_PATH" ":" prefix
542 ,(map (lambda (input)
543 (string-append (assoc-ref inputs input)
544 "/lib"))
de946028 545 '("libtiff" "libjpeg" "libpng" "libungif"
5ab869f9
EB
546 "libxml2" "zlib" "libspiro" "freetype"
547 "pango" "cairo" "fontconfig")))
548 ;; Checks for potrace program at runtime
549 `("PATH" ":" prefix (,potrace)))))))))
0c115d8c
EB
550 (synopsis "Outline font editor")
551 (description
552 "FontForge allows you to create and modify postscript, truetype and
553opentype fonts. You can save fonts in many different outline formats, and
554generate bitmaps.")
56586557 555 (license license:gpl3+)
c80f837a 556 (home-page "https://fontforge.github.io/en-US/")))
427a51fd 557
558(define-public python2-ufolib
559 (package
560 (name "python2-ufolib")
a82bb552 561 (version "2.1.1")
427a51fd 562 (source
563 (origin
564 (method url-fetch)
565 (uri (pypi-uri "ufoLib" version ".zip"))
566 (sha256
a82bb552 567 (base32 "07qy6mx7z0wi9a30lc2hj5i9q1gnz1n8l40dmjz2c19mj9s6mz9l"))))
427a51fd 568 (build-system python-build-system)
569 (arguments
570 `(#:python ,python-2))
571 (propagated-inputs
572 `(("python2-fonttools" ,python2-fonttools)))
573 (native-inputs
574 `(("unzip" ,unzip)
e09bb8a4 575 ("python2-pytest" ,python2-pytest)
427a51fd 576 ("python2-pytest-runner" ,python2-pytest-runner)))
577 (home-page "https://github.com/unified-font-object/ufoLib")
578 (synopsis "Low-level UFO reader and writer")
579 (description
580 "UfoLib reads and writes Unified Font Object (UFO)
581files. UFO is a file format that stores fonts source files.")
582 (license license:bsd-3)))
3715aff5 583
584(define-public python2-defcon
585 (package
586 (name "python2-defcon")
e6d7686f 587 (version "0.3.5")
3715aff5 588 (source
589 (origin
590 (method url-fetch)
591 (uri (pypi-uri "defcon" version ".zip"))
592 (sha256
593 (base32
e6d7686f 594 "03jlm2gy9lvbwj68kfdm43yaddwd634jwkdg4wf0jxx2s8mwbg22"))))
3715aff5 595 (build-system python-build-system)
596 (arguments
597 `(#:python ,python-2))
598 (native-inputs
599 `(("unzip" ,unzip)
e09bb8a4 600 ("python2-pytest" ,python2-pytest)
3715aff5 601 ("python2-pytest-runner" ,python2-pytest-runner)))
602 (propagated-inputs
603 `(("python2-fonttools" ,python2-fonttools)
604 ("python2-ufolib" ,python2-ufolib)))
605 (home-page "https://pypi.python.org/pypi/defcon")
606 (synopsis "Flexible objects for representing @acronym{UFO, unified font object} data")
607 (description
608 "Defcon is a set of @acronym{UFO, unified font object} based objects
609optimized for use in font editing applications. The objects are built to
610be lightweight, fast and flexible. The objects are very bare-bones and
611they are not meant to be end-all, be-all objects. Rather, they are meant
612to provide base functionality so that you can focus on your application’s
613behavior, not object observing or maintaining cached data. Defcon
614implements UFO3 as described by the UFO font format.")
615 (license license:expat)))
20d2c6e7 616
617(define-public nototools
618 (package
619 (name "nototools")
620 (version "20170925")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (string-append "https://github.com/googlei18n/nototools/"
625 "archive/v2017-09-25-tooling-for-phase3-"
626 "update.tar.gz"))
627 (file-name (string-append name "-" version ".tar.gz"))
628 (sha256
629 (base32
630 "1pvacw18cm9l4sb66pqyjc7hc74xhhfxc7kd5ald8lixf4wzg0s8"))))
631 (build-system python-build-system)
632 (arguments
633 `(#:python ,python-2))
634 (propagated-inputs
635 `(("python2-booleanoperations" ,python2-booleanoperations)
636 ("python2-defcon" ,python2-defcon)
637 ("python2-fonttools" ,python2-fonttools)
638 ("python2-pillow" ,python2-pillow)
639 ("python2-pyclipper" ,python2-pyclipper)
640 ("python2-ufolib" ,python2-ufolib)))
641 (home-page "https://github.com/googlei18n/nototools")
642 (synopsis "Noto fonts support tools and scripts")
643 (description
644 "Nototools is a Python package containing Python scripts used to
645maintain the Noto Fonts project.")
646 (license (list license:asl2.0
647 ;; Sample texts are attributed to UN and OHCHR.
648 ;; The permissions on the UDHR are pretty lax:
649 ;; http://www.ohchr.org/EN/UDHR/Pages/Introduction.aspx
650 ;; "If UDHR translations or materials are reproduced, users
651 ;; should make reference to this website as a source by
652 ;; providing a link."
653 license:public-domain
654 (license:non-copyleft
655 "file://sample_texts/attributions.txt"
656 "See sample_texts/attributions.txt in the distribution.")))))