gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'.
[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 310 ("freetype" ,freetype)
bb93042c 311 ("libuuid" ,util-linux "lib")))
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 405 (build-system gnu-build-system)
9d2c24d2
MB
406 (arguments
407 '(#:configure-flags '("--disable-static")))
93a55838
MB
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
e5c0701f 416that need to perform encoding conversions (e.g., when importing legacy data
35b9e423 417into a Unicode-based application). The primary component of the TECkit
e5c0701f 418package is therefore a library that performs conversions; this is the
35b9e423 419\"TECkit engine\". The engine relies on mapping tables in a specific binary
e5c0701f
AE
420format (for which documentation is available); there is a compiler that
421creates such tables from a human-readable mapping description (a simple
422text file).
423
424To facilitate the development and testing of mapping tables for TECkit,
425several applications are also included in the current package; these
426include simple tools for applying conversions to plain-text and Standard
427Format files, as well as both command-line and simple GUI versions of the
35b9e423 428TECkit compiler. However, it is not intended that these tools will be the
e5c0701f
AE
429primary means by which end users perform conversions, and they have not
430been designed, tested, and debugged to the extent that general-purpose
431applications should be.")
93a55838
MB
432 (license license:lgpl2.1+)
433 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
319e2d17
AE
434
435(define-public graphite2
436 (package
437 (name "graphite2")
8152024c 438 (version "1.3.13")
319e2d17
AE
439 (source
440 (origin
441 (method url-fetch)
6983ba56
SB
442 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
443 "download/" version "/" name "-" version ".tgz"))
319e2d17 444 (sha256
297a36ab 445 (base32
8152024c 446 "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
319e2d17 447 (build-system cmake-build-system)
c4fa3918
MB
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)))))
e6f22a82 459 (native-inputs
c4fa3918
MB
460 `(("python" ,python)
461 ("python-fonttools" ,python-fonttools)))
319e2d17 462 (inputs
e6f22a82 463 `(("freetype" ,freetype)))
35b9e423 464 (synopsis "Reimplementation of the SIL Graphite text processing engine")
319e2d17
AE
465 (description
466 "Graphite2 is a reimplementation of the SIL Graphite text processing
467engine. Graphite is a smart font technology designed to facilitate the
468process known as shaping. This process takes an input Unicode text string
469and returns a sequence of positioned glyphids from the font.")
470 (license license:lgpl2.1+)
e86409c5 471 (home-page "https://github.com/silnrsi/graphite")))
ee69f85c
EB
472
473(define-public potrace
474 (package
475 (name "potrace")
21e5eb4e 476 (version "1.15")
ee69f85c
EB
477 (source
478 (origin
479 (method url-fetch)
de67e922
LF
480 (uri (string-append "mirror://sourceforge/potrace/" version
481 "/potrace-" version ".tar.gz"))
ee69f85c
EB
482 (sha256
483 (base32
a4258dfa
LC
484 "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))
485 (patches (search-patches "potrace-tests.patch"))))
ee69f85c
EB
486 (build-system gnu-build-system)
487 (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
488 (inputs `(("zlib" ,zlib)))
4797d84d
AE
489 (arguments
490 `(#:configure-flags
491 `("--with-libpotrace"))) ; install library and headers
ee69f85c
EB
492 (synopsis "Transform bitmaps into vector graphics")
493 (description
494 "Potrace is a tool for tracing a bitmap, which means, transforming a
495bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
496or BMP format), and the default output is an encapsulated PostScript
497file (EPS). A typical use is to create EPS files from scanned data, such as
498company or university logos, handwritten notes, etc. The resulting image is
499not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
500resolution.")
501 (license license:gpl2+)
502 (home-page "http://potrace.sourceforge.net/")))
5277dbb0 503
6ef0ec76
RJ
504(define-public libotf
505 (package
506 (name "libotf")
9b9e7481 507 (version "0.9.16")
6ef0ec76
RJ
508 (source (origin
509 (method url-fetch)
6a703976
MW
510 (uri (string-append "mirror://savannah/m17n/libotf-"
511 version ".tar.gz"))
6ef0ec76 512 (sha256
9b9e7481 513 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
6ef0ec76 514 (build-system gnu-build-system)
48342a04
MB
515 (native-inputs
516 `(("pkg-config" ,pkg-config)))
6ef0ec76
RJ
517 (propagated-inputs
518 `(("freetype" ,freetype)))
340978d7 519 (home-page "https://www.nongnu.org/m17n/")
6ef0ec76
RJ
520 (synopsis "Library for handling OpenType Font")
521 (description "This library can read Open Type Layout Tables from an OTF
522file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
523GPOS. It can convert a Unicode character sequence to a glyph code sequence by
524using the above tables.")
525 (license license:lgpl2.0+)))
526
5277dbb0
EB
527(define-public libspiro
528 (package
529 (name "libspiro")
600037b3 530 (version "20190731")
5277dbb0
EB
531 (source
532 (origin
533 (method url-fetch)
24950127 534 (uri (string-append "https://github.com/fontforge/libspiro/releases"
600037b3 535 "/download/" version "/libspiro-" version ".tar.gz"))
5277dbb0
EB
536 (sha256
537 (base32
600037b3 538 "0m63x97b7aciviijprvy85gm03p2jsgslxn323zl9zn7qz6d3ir4"))))
5277dbb0 539 (build-system gnu-build-system)
06639876
MB
540 (arguments
541 '(#:configure-flags '("--disable-static")))
5277dbb0
EB
542 (synopsis "Clothoid to bezier conversion library")
543 (description
544 "Raph Levien's Spiro package as a library. A mechanism for drawing
545smooth contours with constant curvature at the spline joins.")
546 (license license:gpl2+)
547 (home-page "http://libspiro.sourceforge.net/")))
f945bf06
EB
548
549(define-public libuninameslist
550 (package
551 (name "libuninameslist")
e2791627 552 (version "20190701")
27b73b49 553 (home-page "https://github.com/fontforge/libuninameslist")
f945bf06
EB
554 (source
555 (origin
556 (method url-fetch)
27b73b49
MB
557 (uri (string-append home-page "/releases/download/" version
558 "/libuninameslist-dist-" version ".tar.gz"))
f945bf06
EB
559 (sha256
560 (base32
e2791627 561 "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn"))))
f945bf06 562 (build-system gnu-build-system)
f945bf06
EB
563 (synopsis "Unicode names and annotation list")
564 (description
565 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
566useful for programs that need Unicode \"Names\", \"Annotations\", and block
567definitions.")
b19c92ef
MB
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
27b73b49 573 "https://www.unicode.org/copyright.html#License")))))
0c115d8c
EB
574
575(define-public fontforge
576 (package
577 (name "fontforge")
7670efef 578 (version "20190801")
0c115d8c
EB
579 (source (origin
580 (method url-fetch)
56586557
AE
581 (uri (string-append
582 "https://github.com/fontforge/fontforge/releases/download/"
5dd7bd12 583 version "/fontforge-" version ".tar.gz"))
3b08c873 584 (sha256
7670efef 585 (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"))))
0c115d8c 586 (build-system gnu-build-system)
56586557
AE
587 (native-inputs
588 `(("pkg-config" ,pkg-config)))
589 (inputs `(("cairo" ,cairo)
590 ("fontconfig" ,fontconfig) ;dlopen'd
591 ("freetype" ,freetype)
b94a6ca0 592 ("gettext" ,gettext-minimal)
0c115d8c
EB
593 ("libICE" ,libice)
594 ("libSM" ,libsm)
56586557
AE
595 ("libX11" ,libx11)
596 ("libXi" ,libxi)
4bd428a7 597 ("libjpeg" ,libjpeg-turbo)
56586557
AE
598 ("libltdl" ,libltdl)
599 ("libpng" ,libpng)
0c115d8c 600 ("libspiro" ,libspiro)
56586557 601 ("libtiff" ,libtiff)
de946028 602 ("libungif" ,libungif)
0c115d8c 603 ("libuninameslist" ,libuninameslist)
56586557
AE
604 ("libxft" ,libxft)
605 ("libxml2" ,libxml2)
0c115d8c 606 ("pango" ,pango)
56586557 607 ("potrace" ,potrace)
01a92a70 608 ("python" ,python)
56586557 609 ("zlib" ,zlib)))
0c115d8c 610 (arguments
c80f837a 611 '(#:phases
5ab869f9 612 (modify-phases %standard-phases
5ab869f9
EB
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"))
de946028 623 '("libtiff" "libjpeg" "libpng" "libungif"
5ab869f9
EB
624 "libxml2" "zlib" "libspiro" "freetype"
625 "pango" "cairo" "fontconfig")))
626 ;; Checks for potrace program at runtime
2f3f8ae0 627 `("PATH" ":" prefix (,potrace)))
5dd7bd12 628 #t))))))
0c115d8c
EB
629 (synopsis "Outline font editor")
630 (description
631 "FontForge allows you to create and modify postscript, truetype and
632opentype fonts. You can save fonts in many different outline formats, and
633generate bitmaps.")
56586557 634 (license license:gpl3+)
3ab8c224 635 (home-page "https://fontforge.github.io")))
427a51fd 636
637(define-public python2-ufolib
638 (package
639 (name "python2-ufolib")
a82bb552 640 (version "2.1.1")
427a51fd 641 (source
642 (origin
643 (method url-fetch)
644 (uri (pypi-uri "ufoLib" version ".zip"))
645 (sha256
a82bb552 646 (base32 "07qy6mx7z0wi9a30lc2hj5i9q1gnz1n8l40dmjz2c19mj9s6mz9l"))))
427a51fd 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)
e09bb8a4 654 ("python2-pytest" ,python2-pytest)
427a51fd 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)
660files. UFO is a file format that stores fonts source files.")
661 (license license:bsd-3)))
3715aff5 662
663(define-public python2-defcon
664 (package
665 (name "python2-defcon")
e6d7686f 666 (version "0.3.5")
3715aff5 667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "defcon" version ".zip"))
671 (sha256
672 (base32
e6d7686f 673 "03jlm2gy9lvbwj68kfdm43yaddwd634jwkdg4wf0jxx2s8mwbg22"))))
3715aff5 674 (build-system python-build-system)
675 (arguments
676 `(#:python ,python-2))
677 (native-inputs
678 `(("unzip" ,unzip)
e09bb8a4 679 ("python2-pytest" ,python2-pytest)
3715aff5 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
688optimized for use in font editing applications. The objects are built to
689be lightweight, fast and flexible. The objects are very bare-bones and
690they are not meant to be end-all, be-all objects. Rather, they are meant
691to provide base functionality so that you can focus on your application’s
692behavior, not object observing or maintaining cached data. Defcon
693implements UFO3 as described by the UFO font format.")
694 (license license:expat)))
20d2c6e7 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
724maintain 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.")))))
ad8aaf47
BD
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)
fad5b1a6 769 ("sqlite" ,sqlite)
ad8aaf47
BD
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
776easily manage desktop fonts, without having to resort to command-line
777tools or editing configuration files by hand.
778While designed primarily with the GNOME Desktop Environment in mind, it should
779work well with other GTK+ desktop environments.")
780 (license license:gpl3+)))