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