gnu: Add gromacs.
[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 259(define-public woff2
d9476a37
LDB
260 (package
261 (name "woff2")
262 (version "1.0.2")
263 (source (origin
264 (method git-fetch)
265 (uri (git-reference
266 (url "https://github.com/google/woff2.git")
267 (commit (string-append "v" version))))
268 (file-name (string-append name "-" version ".git"))
269 (sha256
270 (base32
271 "13l4g536h0pr84ww4wxs2za439s0xp1va55g6l478rfbb1spp44y"))))
272 (build-system cmake-build-system)
273 (native-inputs
274 `(("pkg-config" ,pkg-config)))
275 (inputs
276 `(("google-brotli" ,google-brotli)))
277 (arguments
278 ;; package has no tests
279 `(#:tests? #f
280 ;; we can’t have both, shared libraries and binaries, so turn off the
281 ;; former
282 #:configure-flags (list "-DBUILD_SHARED_LIBS=OFF")))
283 (synopsis "Compress TrueType fonts to WOFF2")
284 (description
285 "This package provides utilities for compressing/decompressing TrueType
579760d0 286fonts to/from the WOFF2 format.")
d9476a37
LDB
287 (license license:asl2.0)
288 (home-page "https://github.com/google/woff2")))
579760d0 289
6e4da6ea
AE
290(define-public fontconfig
291 (package
292 (name "fontconfig")
529c3622 293 (version "2.13.1")
6e4da6ea
AE
294 (source (origin
295 (method url-fetch)
296 (uri (string-append
5cc3096c 297 "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
6e4da6ea
AE
298 version ".tar.bz2"))
299 (sha256 (base32
529c3622 300 "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
6e4da6ea 301 (build-system gnu-build-system)
019c0eda 302 ;; In Requires or Requires.private of fontconfig.pc.
80650d77 303 (propagated-inputs `(("expat" ,expat)
019c0eda
MB
304 ("freetype" ,freetype)
305 ("libuuid" ,util-linux)))
80650d77 306 (inputs `(("gs-fonts" ,gs-fonts)))
c4c4cc05 307 (native-inputs
2b174b4e 308 `(("gperf" ,gperf)
70564e71 309 ("pkg-config" ,pkg-config)))
0ceea4f3 310 (arguments
030fa12e
SB
311 `(#:configure-flags
312 (list "--with-cache-dir=/var/cache/fontconfig"
313 ;; register gs-fonts as default fonts
314 (string-append "--with-default-fonts="
315 (assoc-ref %build-inputs "gs-fonts")
316 "/share/fonts")
e71ef7ad 317
f8835ff4
AK
318 ;; Register fonts from user and system profiles.
319 (string-append "--with-add-fonts="
320 "~/.guix-profile/share/fonts,"
321 "/run/current-system/profile/share/fonts")
e71ef7ad 322
030fa12e
SB
323 ;; python is not actually needed
324 "PYTHON=false")
325 #:phases
326 (modify-phases %standard-phases
327 (replace 'install
328 (lambda _
329 ;; Don't try to create /var/cache/fontconfig.
21398eda
MW
330 (invoke "make" "install"
331 "fc_cachedir=$(TMPDIR)"
332 "RUN_FC_CACHE_TEST=false"))))))
9e771e3b 333 (synopsis "Library for configuring and customizing font access")
6e4da6ea
AE
334 (description
335 "Fontconfig can discover new fonts when installed automatically;
336perform font name substitution, so that appropriate alternative fonts can
337be selected if fonts are missing;
338identify the set of fonts required to completely cover a set of languages;
339have GUI configuration tools built as it uses an XML-based configuration file;
340efficiently and quickly find needed fonts among the set of installed fonts;
341be used in concert with the X Render Extension and FreeType to implement
342high quality, anti-aliased and subpixel rendered text on a display.")
343 ; The exact license is more X11-style than BSD-style.
166191b3 344 (license (license:non-copyleft "file://COPYING"
6e4da6ea 345 "See COPYING in the distribution."))
57e7d748 346 (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))
313b9012
AE
347
348(define-public t1lib
349 (package
350 (name "t1lib")
351 (version "5.1.2")
352 (source (origin
353 (method url-fetch)
a60c705b
EF
354 (uri (list (string-append "ftp://sunsite.unc.edu/pub/Linux/libs/"
355 "graphics/" name "-" version ".tar.gz")
356 (string-append "https://fossies.org/linux/misc/old/"
357 name "-" version ".tar.gz")))
313b9012 358 (sha256 (base32
4f3e02f1
EF
359 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))
360 (patches (search-patches
9c2d2c13 361 "t1lib-CVE-2010-2642.patch" ; 2011-0443, 2011-5244
4f3e02f1 362 "t1lib-CVE-2011-0764.patch"
9c2d2c13
EF
363 "t1lib-CVE-2011-1552+.patch")))) ; 2011-1553, 2011-1554
364 (properties `((lint-hidden-cve . ("CVE-2011-0433"
365 "CVE-2011-1553"
366 "CVE-2011-1554"
367 "CVE-2011-5244"))))
313b9012
AE
368 (build-system gnu-build-system)
369 (arguments
370 ;; Making the documentation requires latex, but t1lib is also an input
371 ;; for building texlive.
372 `(#:tests? #f ; no test target
373 #:make-flags
374 '("without_doc")))
9e771e3b 375 (synopsis "Library for generating bitmaps from Type 1 fonts")
313b9012
AE
376 (description
377 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
378It is based on the code of the X11 rasteriser of the X11 project.
379
380The bitmaps created by t1lib are returned in a data structure with type
35b9e423
EB
381GLYPH. This special GLYPH-type is also used in the X11 window system to
382describe character bitmaps. It contains the bitmap data as well as some
383metric information. But t1lib is in itself entirely independent of the
384X11-system or any other graphical user interface.")
313b9012 385 (license license:gpl2)
d716a474 386 (home-page "https://www.t1lib.org/")))
e5c0701f
AE
387
388(define-public teckit
389 (package
93a55838 390 (name "teckit")
792d526a 391 (version "2.5.9") ;signed by key 0xC9183BEA0288CDEE
93a55838
MB
392 (source
393 (origin
394 (method url-fetch)
395 (uri (string-append "https://github.com/silnrsi/teckit/releases/"
396 "download/v" version "/teckit-" version ".tar.gz"))
397 (sha256
792d526a 398 (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8"))))
93a55838
MB
399 (build-system gnu-build-system)
400 (inputs
401 `(("zlib" ,zlib)
402 ("expat" ,expat)))
403 (native-inputs
404 `(("perl" ,perl))) ;for the tests
405 (synopsis "Toolkit for encoding conversions")
406 (description
407 "TECkit is a low-level toolkit intended to be used by other applications
e5c0701f 408that need to perform encoding conversions (e.g., when importing legacy data
35b9e423 409into a Unicode-based application). The primary component of the TECkit
e5c0701f 410package is therefore a library that performs conversions; this is the
35b9e423 411\"TECkit engine\". The engine relies on mapping tables in a specific binary
e5c0701f
AE
412format (for which documentation is available); there is a compiler that
413creates such tables from a human-readable mapping description (a simple
414text file).
415
416To facilitate the development and testing of mapping tables for TECkit,
417several applications are also included in the current package; these
418include simple tools for applying conversions to plain-text and Standard
419Format files, as well as both command-line and simple GUI versions of the
35b9e423 420TECkit compiler. However, it is not intended that these tools will be the
e5c0701f
AE
421primary means by which end users perform conversions, and they have not
422been designed, tested, and debugged to the extent that general-purpose
423applications should be.")
93a55838
MB
424 (license license:lgpl2.1+)
425 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
319e2d17
AE
426
427(define-public graphite2
428 (package
429 (name "graphite2")
8152024c 430 (version "1.3.13")
319e2d17
AE
431 (source
432 (origin
433 (method url-fetch)
6983ba56
SB
434 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
435 "download/" version "/" name "-" version ".tgz"))
319e2d17 436 (sha256
297a36ab 437 (base32
8152024c 438 "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
319e2d17 439 (build-system cmake-build-system)
c4fa3918
MB
440 (arguments
441 `(#:phases (modify-phases %standard-phases
442 (add-after 'unpack 'adjust-test-PYTHONPATH
443 (lambda _
444 ;; Tell the build system not to override PYTHONPATH
445 ;; while running the Python tests.
446 (substitute* "Graphite.cmake"
447 (("ENVIRONMENT PYTHONPATH=")
448 (string-append "ENVIRONMENT PYTHONPATH="
449 (getenv "PYTHONPATH") ":")))
450 #t)))))
e6f22a82 451 (native-inputs
c4fa3918
MB
452 `(("python" ,python)
453 ("python-fonttools" ,python-fonttools)))
319e2d17 454 (inputs
e6f22a82 455 `(("freetype" ,freetype)))
35b9e423 456 (synopsis "Reimplementation of the SIL Graphite text processing engine")
319e2d17
AE
457 (description
458 "Graphite2 is a reimplementation of the SIL Graphite text processing
459engine. Graphite is a smart font technology designed to facilitate the
460process known as shaping. This process takes an input Unicode text string
461and returns a sequence of positioned glyphids from the font.")
462 (license license:lgpl2.1+)
e86409c5 463 (home-page "https://github.com/silnrsi/graphite")))
ee69f85c
EB
464
465(define-public potrace
466 (package
467 (name "potrace")
21e5eb4e 468 (version "1.15")
ee69f85c
EB
469 (source
470 (origin
471 (method url-fetch)
de67e922
LF
472 (uri (string-append "mirror://sourceforge/potrace/" version
473 "/potrace-" version ".tar.gz"))
ee69f85c
EB
474 (sha256
475 (base32
a4258dfa
LC
476 "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))
477 (patches (search-patches "potrace-tests.patch"))))
ee69f85c
EB
478 (build-system gnu-build-system)
479 (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
480 (inputs `(("zlib" ,zlib)))
4797d84d
AE
481 (arguments
482 `(#:configure-flags
483 `("--with-libpotrace"))) ; install library and headers
ee69f85c
EB
484 (synopsis "Transform bitmaps into vector graphics")
485 (description
486 "Potrace is a tool for tracing a bitmap, which means, transforming a
487bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
488or BMP format), and the default output is an encapsulated PostScript
489file (EPS). A typical use is to create EPS files from scanned data, such as
490company or university logos, handwritten notes, etc. The resulting image is
491not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
492resolution.")
493 (license license:gpl2+)
494 (home-page "http://potrace.sourceforge.net/")))
5277dbb0 495
6ef0ec76
RJ
496(define-public libotf
497 (package
498 (name "libotf")
9b9e7481 499 (version "0.9.16")
6ef0ec76
RJ
500 (source (origin
501 (method url-fetch)
6a703976
MW
502 (uri (string-append "mirror://savannah/m17n/libotf-"
503 version ".tar.gz"))
6ef0ec76 504 (sha256
9b9e7481 505 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
6ef0ec76 506 (build-system gnu-build-system)
48342a04
MB
507 (native-inputs
508 `(("pkg-config" ,pkg-config)))
6ef0ec76
RJ
509 (propagated-inputs
510 `(("freetype" ,freetype)))
340978d7 511 (home-page "https://www.nongnu.org/m17n/")
6ef0ec76
RJ
512 (synopsis "Library for handling OpenType Font")
513 (description "This library can read Open Type Layout Tables from an OTF
514file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
515GPOS. It can convert a Unicode character sequence to a glyph code sequence by
516using the above tables.")
517 (license license:lgpl2.0+)))
518
5277dbb0
EB
519(define-public libspiro
520 (package
521 (name "libspiro")
24950127 522 (version "0.5.20150702")
5277dbb0
EB
523 (source
524 (origin
525 (method url-fetch)
24950127
MB
526 (uri (string-append "https://github.com/fontforge/libspiro/releases"
527 "/download/" version "/libspiro-dist-" version ".tar.gz"))
5277dbb0
EB
528 (sha256
529 (base32
24950127 530 "153ckwj6h3wwlsgcppzqj8cymv1927hi8ar8fzpchq5q89cj2kai"))))
5277dbb0 531 (build-system gnu-build-system)
5277dbb0
EB
532 (synopsis "Clothoid to bezier conversion library")
533 (description
534 "Raph Levien's Spiro package as a library. A mechanism for drawing
535smooth contours with constant curvature at the spline joins.")
536 (license license:gpl2+)
537 (home-page "http://libspiro.sourceforge.net/")))
f945bf06
EB
538
539(define-public libuninameslist
540 (package
541 (name "libuninameslist")
e2791627 542 (version "20190701")
27b73b49 543 (home-page "https://github.com/fontforge/libuninameslist")
f945bf06
EB
544 (source
545 (origin
546 (method url-fetch)
27b73b49
MB
547 (uri (string-append home-page "/releases/download/" version
548 "/libuninameslist-dist-" version ".tar.gz"))
f945bf06
EB
549 (sha256
550 (base32
e2791627 551 "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn"))))
f945bf06 552 (build-system gnu-build-system)
f945bf06
EB
553 (synopsis "Unicode names and annotation list")
554 (description
555 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
556useful for programs that need Unicode \"Names\", \"Annotations\", and block
557definitions.")
b19c92ef
MB
558 ;; COPYING specifies GPL2, but according to LICENSE it only covers the
559 ;; configure script. The actual code is BSD-3, and the Unicode data
560 ;; is governed by an X11-style license only found on the web.
561 (license (list license:bsd-3
562 (license:x11-style
27b73b49 563 "https://www.unicode.org/copyright.html#License")))))
0c115d8c
EB
564
565(define-public fontforge
566 (package
567 (name "fontforge")
7670efef 568 (version "20190801")
0c115d8c
EB
569 (source (origin
570 (method url-fetch)
56586557
AE
571 (uri (string-append
572 "https://github.com/fontforge/fontforge/releases/download/"
5dd7bd12 573 version "/fontforge-" version ".tar.gz"))
3b08c873 574 (sha256
7670efef 575 (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"))))
0c115d8c 576 (build-system gnu-build-system)
56586557
AE
577 (native-inputs
578 `(("pkg-config" ,pkg-config)))
579 (inputs `(("cairo" ,cairo)
580 ("fontconfig" ,fontconfig) ;dlopen'd
581 ("freetype" ,freetype)
b94a6ca0 582 ("gettext" ,gettext-minimal)
0c115d8c
EB
583 ("libICE" ,libice)
584 ("libSM" ,libsm)
56586557
AE
585 ("libX11" ,libx11)
586 ("libXi" ,libxi)
587 ("libjpeg" ,libjpeg)
588 ("libltdl" ,libltdl)
589 ("libpng" ,libpng)
0c115d8c 590 ("libspiro" ,libspiro)
56586557 591 ("libtiff" ,libtiff)
de946028 592 ("libungif" ,libungif)
0c115d8c 593 ("libuninameslist" ,libuninameslist)
56586557
AE
594 ("libxft" ,libxft)
595 ("libxml2" ,libxml2)
0c115d8c 596 ("pango" ,pango)
56586557 597 ("potrace" ,potrace)
01a92a70 598 ("python" ,python)
56586557 599 ("zlib" ,zlib)))
0c115d8c 600 (arguments
c80f837a 601 '(#:phases
5ab869f9 602 (modify-phases %standard-phases
5ab869f9
EB
603 (add-after 'install 'set-library-path
604 (lambda* (#:key inputs outputs #:allow-other-keys)
605 (let ((out (assoc-ref outputs "out"))
606 (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
607 (wrap-program (string-append out "/bin/fontforge")
608 ;; Fontforge dynamically opens libraries.
609 `("LD_LIBRARY_PATH" ":" prefix
610 ,(map (lambda (input)
611 (string-append (assoc-ref inputs input)
612 "/lib"))
de946028 613 '("libtiff" "libjpeg" "libpng" "libungif"
5ab869f9
EB
614 "libxml2" "zlib" "libspiro" "freetype"
615 "pango" "cairo" "fontconfig")))
616 ;; Checks for potrace program at runtime
2f3f8ae0 617 `("PATH" ":" prefix (,potrace)))
5dd7bd12 618 #t))))))
0c115d8c
EB
619 (synopsis "Outline font editor")
620 (description
621 "FontForge allows you to create and modify postscript, truetype and
622opentype fonts. You can save fonts in many different outline formats, and
623generate bitmaps.")
56586557 624 (license license:gpl3+)
3ab8c224 625 (home-page "https://fontforge.github.io")))
427a51fd 626
627(define-public python2-ufolib
628 (package
629 (name "python2-ufolib")
a82bb552 630 (version "2.1.1")
427a51fd 631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "ufoLib" version ".zip"))
635 (sha256
a82bb552 636 (base32 "07qy6mx7z0wi9a30lc2hj5i9q1gnz1n8l40dmjz2c19mj9s6mz9l"))))
427a51fd 637 (build-system python-build-system)
638 (arguments
639 `(#:python ,python-2))
640 (propagated-inputs
641 `(("python2-fonttools" ,python2-fonttools)))
642 (native-inputs
643 `(("unzip" ,unzip)
e09bb8a4 644 ("python2-pytest" ,python2-pytest)
427a51fd 645 ("python2-pytest-runner" ,python2-pytest-runner)))
646 (home-page "https://github.com/unified-font-object/ufoLib")
647 (synopsis "Low-level UFO reader and writer")
648 (description
649 "UfoLib reads and writes Unified Font Object (UFO)
650files. UFO is a file format that stores fonts source files.")
651 (license license:bsd-3)))
3715aff5 652
653(define-public python2-defcon
654 (package
655 (name "python2-defcon")
e6d7686f 656 (version "0.3.5")
3715aff5 657 (source
658 (origin
659 (method url-fetch)
660 (uri (pypi-uri "defcon" version ".zip"))
661 (sha256
662 (base32
e6d7686f 663 "03jlm2gy9lvbwj68kfdm43yaddwd634jwkdg4wf0jxx2s8mwbg22"))))
3715aff5 664 (build-system python-build-system)
665 (arguments
666 `(#:python ,python-2))
667 (native-inputs
668 `(("unzip" ,unzip)
e09bb8a4 669 ("python2-pytest" ,python2-pytest)
3715aff5 670 ("python2-pytest-runner" ,python2-pytest-runner)))
671 (propagated-inputs
672 `(("python2-fonttools" ,python2-fonttools)
673 ("python2-ufolib" ,python2-ufolib)))
e85af137 674 (home-page "https://pypi.org/project/defcon/")
3715aff5 675 (synopsis "Flexible objects for representing @acronym{UFO, unified font object} data")
676 (description
677 "Defcon is a set of @acronym{UFO, unified font object} based objects
678optimized for use in font editing applications. The objects are built to
679be lightweight, fast and flexible. The objects are very bare-bones and
680they are not meant to be end-all, be-all objects. Rather, they are meant
681to provide base functionality so that you can focus on your application’s
682behavior, not object observing or maintaining cached data. Defcon
683implements UFO3 as described by the UFO font format.")
684 (license license:expat)))
20d2c6e7 685
686(define-public nototools
687 (package
688 (name "nototools")
689 (version "20170925")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (string-append "https://github.com/googlei18n/nototools/"
694 "archive/v2017-09-25-tooling-for-phase3-"
695 "update.tar.gz"))
696 (file-name (string-append name "-" version ".tar.gz"))
697 (sha256
698 (base32
699 "1pvacw18cm9l4sb66pqyjc7hc74xhhfxc7kd5ald8lixf4wzg0s8"))))
700 (build-system python-build-system)
701 (arguments
702 `(#:python ,python-2))
703 (propagated-inputs
704 `(("python2-booleanoperations" ,python2-booleanoperations)
705 ("python2-defcon" ,python2-defcon)
706 ("python2-fonttools" ,python2-fonttools)
707 ("python2-pillow" ,python2-pillow)
708 ("python2-pyclipper" ,python2-pyclipper)
709 ("python2-ufolib" ,python2-ufolib)))
710 (home-page "https://github.com/googlei18n/nototools")
711 (synopsis "Noto fonts support tools and scripts")
712 (description
713 "Nototools is a Python package containing Python scripts used to
714maintain the Noto Fonts project.")
715 (license (list license:asl2.0
716 ;; Sample texts are attributed to UN and OHCHR.
717 ;; The permissions on the UDHR are pretty lax:
718 ;; http://www.ohchr.org/EN/UDHR/Pages/Introduction.aspx
719 ;; "If UDHR translations or materials are reproduced, users
720 ;; should make reference to this website as a source by
721 ;; providing a link."
722 license:public-domain
723 (license:non-copyleft
724 "file://sample_texts/attributions.txt"
725 "See sample_texts/attributions.txt in the distribution.")))))
ad8aaf47
BD
726
727(define-public fontmanager
728 (package
729 (name "fontmanager")
3a5d1c9b 730 (version "0.7.7")
ad8aaf47
BD
731 (source
732 (origin
733 (method git-fetch)
734 (uri (git-reference
735 (url "https://github.com/FontManager/font-manager")
736 (commit version)))
737 (file-name (git-file-name name version))
738 (sha256
739 (base32
3a5d1c9b 740 "1bzqvspplp1zj0n0869jqbc60wgbjhf0vdrn5bj8dfawxynh8s5f"))))
ad8aaf47
BD
741 (build-system meson-build-system)
742 (arguments
743 `(#:glib-or-gtk? #t
744 #:build-type "release"
745 #:configure-flags
746 (list (string-append "-Dc_link_args=-Wl,-rpath="
747 (assoc-ref %outputs "out")
748 "/lib/font-manager"))))
749 (native-inputs
750 `(("pkg-config" ,pkg-config)
751 ("vala" ,vala)
752 ("yelp-tools" ,yelp-tools)
753 ("gettext" ,gettext-minimal)
754 ("glib" ,glib "bin")
755 ("gobject-introspection" ,gobject-introspection)
756 ("desktop-file-utils" ,desktop-file-utils)))
757 (inputs
758 `(("json-glib" ,json-glib)
759 ("sqlite-with-column-metadata" ,sqlite-with-column-metadata)
760 ("fonconfig" ,fontconfig)
761 ("freetype" ,freetype)
762 ("gtk+" ,gtk+)))
763 (home-page "https://fontmanager.github.io/")
764 (synopsis "Simple font management for GTK+ desktop environments")
765 (description "Font Manager is intended to provide a way for users to
766easily manage desktop fonts, without having to resort to command-line
767tools or editing configuration files by hand.
768While designed primarily with the GNOME Desktop Environment in mind, it should
769work well with other GTK+ desktop environments.")
770 (license license:gpl3+)))
cc51c03f
RJ
771
772(define-public fntsample
773 (package
774 (name "fntsample")
775 (version "5.3")
776 (source (origin
777 (method url-fetch)
778 (uri (string-append
779 "https://github.com/eugmes/fntsample/archive/release/"
780 version ".tar.gz"))
781 (file-name (string-append name "-" version ".tar.gz"))
782 (sha256
783 (base32
784 "0awp4dh1g40ivzvm5xqlvcpcdw1vplrx3drjmbylr62y185vbs74"))))
785 (build-system cmake-build-system)
786 (arguments
787 `(#:tests? #f ; There are no tests.
788 #:configure-flags
789 (list (string-append
790 "-DUNICODE_BLOCKS=" (assoc-ref %build-inputs "unicode-blocks")))
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'install 'set-library-path
794 (lambda* (#:key inputs outputs #:allow-other-keys)
795 (let* ((out (assoc-ref outputs "out"))
796 (pdf-api2 (assoc-ref inputs "perl-pdf-api2"))
797 (intl (assoc-ref inputs "perl-libintl-perl"))
798 (perllib (string-append pdf-api2
799 "/lib/perl5/site_perl/"
800 ,(package-version perl)
801 ":" intl
802 "/lib/perl5/site_perl/"
803 ,(package-version perl))))
804 (wrap-program (string-append out "/bin/pdfoutline")
805 `("PERL5LIB" ":" prefix (,perllib)))
806 #t))))))
807 (native-inputs
808 `(("pkg-config" ,pkg-config)
809 ("gettext" ,gettext-minimal)))
810 (inputs
811 `(("cairo" ,cairo)
812 ("fontconfig" ,fontconfig)
813 ("freetype" ,freetype)
814 ("glib" ,glib)
815 ("pango" ,pango)
816 ("perl-pdf-api2" ,perl-pdf-api2)
817 ("perl-libintl-perl" ,perl-libintl-perl)
818 ("unicode-blocks"
819 ,(origin
820 (method url-fetch)
821 (uri "https://unicode.org/Public/UNIDATA/Blocks.txt")
822 (file-name "unicode-blocks.txt")
823 (sha256
824 (base32
825 "1xs8fnhh48gs41wg004r7m4r2azh9khmyjjlnvyzy9c6zrd212x2"))))))
826 (home-page "https://github.com/eugmes/fntsample")
827 (synopsis "PDF and PostScript font samples generator")
828 (description "This package provides a tool that can be used to make font
829samples that show coverage of the font and are similar in appearance to
830Unicode Charts. It was developed for use with DejaVu Fonts project.")
831 (license license:gpl3+)))
a1797f32
NG
832
833(define-public libraqm
834 (package
835 (name "libraqm")
836 (version "0.7.0")
837 (source
838 (origin
839 (method url-fetch)
840 (uri (string-append "https://github.com/HOST-Oman/libraqm/"
841 "releases/download/v" version "/"
67c52503 842 "raqm-" version ".tar.gz"))
a1797f32
NG
843 (sha256
844 (base32 "0hgry3fj2y3qaq2fnmdgd93ixkk3ns5jds4vglkiv2jfvpn7b1g2"))))
845 (build-system gnu-build-system)
846 (arguments
847 `(#:configure-flags (list "--disable-static")))
848 (native-inputs
849 `(("gtk-doc" ,gtk-doc)
850 ("pkg-config" ,pkg-config)
851 ("python" ,python-wrapper)))
852 (inputs
853 `(("freetype" ,freetype)
854 ("fribidi" ,fribidi)
855 ("harfbuzz" ,harfbuzz)))
856 (home-page "https://github.com/HOST-Oman/libraqm")
857 (synopsis "Library for complex text layout")
858 (description
859 "Raqm is a small library that encapsulates the logic for complex text
860layout and provides a convenient API.
861
862It currently provides bidirectional text support (using FriBiDi),
863shaping (using HarfBuzz), and proper script itemization. As a result, Raqm
864can support most writing systems covered by Unicode.")
865 (license license:expat)))