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 ;;; Copyright © 2017 ng0 <ng0@n0.is>
9 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
12 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
13 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
14 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages fontutils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages gettext)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages python-xyz)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gperf)
48 #:use-module (gnu packages xorg)
49 #:use-module (gnu packages fribidi)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages xml)
52 #:use-module (gnu packages sqlite)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages freedesktop)
55 #:use-module ((guix licenses) #:prefix license:)
56 #:use-module (guix packages)
57 #:use-module (guix download)
58 #:use-module (guix svn-download)
59 #:use-module (guix git-download)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system gnu)
62 #:use-module (guix build-system python)
63 #:use-module (guix build-system meson))
65 (define-public freetype
71 (uri (string-append "mirror://savannah/freetype/freetype-"
74 "0vx2dg1jh5kq34dd6ifpjywkpapp8a7p1bvyq9yq5zi1i94gmnqn"))))
75 (build-system gnu-build-system)
77 ;; The use of "freetype-config" is deprecated, but other packages still
79 `(#:configure-flags (list "--enable-freetype-config")))
81 `(("pkg-config" ,pkg-config)))
83 ;; These are all in the Requires.private field of freetype2.pc.
87 (synopsis "Font rendering library")
89 "Freetype is a library that can be used by applications to access the
90 contents of font files. It provides a uniform interface to access font files.
91 It supports both bitmap and scalable formats, including TrueType, OpenType,
92 Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
93 anti-aliased glyph bitmap generation with 256 gray levels.")
94 (license license:freetype) ; some files have other licenses
95 (home-page "https://www.freetype.org/")))
97 (define-public ttfautohint
104 (uri (string-append "mirror://savannah/freetype/ttfautohint-"
108 "1lgghck46p33z3hg8dnl76jryig4fh6d8rhzms837zp7x4hyfkv4"))
109 (patches (list (search-patch "ttfautohint-source-date-epoch.patch")))))
110 (build-system gnu-build-system)
114 ("pkg-config" ,pkg-config)))
116 `(("freetype" ,freetype)
117 ("harfbuzz" ,harfbuzz)))
119 `(#:configure-flags '("--with-qt=no"))) ;no gui
120 (synopsis "Automated font hinting")
122 "ttfautohint provides a 99% automated hinting process and a platform for
123 finely hand-hinting the last 1%. It is ideal for web fonts and supports many
125 (license (list license:gpl2+ license:freetype)) ;choose one or the other
126 (home-page "https://www.freetype.org/ttfautohint/")))
128 (define-public woff-tools
131 (version "2009.10.04")
135 ;; Upstream source is unversioned, so use Debian's versioned tarball
136 (uri (string-append "mirror://debian/pool/main/w/woff-tools/"
137 "woff-tools_" version ".orig.tar.gz"))
138 (file-name (string-append name "-" version ".tar.gz"))
141 "1i97gkqa6jfzlslsngqf556kx60knlgf7yc9pzsq2pizc6f0d4zl"))))
142 (build-system gnu-build-system)
146 `(#:make-flags '("CC=gcc")
147 #:tests? #f ;no tests
149 (modify-phases %standard-phases
150 (delete 'configure) ;no configuration
152 (lambda* (#:key outputs #:allow-other-keys)
153 (let* ((out (assoc-ref outputs "out"))
154 (bin (string-append out "/bin")))
155 (install-file "sfnt2woff" bin)
156 (install-file "woff2sfnt" bin)))))))
157 (synopsis "Convert between OpenType and WOFF fonts")
159 "This package provides two tools:
162 Converts OpenType fonts to WOFF fonts
164 Converts WOFF fonts to OpenType fonts
166 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))
167 (home-page "https://people.mozilla.com/~jkew/woff/")))
169 (define-public ttf2eot
177 (url "https://github.com/wget/ttf2eot.git")
178 (commit (string-append "v" version))))
179 (file-name (git-file-name name version))
182 "0l2yh2ialx7135pjzhjs204kk3br7zxjr09zwaia493by2adzigr"))
183 (patches (list (search-patch "ttf2eot-cstddef.patch")))))
184 (build-system gnu-build-system)
186 `(#:tests? #f ; no tests
188 (modify-phases %standard-phases
189 (delete 'configure) ; no configuration
190 (replace 'install ; no install target
191 (lambda* (#:key outputs #:allow-other-keys)
192 (let* ((out (assoc-ref outputs "out"))
193 (bin (string-append out "/bin")))
194 (install-file "ttf2eot" bin)
196 (synopsis "Convert from TrueType to Embeddable Open Type")
198 "This package contains a commandline wrapper around OpenTypeUtilities.cpp
199 from Chromium, used to make EOT (Embeddable Open Type) files from
200 TTF (TrueType/OpenType Font) files.")
201 ;; While the README states "License: Derived from WebKit, so BSD/LGPL
202 ;; 2/LGPL 2.1", the single derived source file includes only BSD in its
203 ;; license header, and the wrapper source contains no license header.
204 (license license:bsd-2)
205 (home-page "https://github.com/wget/ttf2eot")))
207 (define-public ttf2pt1
213 (uri (string-append "mirror://sourceforge/ttf2pt1/ttf2pt1/"
214 version "/ttf2pt1-" version ".tgz"))
217 "1l718n4k4widx49xz7qrj4mybzb8q67kp2jw7f47604ips4654mf"))
218 (modules '((guix build utils)))
221 ;; Remove trailing backslashes in the sed expression of the
222 ;; 'install' rule since sed would otherwise fail.
223 (substitute* "Makefile"
224 (("\\|;\\\\[[:space:]]*$") "|; "))
226 (build-system gnu-build-system)
228 '(#:tests? #f ;no tests
229 #:phases (modify-phases %standard-phases
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (substitute* "Makefile"
235 (string-append "INSTDIR = " out "\n"))
237 "OWNER = `id -un`\n")
239 "GROUP = `id -g`\n"))
244 (number->string (parallel-job-count))
246 (inputs `(("perl" ,perl)))
247 (synopsis "Convert TrueType fonts to Postscript Type 1")
249 "TTF2PT1 provides tools to convert most TrueType fonts (or other formats
250 supported by the FreeType library) to an Adobe Type 1 @file{.pfa} or
251 @file{.pfb} file. Another use is as a hinting engine: feed it an unhinted or
252 poorly hinted Adobe Type 1 font through the FreeType library and get it back
253 with freshly generated hints. The files produced by default are in
254 human-readable form, which further needs to be encoded with t1utilities to
255 work with most software requiring Type 1 fonts.")
256 (home-page "http://ttf2pt1.sourceforge.net/")
257 (license license:bsd-3)))
260 (let ((commit "4e698b8c6c5e070d53c340db9ddf160e21070ede")
264 (version (string-append "20160306-" revision "."
265 (string-take commit 7)))
269 (url "https://github.com/google/woff2.git")
271 (file-name (string-append name "-" version ".tar.xz"))
274 "0wka0yhf0cjmd4rv2jckxpyv6lb5ckj4nj0k1ajq5hrjy7f30lcp"))
275 (patches (list (search-patch "woff2-libbrotli.patch")))))
276 (build-system gnu-build-system)
278 `(("pkg-config" ,pkg-config)))
280 `(("brotli" ,brotli)))
282 `(#:tests? #f ;no tests
283 #:phases (modify-phases %standard-phases
286 (lambda* (#:key outputs #:allow-other-keys)
287 (let* ((out (assoc-ref outputs "out"))
288 (bin (string-append out "/bin")))
289 (install-file "woff2_compress" bin)
290 (install-file "woff2_decompress" bin)
292 (synopsis "Compress TrueType fonts to WOFF2")
294 "This package provides utilities for compressing/decompressing TrueType
295 fonts to/from the WOFF2 format.")
296 (license license:asl2.0)
297 (home-page "https://github.com/google/woff2"))))
299 (define-public fontconfig
306 "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
309 "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
310 (build-system gnu-build-system)
311 ;; In Requires or Requires.private of fontconfig.pc.
312 (propagated-inputs `(("expat" ,expat)
313 ("freetype" ,freetype)
314 ("libuuid" ,util-linux)))
315 (inputs `(("gs-fonts" ,gs-fonts)))
318 ("pkg-config" ,pkg-config)))
321 (list "--with-cache-dir=/var/cache/fontconfig"
322 ;; register gs-fonts as default fonts
323 (string-append "--with-default-fonts="
324 (assoc-ref %build-inputs "gs-fonts")
327 ;; Register fonts from user and system profiles.
328 (string-append "--with-add-fonts="
329 "~/.guix-profile/share/fonts,"
330 "/run/current-system/profile/share/fonts")
332 ;; python is not actually needed
335 (modify-phases %standard-phases
338 ;; Don't try to create /var/cache/fontconfig.
339 (invoke "make" "install"
340 "fc_cachedir=$(TMPDIR)"
341 "RUN_FC_CACHE_TEST=false"))))))
342 (synopsis "Library for configuring and customizing font access")
344 "Fontconfig can discover new fonts when installed automatically;
345 perform font name substitution, so that appropriate alternative fonts can
346 be selected if fonts are missing;
347 identify the set of fonts required to completely cover a set of languages;
348 have GUI configuration tools built as it uses an XML-based configuration file;
349 efficiently and quickly find needed fonts among the set of installed fonts;
350 be used in concert with the X Render Extension and FreeType to implement
351 high quality, anti-aliased and subpixel rendered text on a display.")
352 ; The exact license is more X11-style than BSD-style.
353 (license (license:non-copyleft "file://COPYING"
354 "See COPYING in the distribution."))
355 (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))
363 (uri (list (string-append "ftp://sunsite.unc.edu/pub/Linux/libs/"
364 "graphics/" name "-" version ".tar.gz")
365 (string-append "https://fossies.org/linux/misc/old/"
366 name "-" version ".tar.gz")))
368 "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2"))
369 (patches (search-patches
370 "t1lib-CVE-2010-2642.patch" ; 2011-0443, 2011-5244
371 "t1lib-CVE-2011-0764.patch"
372 "t1lib-CVE-2011-1552+.patch")))) ; 2011-1553, 2011-1554
373 (properties `((lint-hidden-cve . ("CVE-2011-0433"
377 (build-system gnu-build-system)
379 ;; Making the documentation requires latex, but t1lib is also an input
380 ;; for building texlive.
381 `(#:tests? #f ; no test target
384 (synopsis "Library for generating bitmaps from Type 1 fonts")
386 "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts.
387 It is based on the code of the X11 rasteriser of the X11 project.
389 The bitmaps created by t1lib are returned in a data structure with type
390 GLYPH. This special GLYPH-type is also used in the X11 window system to
391 describe character bitmaps. It contains the bitmap data as well as some
392 metric information. But t1lib is in itself entirely independent of the
393 X11-system or any other graphical user interface.")
394 (license license:gpl2)
395 (home-page "http://www.t1lib.org/")))
397 (define-public teckit
400 (version "2.5.9") ;signed by key 0xC9183BEA0288CDEE
404 (uri (string-append "https://github.com/silnrsi/teckit/releases/"
405 "download/v" version "/teckit-" version ".tar.gz"))
407 (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8"))))
408 (build-system gnu-build-system)
413 `(("perl" ,perl))) ;for the tests
414 (synopsis "Toolkit for encoding conversions")
416 "TECkit is a low-level toolkit intended to be used by other applications
417 that need to perform encoding conversions (e.g., when importing legacy data
418 into a Unicode-based application). The primary component of the TECkit
419 package is therefore a library that performs conversions; this is the
420 \"TECkit engine\". The engine relies on mapping tables in a specific binary
421 format (for which documentation is available); there is a compiler that
422 creates such tables from a human-readable mapping description (a simple
425 To facilitate the development and testing of mapping tables for TECkit,
426 several applications are also included in the current package; these
427 include simple tools for applying conversions to plain-text and Standard
428 Format files, as well as both command-line and simple GUI versions of the
429 TECkit compiler. However, it is not intended that these tools will be the
430 primary means by which end users perform conversions, and they have not
431 been designed, tested, and debugged to the extent that general-purpose
432 applications should be.")
433 (license license:lgpl2.1+)
434 (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit")))
436 (define-public graphite2
443 (uri (string-append "https://github.com/silnrsi/graphite/releases/"
444 "download/" version "/" name "-" version ".tgz"))
447 "01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
448 (build-system cmake-build-system)
450 `(#:phases (modify-phases %standard-phases
451 (add-after 'unpack 'adjust-test-PYTHONPATH
453 ;; Tell the build system not to override PYTHONPATH
454 ;; while running the Python tests.
455 (substitute* "Graphite.cmake"
456 (("ENVIRONMENT PYTHONPATH=")
457 (string-append "ENVIRONMENT PYTHONPATH="
458 (getenv "PYTHONPATH") ":")))
462 ("python-fonttools" ,python-fonttools)))
464 `(("freetype" ,freetype)))
465 (synopsis "Reimplementation of the SIL Graphite text processing engine")
467 "Graphite2 is a reimplementation of the SIL Graphite text processing
468 engine. Graphite is a smart font technology designed to facilitate the
469 process known as shaping. This process takes an input Unicode text string
470 and returns a sequence of positioned glyphids from the font.")
471 (license license:lgpl2.1+)
472 (home-page "https://github.com/silnrsi/graphite")))
474 (define-public potrace
481 (uri (string-append "mirror://sourceforge/potrace/" version
482 "/potrace-" version ".tar.gz"))
485 "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))
486 (patches (search-patches "potrace-tests.patch"))))
487 (build-system gnu-build-system)
488 (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
489 (inputs `(("zlib" ,zlib)))
492 `("--with-libpotrace"))) ; install library and headers
493 (synopsis "Transform bitmaps into vector graphics")
495 "Potrace is a tool for tracing a bitmap, which means, transforming a
496 bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM,
497 or BMP format), and the default output is an encapsulated PostScript
498 file (EPS). A typical use is to create EPS files from scanned data, such as
499 company or university logos, handwritten notes, etc. The resulting image is
500 not \"jaggy\" like a bitmap, but smooth. It can then be rendered at any
502 (license license:gpl2+)
503 (home-page "http://potrace.sourceforge.net/")))
505 (define-public libotf
511 (uri (string-append "mirror://savannah/m17n/libotf-"
514 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
515 (build-system gnu-build-system)
517 `(("pkg-config" ,pkg-config)))
519 `(("freetype" ,freetype)))
520 (home-page "https://www.nongnu.org/m17n/")
521 (synopsis "Library for handling OpenType Font")
522 (description "This library can read Open Type Layout Tables from an OTF
523 file. Currently these tables are supported; head, name, cmap, GDEF, GSUB, and
524 GPOS. It can convert a Unicode character sequence to a glyph code sequence by
525 using the above tables.")
526 (license license:lgpl2.0+)))
528 (define-public libspiro
531 (version "0.5.20150702")
535 (uri (string-append "https://github.com/fontforge/libspiro/releases"
536 "/download/" version "/libspiro-dist-" version ".tar.gz"))
539 "153ckwj6h3wwlsgcppzqj8cymv1927hi8ar8fzpchq5q89cj2kai"))))
540 (build-system gnu-build-system)
541 (synopsis "Clothoid to bezier conversion library")
543 "Raph Levien's Spiro package as a library. A mechanism for drawing
544 smooth contours with constant curvature at the spline joins.")
545 (license license:gpl2+)
546 (home-page "http://libspiro.sourceforge.net/")))
548 (define-public libuninameslist
550 (name "libuninameslist")
552 (home-page "https://github.com/fontforge/libuninameslist")
556 (uri (string-append home-page "/releases/download/" version
557 "/libuninameslist-dist-" version ".tar.gz"))
560 "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn"))))
561 (build-system gnu-build-system)
562 (synopsis "Unicode names and annotation list")
564 "LibUniNamesList holds www.unicode.org Nameslist.txt data which can be
565 useful for programs that need Unicode \"Names\", \"Annotations\", and block
567 ;; COPYING specifies GPL2, but according to LICENSE it only covers the
568 ;; configure script. The actual code is BSD-3, and the Unicode data
569 ;; is governed by an X11-style license only found on the web.
570 (license (list license:bsd-3
572 "https://www.unicode.org/copyright.html#License")))))
574 (define-public fontforge
581 "https://github.com/fontforge/fontforge/releases/download/"
582 version "/fontforge-" version ".tar.gz"))
584 (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r"))))
585 (build-system gnu-build-system)
587 `(("pkg-config" ,pkg-config)))
588 (inputs `(("cairo" ,cairo)
589 ("fontconfig" ,fontconfig) ;dlopen'd
590 ("freetype" ,freetype)
591 ("gettext" ,gettext-minimal)
599 ("libspiro" ,libspiro)
601 ("libungif" ,libungif)
602 ("libuninameslist" ,libuninameslist)
611 (modify-phases %standard-phases
612 (add-after 'install 'set-library-path
613 (lambda* (#:key inputs outputs #:allow-other-keys)
614 (let ((out (assoc-ref outputs "out"))
615 (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
616 (wrap-program (string-append out "/bin/fontforge")
617 ;; Fontforge dynamically opens libraries.
618 `("LD_LIBRARY_PATH" ":" prefix
619 ,(map (lambda (input)
620 (string-append (assoc-ref inputs input)
622 '("libtiff" "libjpeg" "libpng" "libungif"
623 "libxml2" "zlib" "libspiro" "freetype"
624 "pango" "cairo" "fontconfig")))
625 ;; Checks for potrace program at runtime
626 `("PATH" ":" prefix (,potrace)))
628 (synopsis "Outline font editor")
630 "FontForge allows you to create and modify postscript, truetype and
631 opentype fonts. You can save fonts in many different outline formats, and
633 (license license:gpl3+)
634 (home-page "https://fontforge.github.io")))
636 (define-public python2-ufolib
638 (name "python2-ufolib")
643 (uri (pypi-uri "ufoLib" version ".zip"))
645 (base32 "07qy6mx7z0wi9a30lc2hj5i9q1gnz1n8l40dmjz2c19mj9s6mz9l"))))
646 (build-system python-build-system)
648 `(#:python ,python-2))
650 `(("python2-fonttools" ,python2-fonttools)))
653 ("python2-pytest" ,python2-pytest)
654 ("python2-pytest-runner" ,python2-pytest-runner)))
655 (home-page "https://github.com/unified-font-object/ufoLib")
656 (synopsis "Low-level UFO reader and writer")
658 "UfoLib reads and writes Unified Font Object (UFO)
659 files. UFO is a file format that stores fonts source files.")
660 (license license:bsd-3)))
662 (define-public python2-defcon
664 (name "python2-defcon")
669 (uri (pypi-uri "defcon" version ".zip"))
672 "03jlm2gy9lvbwj68kfdm43yaddwd634jwkdg4wf0jxx2s8mwbg22"))))
673 (build-system python-build-system)
675 `(#:python ,python-2))
678 ("python2-pytest" ,python2-pytest)
679 ("python2-pytest-runner" ,python2-pytest-runner)))
681 `(("python2-fonttools" ,python2-fonttools)
682 ("python2-ufolib" ,python2-ufolib)))
683 (home-page "https://pypi.org/project/defcon/")
684 (synopsis "Flexible objects for representing @acronym{UFO, unified font object} data")
686 "Defcon is a set of @acronym{UFO, unified font object} based objects
687 optimized for use in font editing applications. The objects are built to
688 be lightweight, fast and flexible. The objects are very bare-bones and
689 they are not meant to be end-all, be-all objects. Rather, they are meant
690 to provide base functionality so that you can focus on your application’s
691 behavior, not object observing or maintaining cached data. Defcon
692 implements UFO3 as described by the UFO font format.")
693 (license license:expat)))
695 (define-public nototools
702 (uri (string-append "https://github.com/googlei18n/nototools/"
703 "archive/v2017-09-25-tooling-for-phase3-"
705 (file-name (string-append name "-" version ".tar.gz"))
708 "1pvacw18cm9l4sb66pqyjc7hc74xhhfxc7kd5ald8lixf4wzg0s8"))))
709 (build-system python-build-system)
711 `(#:python ,python-2))
713 `(("python2-booleanoperations" ,python2-booleanoperations)
714 ("python2-defcon" ,python2-defcon)
715 ("python2-fonttools" ,python2-fonttools)
716 ("python2-pillow" ,python2-pillow)
717 ("python2-pyclipper" ,python2-pyclipper)
718 ("python2-ufolib" ,python2-ufolib)))
719 (home-page "https://github.com/googlei18n/nototools")
720 (synopsis "Noto fonts support tools and scripts")
722 "Nototools is a Python package containing Python scripts used to
723 maintain the Noto Fonts project.")
724 (license (list license:asl2.0
725 ;; Sample texts are attributed to UN and OHCHR.
726 ;; The permissions on the UDHR are pretty lax:
727 ;; http://www.ohchr.org/EN/UDHR/Pages/Introduction.aspx
728 ;; "If UDHR translations or materials are reproduced, users
729 ;; should make reference to this website as a source by
730 ;; providing a link."
731 license:public-domain
732 (license:non-copyleft
733 "file://sample_texts/attributions.txt"
734 "See sample_texts/attributions.txt in the distribution.")))))
736 (define-public fontmanager
744 (url "https://github.com/FontManager/font-manager")
746 (file-name (git-file-name name version))
749 "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g"))))
750 (build-system meson-build-system)
753 #:build-type "release"
755 (list (string-append "-Dc_link_args=-Wl,-rpath="
756 (assoc-ref %outputs "out")
757 "/lib/font-manager"))))
759 `(("pkg-config" ,pkg-config)
761 ("yelp-tools" ,yelp-tools)
762 ("gettext" ,gettext-minimal)
764 ("gobject-introspection" ,gobject-introspection)
765 ("desktop-file-utils" ,desktop-file-utils)))
767 `(("json-glib" ,json-glib)
768 ("sqlite-with-column-metadata" ,sqlite-with-column-metadata)
769 ("fonconfig" ,fontconfig)
770 ("freetype" ,freetype)
772 (home-page "https://fontmanager.github.io/")
773 (synopsis "Simple font management for GTK+ desktop environments")
774 (description "Font Manager is intended to provide a way for users to
775 easily manage desktop fonts, without having to resort to command-line
776 tools or editing configuration files by hand.
777 While designed primarily with the GNOME Desktop Environment in mind, it should
778 work well with other GTK+ desktop environments.")
779 (license license:gpl3+)))
781 (define-public fntsample
788 "https://github.com/eugmes/fntsample/archive/release/"
790 (file-name (string-append name "-" version ".tar.gz"))
793 "0awp4dh1g40ivzvm5xqlvcpcdw1vplrx3drjmbylr62y185vbs74"))))
794 (build-system cmake-build-system)
796 `(#:tests? #f ; There are no tests.
799 "-DUNICODE_BLOCKS=" (assoc-ref %build-inputs "unicode-blocks")))
801 (modify-phases %standard-phases
802 (add-after 'install 'set-library-path
803 (lambda* (#:key inputs outputs #:allow-other-keys)
804 (let* ((out (assoc-ref outputs "out"))
805 (pdf-api2 (assoc-ref inputs "perl-pdf-api2"))
806 (intl (assoc-ref inputs "perl-libintl-perl"))
807 (perllib (string-append pdf-api2
808 "/lib/perl5/site_perl/"
809 ,(package-version perl)
811 "/lib/perl5/site_perl/"
812 ,(package-version perl))))
813 (wrap-program (string-append out "/bin/pdfoutline")
814 `("PERL5LIB" ":" prefix (,perllib)))
817 `(("pkg-config" ,pkg-config)
818 ("gettext" ,gettext-minimal)))
821 ("fontconfig" ,fontconfig)
822 ("freetype" ,freetype)
825 ("perl-pdf-api2" ,perl-pdf-api2)
826 ("perl-libintl-perl" ,perl-libintl-perl)
830 (uri "https://unicode.org/Public/UNIDATA/Blocks.txt")
831 (file-name "unicode-blocks.txt")
834 "1xs8fnhh48gs41wg004r7m4r2azh9khmyjjlnvyzy9c6zrd212x2"))))))
835 (home-page "https://github.com/eugmes/fntsample")
836 (synopsis "PDF and PostScript font samples generator")
837 (description "This package provides a tool that can be used to make font
838 samples that show coverage of the font and are similar in appearance to
839 Unicode Charts. It was developed for use with DejaVu Fonts project.")
840 (license license:gpl3+)))
842 (define-public libraqm
849 (uri (string-append "https://github.com/HOST-Oman/libraqm/"
850 "releases/download/v" version "/"
851 "raqm-" version ".tar.gz"))
853 (base32 "0hgry3fj2y3qaq2fnmdgd93ixkk3ns5jds4vglkiv2jfvpn7b1g2"))))
854 (build-system gnu-build-system)
856 `(#:configure-flags (list "--disable-static")))
858 `(("gtk-doc" ,gtk-doc)
859 ("pkg-config" ,pkg-config)
860 ("python" ,python-wrapper)))
862 `(("freetype" ,freetype)
864 ("harfbuzz" ,harfbuzz)))
865 (home-page "https://github.com/HOST-Oman/libraqm")
866 (synopsis "Library for complex text layout")
868 "Raqm is a small library that encapsulates the logic for complex text
869 layout and provides a convenient API.
871 It currently provides bidirectional text support (using FriBiDi),
872 shaping (using HarfBuzz), and proper script itemization. As a result, Raqm
873 can support most writing systems covered by Unicode.")
874 (license license:expat)))