fontutils.scm 23 KB

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