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