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