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