gnu: Add cl-ana.statistical-learning.
[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>
47956fa0 8;;; Copyright © 2017 ng0 <ng0@n0.is>
af18fff0 9;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
695c501d 10;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
7670efef 11;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
c4fa3918 12;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
b387a1c5
AE
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
a86177d6 29(define-module (gnu packages fontutils)
b387a1c5 30 #:use-module (gnu packages)
e5c0701f 31 #:use-module (gnu packages compression)
427a51fd 32 #:use-module (gnu packages check)
b972db72 33 #:use-module (gnu packages ghostscript)
019c0eda 34 #:use-module (gnu packages linux)
319e2d17 35 #:use-module (gnu packages perl)
6e4da6ea 36 #:use-module (gnu packages pkg-config)
f945bf06 37 #:use-module (gnu packages autotools)
0c115d8c 38 #:use-module (gnu packages gettext)
319e2d17 39 #:use-module (gnu packages python)
44d10b1f 40 #:use-module (gnu packages python-xyz)
0c115d8c 41 #:use-module (gnu packages image)
1e69db8f
EB
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages flex)
0c115d8c 44 #:use-module (gnu packages glib)
70564e71 45 #:use-module (gnu packages gperf)
0c115d8c
EB
46 #:use-module (gnu packages xorg)
47 #:use-module (gnu packages gtk)
6e4da6ea 48 #:use-module (gnu packages xml)
ad8aaf47
BD
49 #:use-module (gnu packages sqlite)
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages freedesktop)
b5b73a82 52 #:use-module ((guix licenses) #:prefix license:)
b387a1c5
AE
53 #:use-module (guix packages)
54 #:use-module (guix download)
1436c5c7 55 #:use-module (guix svn-download)
579760d0 56 #:use-module (guix git-download)
319e2d17 57 #:use-module (guix build-system cmake)
427a51fd 58 #:use-module (guix build-system gnu)
ad8aaf47
BD
59 #:use-module (guix build-system python)
60 #:use-module (guix build-system meson))
b387a1c5
AE
61
62(define-public freetype
63 (package
64 (name "freetype")
e81b14f0 65 (version "2.10.1")
b387a1c5
AE
66 (source (origin
67 (method url-fetch)
36ee486f 68 (uri (string-append "mirror://savannah/freetype/freetype-"
e81b14f0 69 version ".tar.xz"))
b387a1c5 70 (sha256 (base32
e81b14f0 71 "0vx2dg1jh5kq34dd6ifpjywkpapp8a7p1bvyq9yq5zi1i94gmnqn"))))
b387a1c5 72 (build-system gnu-build-system)
695c501d
RW
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")))
6983ba56
SB
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)))
35b9e423 84 (synopsis "Font rendering library")
b387a1c5
AE
85 (description
86 "Freetype is a library that can be used by applications to access the
35b9e423 87contents of font files. It provides a uniform interface to access font files.
b387a1c5 88It supports both bitmap and scalable formats, including TrueType, OpenType,
35b9e423 89Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
b387a1c5 90anti-aliased glyph bitmap generation with 256 gray levels.")
79c398a2 91 (license license:freetype) ; some files have other licenses
c70047f1 92 (home-page "https://www.freetype.org/")))
6e4da6ea 93
1e69db8f
EB
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
120finely hand-hinting the last 1%. It is ideal for web fonts and supports many
121scripts.")
122 (license (list license:gpl2+ license:freetype)) ;choose one or the other
123 (home-page "http://www.freetype.org/ttfautohint/")))
124
508a85df
EB
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
159Converts OpenType fonts to WOFF fonts
160@item woff2sfnt
161Converts 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
1555aee7
EB
166(define-public ttf2eot
167 (package
168 (name "ttf2eot")
af18fff0 169 (version "0.0.3")
1555aee7
EB
170 (source
171 (origin
af18fff0
TGR
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))
1555aee7
EB
177 (sha256
178 (base32
af18fff0 179 "0l2yh2ialx7135pjzhjs204kk3br7zxjr09zwaia493by2adzigr"))
1555aee7
EB
180 (patches (list (search-patch "ttf2eot-cstddef.patch")))))
181 (build-system gnu-build-system)
182 (arguments
af18fff0 183 `(#:tests? #f ; no tests
1555aee7
EB
184 #:phases
185 (modify-phases %standard-phases
af18fff0
TGR
186 (delete 'configure) ; no configuration
187 (replace 'install ; no install target
1555aee7
EB
188 (lambda* (#:key outputs #:allow-other-keys)
189 (let* ((out (assoc-ref outputs "out"))
190 (bin (string-append out "/bin")))
bf43e133
TGR
191 (install-file "ttf2eot" bin)
192 #t))))))
1555aee7
EB
193 (synopsis "Convert from TrueType to Embeddable Open Type")
194 (description
195 "This package contains a commandline wrapper around OpenTypeUtilities.cpp
196from Chromium, used to make EOT (Embeddable Open Type) files from
197TTF (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)
af18fff0 202 (home-page "https://github.com/wget/ttf2eot")))
1555aee7 203
64965a06
LC
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
247supported 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
249poorly hinted Adobe Type 1 font through the FreeType library and get it back
250with freshly generated hints. The files produced by default are in
251human-readable form, which further needs to be encoded with t1utilities to
252work with most software requiring Type 1 fonts.")
253 (home-page "http://ttf2pt1.sourceforge.net/")
254 (license license:bsd-3)))
255
579760d0
EB
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
292fonts to/from the WOFF2 format.")
293 (license license:asl2.0)
294 (home-page "https://github.com/google/woff2"))))
295
6e4da6ea
AE
296(define-public fontconfig
297 (package
298 (name "fontconfig")
529c3622 299 (version "2.13.1")
6e4da6ea
AE
300 (source (origin
301 (method url-fetch)
302 (uri (string-append
5cc3096c 303 "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
6e4da6ea
AE
304 version ".tar.bz2"))
305 (sha256 (base32
529c3622 306 "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
6e4da6ea 307 (build-system gnu-build-system)
019c0eda 308 ;; In Requires or Requires.private of fontconfig.pc.
80650d77 309 (propagated-inputs `(("expat" ,expat)
019c0eda
MB
310 ("freetype" ,freetype)
311 ("libuuid" ,util-linux)))
80650d77 312 (inputs `(("gs-fonts" ,gs-fonts)))
c4c4cc05 313 (native-inputs
2b174b4e 314 `(("gperf" ,gperf)
70564e71 315 ("pkg-config" ,pkg-config)))
0ceea4f3 316 (arguments
030fa12e
SB
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")
e71ef7ad 323
f8835ff4
AK
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")
e71ef7ad 328
030fa12e
SB
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.
21398eda
MW
336 (invoke "make" "install"
337 "fc_cachedir=$(TMPDIR)"
338 "RUN_FC_CACHE_TEST=false"))))))
9e771e3b 339 (synopsis "Library for configuring and customizing font access")
6e4da6ea
AE
340 (description
341 "Fontconfig can discover new fonts when installed automatically;
342perform font name substitution, so that appropriate alternative fonts can
343be selected if fonts are missing;
344identify the set of fonts required to completely cover a set of languages;
345have GUI configuration tools built as it uses an XML-based configuration file;
346efficiently and quickly find needed fonts among the set of installed fonts;
347be used in concert with the X Render Extension and FreeType to implement
348high quality, anti-aliased and subpixel rendered text on a display.")
349 ; The exact license is more X11-style than BSD-style.
166191b3 350 (license (license:non-copyleft "file://COPYING"
6e4da6ea 351 "See COPYING in the distribution."))
57e7d748 352 (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))
313b9012
AE
353
354(define-public t1lib
355 (package
356 (name "t1lib")
357 (version "5.1.2")
358 (source (origin
359 (method url-fetch)
a60c705b
EF
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")))
313b9012 364 (sha256 (base32
4f3e02f1
EF
365 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))
366 (patches (search-patches
9c2d2c13 367 "t1lib-CVE-2010-2642.patch" ; 2011-0443, 2011-5244
4f3e02f1 368 "t1lib-CVE-2011-0764.patch"
9c2d2c13
EF
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"))))
313b9012
AE
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")))
9e771e3b 381 (synopsis "Library for generating bitmaps from Type 1 fonts")
313b9012
AE
382 (description
383 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
384It is based on the code of the X11 rasteriser of the X11 project.
385
386The bitmaps created by t1lib are returned in a data structure with type
35b9e423
EB
387GLYPH. This special GLYPH-type is also used in the X11 window system to
388describe character bitmaps. It contains the bitmap data as well as some
389metric information. But t1lib is in itself entirely independent of the
390X11-system or any other graphical user interface.")
313b9012
AE
391 (license license:gpl2)
392 (home-page "http://www.t1lib.org/")))
e5c0701f
AE
393
394(define-public teckit
395 (package
93a55838 396 (name "teckit")
792d526a 397 (version "2.5.9") ;signed by key 0xC9183BEA0288CDEE
93a55838
MB
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
792d526a 404 (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8"))))
93a55838
MB
405 (build-system gnu-build-system)
406 (inputs
407 `(("zlib" ,zlib)
408 ("expat" ,expat)))
409 (native-inputs
410 `(("perl" ,perl))) ;for the tests
411 (synopsis "Toolkit for encoding conversions")
412 (description
413 "TECkit is a low-level toolkit intended to be used by other applications
e5c0701f 414that need to perform encoding conversions (e.g., when importing legacy data
35b9e423 415into a Unicode-based application). The primary component of the TECkit
e5c0701f 416package is therefore a library that performs conversions; this is the
35b9e423 417\"TECkit engine\". The engine relies on mapping tables in a specific binary
e5c0701f
AE
418format (for which documentation is available); there is a compiler that
419creates such tables from a human-readable mapping description (a simple
420text file).
421
422To facilitate the development and testing of mapping tables for TECkit,
423several applications are also included in the current package; these
424include simple tools for applying conversions to plain-text and Standard
425Format files, as well as both command-line and simple GUI versions of the
35b9e423 426TECkit compiler. However, it is not intended that these tools will be the
e5c0701f
AE
427primary means by which end users perform conversions, and they have not
428been designed, tested, and debugged to the extent that general-purpose
429applications should be.")
93a55838
MB
430 (license license:lgpl2.1+)
431 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
319e2d17
AE
432
433(define-public graphite2
434 (package
435 (name "graphite2")
8152024c 436 (version "1.3.13")
319e2d17
AE
437 (source
438 (origin
439 (method url-fetch)
6983ba56
SB
440 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
441 "download/" version "/" name "-" version ".tgz"))
319e2d17 442 (sha256
297a36ab 443 (base32
8152024c 444 "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
319e2d17 445 (build-system cmake-build-system)
c4fa3918
MB
446 (arguments
447 `(#:phases (modify-phases %standard-phases
448 (add-after 'unpack 'adjust-test-PYTHONPATH
449 (lambda _
450 ;; Tell the build system not to override PYTHONPATH
451 ;; while running the Python tests.
452 (substitute* "Graphite.cmake"
453 (("ENVIRONMENT PYTHONPATH=")
454 (string-append "ENVIRONMENT PYTHONPATH="
455 (getenv "PYTHONPATH") ":")))
456 #t)))))
e6f22a82 457 (native-inputs
c4fa3918
MB
458 `(("python" ,python)
459 ("python-fonttools" ,python-fonttools)))
319e2d17 460 (inputs
e6f22a82 461 `(("freetype" ,freetype)))
35b9e423 462 (synopsis "Reimplementation of the SIL Graphite text processing engine")
319e2d17
AE
463 (description
464 "Graphite2 is a reimplementation of the SIL Graphite text processing
465engine. Graphite is a smart font technology designed to facilitate the
466process known as shaping. This process takes an input Unicode text string
467and returns a sequence of positioned glyphids from the font.")
468 (license license:lgpl2.1+)
e86409c5 469 (home-page "https://github.com/silnrsi/graphite")))
ee69f85c
EB
470
471(define-public potrace
472 (package
473 (name "potrace")
21e5eb4e 474 (version "1.15")
ee69f85c
EB
475 (source
476 (origin
477 (method url-fetch)
de67e922
LF
478 (uri (string-append "mirror://sourceforge/potrace/" version
479 "/potrace-" version ".tar.gz"))
ee69f85c
EB
480 (sha256
481 (base32
a4258dfa
LC
482 "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))
483 (patches (search-patches "potrace-tests.patch"))))
ee69f85c
EB
484 (build-system gnu-build-system)
485 (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
486 (inputs `(("zlib" ,zlib)))
4797d84d
AE
487 (arguments
488 `(#:configure-flags
489 `("--with-libpotrace"))) ; install library and headers
ee69f85c
EB
490 (synopsis "Transform bitmaps into vector graphics")
491 (description
492 "Potrace is a tool for tracing a bitmap, which means, transforming a
493bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
494or BMP format), and the default output is an encapsulated PostScript
495file (EPS). A typical use is to create EPS files from scanned data, such as
496company or university logos, handwritten notes, etc. The resulting image is
497not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
498resolution.")
499 (license license:gpl2+)
500 (home-page "http://potrace.sourceforge.net/")))
5277dbb0 501
6ef0ec76
RJ
502(define-public libotf
503 (package
504 (name "libotf")
9b9e7481 505 (version "0.9.16")
6ef0ec76
RJ
506 (source (origin
507 (method url-fetch)
6a703976
MW
508 (uri (string-append "mirror://savannah/m17n/libotf-"
509 version ".tar.gz"))
6ef0ec76 510 (sha256
9b9e7481 511 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
6ef0ec76 512 (build-system gnu-build-system)
48342a04
MB
513 (native-inputs
514 `(("pkg-config" ,pkg-config)))
6ef0ec76
RJ
515 (propagated-inputs
516 `(("freetype" ,freetype)))
340978d7 517 (home-page "https://www.nongnu.org/m17n/")
6ef0ec76
RJ
518 (synopsis "Library for handling OpenType Font")
519 (description "This library can read Open Type Layout Tables from an OTF
520file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
521GPOS. It can convert a Unicode character sequence to a glyph code sequence by
522using the above tables.")
523 (license license:lgpl2.0+)))
524
5277dbb0
EB
525(define-public libspiro
526 (package
527 (name "libspiro")
24950127 528 (version "0.5.20150702")
5277dbb0
EB
529 (source
530 (origin
531 (method url-fetch)
24950127
MB
532 (uri (string-append "https://github.com/fontforge/libspiro/releases"
533 "/download/" version "/libspiro-dist-" version ".tar.gz"))
5277dbb0
EB
534 (sha256
535 (base32
24950127 536 "153ckwj6h3wwlsgcppzqj8cymv1927hi8ar8fzpchq5q89cj2kai"))))
5277dbb0 537 (build-system gnu-build-system)
5277dbb0
EB
538 (synopsis "Clothoid to bezier conversion library")
539 (description
540 "Raph Levien's Spiro package as a library. A mechanism for drawing
541smooth contours with constant curvature at the spline joins.")
542 (license license:gpl2+)
543 (home-page "http://libspiro.sourceforge.net/")))
f945bf06
EB
544
545(define-public libuninameslist
546 (package
547 (name "libuninameslist")
e2791627 548 (version "20190701")
27b73b49 549 (home-page "https://github.com/fontforge/libuninameslist")
f945bf06
EB
550 (source
551 (origin
552 (method url-fetch)
27b73b49
MB
553 (uri (string-append home-page "/releases/download/" version
554 "/libuninameslist-dist-" version ".tar.gz"))
f945bf06
EB
555 (sha256
556 (base32
e2791627 557 "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn"))))
f945bf06 558 (build-system gnu-build-system)
f945bf06
EB
559 (synopsis "Unicode names and annotation list")
560 (description
561 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
562useful for programs that need Unicode \"Names\", \"Annotations\", and block
563definitions.")
b19c92ef
MB
564 ;; COPYING specifies GPL2, but according to LICENSE it only covers the
565 ;; configure script. The actual code is BSD-3, and the Unicode data
566 ;; is governed by an X11-style license only found on the web.
567 (license (list license:bsd-3
568 (license:x11-style
27b73b49 569 "https://www.unicode.org/copyright.html#License")))))
0c115d8c
EB
570
571(define-public fontforge
572 (package
573 (name "fontforge")
7670efef 574 (version "20190801")
0c115d8c
EB
575 (source (origin
576 (method url-fetch)
56586557
AE
577 (uri (string-append
578 "https://github.com/fontforge/fontforge/releases/download/"
5dd7bd12 579 version "/fontforge-" version ".tar.gz"))
3b08c873 580 (sha256
7670efef 581 (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"))))
0c115d8c 582 (build-system gnu-build-system)
56586557
AE
583 (native-inputs
584 `(("pkg-config" ,pkg-config)))
585 (inputs `(("cairo" ,cairo)
586 ("fontconfig" ,fontconfig) ;dlopen'd
587 ("freetype" ,freetype)
b94a6ca0 588 ("gettext" ,gettext-minimal)
0c115d8c
EB
589 ("libICE" ,libice)
590 ("libSM" ,libsm)
56586557
AE
591 ("libX11" ,libx11)
592 ("libXi" ,libxi)
593 ("libjpeg" ,libjpeg)
594 ("libltdl" ,libltdl)
595 ("libpng" ,libpng)
0c115d8c 596 ("libspiro" ,libspiro)
56586557 597 ("libtiff" ,libtiff)
de946028 598 ("libungif" ,libungif)
0c115d8c 599 ("libuninameslist" ,libuninameslist)
56586557
AE
600 ("libxft" ,libxft)
601 ("libxml2" ,libxml2)
0c115d8c 602 ("pango" ,pango)
56586557 603 ("potrace" ,potrace)
01a92a70 604 ("python" ,python)
56586557 605 ("zlib" ,zlib)))
0c115d8c 606 (arguments
c80f837a 607 '(#:phases
5ab869f9 608 (modify-phases %standard-phases
5ab869f9
EB
609 (add-after 'install 'set-library-path
610 (lambda* (#:key inputs outputs #:allow-other-keys)
611 (let ((out (assoc-ref outputs "out"))
612 (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
613 (wrap-program (string-append out "/bin/fontforge")
614 ;; Fontforge dynamically opens libraries.
615 `("LD_LIBRARY_PATH" ":" prefix
616 ,(map (lambda (input)
617 (string-append (assoc-ref inputs input)
618 "/lib"))
de946028 619 '("libtiff" "libjpeg" "libpng" "libungif"
5ab869f9
EB
620 "libxml2" "zlib" "libspiro" "freetype"
621 "pango" "cairo" "fontconfig")))
622 ;; Checks for potrace program at runtime
2f3f8ae0 623 `("PATH" ":" prefix (,potrace)))
5dd7bd12 624 #t))))))
0c115d8c
EB
625 (synopsis "Outline font editor")
626 (description
627 "FontForge allows you to create and modify postscript, truetype and
628opentype fonts. You can save fonts in many different outline formats, and
629generate bitmaps.")
56586557 630 (license license:gpl3+)
3ab8c224 631 (home-page "https://fontforge.github.io")))
427a51fd 632
633(define-public python2-ufolib
634 (package
635 (name "python2-ufolib")
a82bb552 636 (version "2.1.1")
427a51fd 637 (source
638 (origin
639 (method url-fetch)
640 (uri (pypi-uri "ufoLib" version ".zip"))
641 (sha256
a82bb552 642 (base32 "07qy6mx7z0wi9a30lc2hj5i9q1gnz1n8l40dmjz2c19mj9s6mz9l"))))
427a51fd 643 (build-system python-build-system)
644 (arguments
645 `(#:python ,python-2))
646 (propagated-inputs
647 `(("python2-fonttools" ,python2-fonttools)))
648 (native-inputs
649 `(("unzip" ,unzip)
e09bb8a4 650 ("python2-pytest" ,python2-pytest)
427a51fd 651 ("python2-pytest-runner" ,python2-pytest-runner)))
652 (home-page "https://github.com/unified-font-object/ufoLib")
653 (synopsis "Low-level UFO reader and writer")
654 (description
655 "UfoLib reads and writes Unified Font Object (UFO)
656files. UFO is a file format that stores fonts source files.")
657 (license license:bsd-3)))
3715aff5 658
659(define-public python2-defcon
660 (package
661 (name "python2-defcon")
e6d7686f 662 (version "0.3.5")
3715aff5 663 (source
664 (origin
665 (method url-fetch)
666 (uri (pypi-uri "defcon" version ".zip"))
667 (sha256
668 (base32
e6d7686f 669 "03jlm2gy9lvbwj68kfdm43yaddwd634jwkdg4wf0jxx2s8mwbg22"))))
3715aff5 670 (build-system python-build-system)
671 (arguments
672 `(#:python ,python-2))
673 (native-inputs
674 `(("unzip" ,unzip)
e09bb8a4 675 ("python2-pytest" ,python2-pytest)
3715aff5 676 ("python2-pytest-runner" ,python2-pytest-runner)))
677 (propagated-inputs
678 `(("python2-fonttools" ,python2-fonttools)
679 ("python2-ufolib" ,python2-ufolib)))
680 (home-page "https://pypi.python.org/pypi/defcon")
681 (synopsis "Flexible objects for representing @acronym{UFO, unified font object} data")
682 (description
683 "Defcon is a set of @acronym{UFO, unified font object} based objects
684optimized for use in font editing applications. The objects are built to
685be lightweight, fast and flexible. The objects are very bare-bones and
686they are not meant to be end-all, be-all objects. Rather, they are meant
687to provide base functionality so that you can focus on your application’s
688behavior, not object observing or maintaining cached data. Defcon
689implements UFO3 as described by the UFO font format.")
690 (license license:expat)))
20d2c6e7 691
692(define-public nototools
693 (package
694 (name "nototools")
695 (version "20170925")
696 (source
697 (origin
698 (method url-fetch)
699 (uri (string-append "https://github.com/googlei18n/nototools/"
700 "archive/v2017-09-25-tooling-for-phase3-"
701 "update.tar.gz"))
702 (file-name (string-append name "-" version ".tar.gz"))
703 (sha256
704 (base32
705 "1pvacw18cm9l4sb66pqyjc7hc74xhhfxc7kd5ald8lixf4wzg0s8"))))
706 (build-system python-build-system)
707 (arguments
708 `(#:python ,python-2))
709 (propagated-inputs
710 `(("python2-booleanoperations" ,python2-booleanoperations)
711 ("python2-defcon" ,python2-defcon)
712 ("python2-fonttools" ,python2-fonttools)
713 ("python2-pillow" ,python2-pillow)
714 ("python2-pyclipper" ,python2-pyclipper)
715 ("python2-ufolib" ,python2-ufolib)))
716 (home-page "https://github.com/googlei18n/nototools")
717 (synopsis "Noto fonts support tools and scripts")
718 (description
719 "Nototools is a Python package containing Python scripts used to
720maintain the Noto Fonts project.")
721 (license (list license:asl2.0
722 ;; Sample texts are attributed to UN and OHCHR.
723 ;; The permissions on the UDHR are pretty lax:
724 ;; http://www.ohchr.org/EN/UDHR/Pages/Introduction.aspx
725 ;; "If UDHR translations or materials are reproduced, users
726 ;; should make reference to this website as a source by
727 ;; providing a link."
728 license:public-domain
729 (license:non-copyleft
730 "file://sample_texts/attributions.txt"
731 "See sample_texts/attributions.txt in the distribution.")))))
ad8aaf47
BD
732
733(define-public fontmanager
734 (package
735 (name "fontmanager")
736 (version "0.7.5")
737 (source
738 (origin
739 (method git-fetch)
740 (uri (git-reference
741 (url "https://github.com/FontManager/font-manager")
742 (commit version)))
743 (file-name (git-file-name name version))
744 (sha256
745 (base32
746 "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g"))))
747 (build-system meson-build-system)
748 (arguments
749 `(#:glib-or-gtk? #t
750 #:build-type "release"
751 #:configure-flags
752 (list (string-append "-Dc_link_args=-Wl,-rpath="
753 (assoc-ref %outputs "out")
754 "/lib/font-manager"))))
755 (native-inputs
756 `(("pkg-config" ,pkg-config)
757 ("vala" ,vala)
758 ("yelp-tools" ,yelp-tools)
759 ("gettext" ,gettext-minimal)
760 ("glib" ,glib "bin")
761 ("gobject-introspection" ,gobject-introspection)
762 ("desktop-file-utils" ,desktop-file-utils)))
763 (inputs
764 `(("json-glib" ,json-glib)
765 ("sqlite-with-column-metadata" ,sqlite-with-column-metadata)
766 ("fonconfig" ,fontconfig)
767 ("freetype" ,freetype)
768 ("gtk+" ,gtk+)))
769 (home-page "https://fontmanager.github.io/")
770 (synopsis "Simple font management for GTK+ desktop environments")
771 (description "Font Manager is intended to provide a way for users to
772easily manage desktop fonts, without having to resort to command-line
773tools or editing configuration files by hand.
774While designed primarily with the GNOME Desktop Environment in mind, it should
775work well with other GTK+ desktop environments.")
776 (license license:gpl3+)))