| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
| 3 | ;;; |
| 4 | ;;; This file is part of GNU Guix. |
| 5 | ;;; |
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 7 | ;;; under the terms of the GNU General Public License as published by |
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 9 | ;;; your option) any later version. |
| 10 | ;;; |
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | ;;; GNU General Public License for more details. |
| 15 | ;;; |
| 16 | ;;; You should have received a copy of the GNU General Public License |
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 18 | |
| 19 | (define-module (gnu packages fontutils) |
| 20 | #:use-module (gnu packages) |
| 21 | #:use-module (gnu packages compression) |
| 22 | #:use-module (gnu packages pkg-config) |
| 23 | #:use-module (gnu packages xml) |
| 24 | #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:)) |
| 25 | #:use-module (guix packages) |
| 26 | #:use-module (guix download) |
| 27 | #:use-module (guix build-system gnu)) |
| 28 | |
| 29 | (define-public freetype |
| 30 | (package |
| 31 | (name "freetype") |
| 32 | (version "2.4.11") |
| 33 | (source (origin |
| 34 | (method url-fetch) |
| 35 | (uri (string-append "mirror://savannah/freetype/freetype-" |
| 36 | version ".tar.gz")) |
| 37 | (sha256 (base32 |
| 38 | "0gpcz6swir64kp0dk3rwgqqkmf48b90dqgczdmznjjryhrahx9r9")))) |
| 39 | (build-system gnu-build-system) |
| 40 | (arguments |
| 41 | `(#:phases |
| 42 | (alist-replace |
| 43 | 'install |
| 44 | (lambda* (#:key outputs #:allow-other-keys #:rest args) |
| 45 | (let ((install (assoc-ref %standard-phases 'install)) |
| 46 | (include (string-append (assoc-ref outputs "out") "/include"))) |
| 47 | (apply install args) |
| 48 | ;; Unravel one directory, since ft2build.h includes directly from |
| 49 | ;; freetype/, not freetype2/freetype; this is announced in the file |
| 50 | ;; to be changed in a future release. |
| 51 | (symlink (string-append include "/freetype2/freetype") |
| 52 | (string-append include "/freetype")))) |
| 53 | %standard-phases))) |
| 54 | (synopsis "Freetype, a library to render fonts") |
| 55 | (description |
| 56 | "Freetype is a library that can be used by applications to access the |
| 57 | contents of font files. It provides a uniform interface to access font files. |
| 58 | It supports both bitmap and scalable formats, including TrueType, OpenType, |
| 59 | Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed |
| 60 | anti-aliased glyph bitmap generation with 256 gray levels.") |
| 61 | (license license:freetype) ; some files have other licenses |
| 62 | (home-page "http://www.freetype.org/"))) |
| 63 | |
| 64 | (define-public fontconfig |
| 65 | (package |
| 66 | (name "fontconfig") |
| 67 | (version "2.10.93") |
| 68 | (source (origin |
| 69 | (method url-fetch) |
| 70 | (uri (string-append |
| 71 | "http://www.freedesktop.org/software/fontconfig/release/fontconfig-" |
| 72 | version ".tar.bz2")) |
| 73 | (sha256 (base32 |
| 74 | "172j5vsgx2xplsk5mrxrspbn5lrswq6gnxkxjgcrx0j8i0kiz47a")))) |
| 75 | (build-system gnu-build-system) |
| 76 | (inputs `(("expat" ,expat) |
| 77 | ("freetype" ,freetype) |
| 78 | ("pkg-config" ,pkg-config))) |
| 79 | (arguments |
| 80 | `(#:configure-flags |
| 81 | ;; point to user profile instead of /usr/share/fonts in /etc/fonts.conf |
| 82 | `("--with-default-fonts=~/.guix-profile/share/fonts"))) |
| 83 | (synopsis "Fontconfig, a library for configuring and customising font access.") |
| 84 | (description |
| 85 | "Fontconfig can discover new fonts when installed automatically; |
| 86 | perform font name substitution, so that appropriate alternative fonts can |
| 87 | be selected if fonts are missing; |
| 88 | identify the set of fonts required to completely cover a set of languages; |
| 89 | have GUI configuration tools built as it uses an XML-based configuration file; |
| 90 | efficiently and quickly find needed fonts among the set of installed fonts; |
| 91 | be used in concert with the X Render Extension and FreeType to implement |
| 92 | high quality, anti-aliased and subpixel rendered text on a display.") |
| 93 | ; The exact license is more X11-style than BSD-style. |
| 94 | (license (license:bsd-style "file://COPYING" |
| 95 | "See COPYING in the distribution.")) |
| 96 | (home-page "http://www.freedesktop.org/wiki/Software/fontconfig"))) |
| 97 | |
| 98 | (define-public t1lib |
| 99 | (package |
| 100 | (name "t1lib") |
| 101 | (version "5.1.2") |
| 102 | (source (origin |
| 103 | (method url-fetch) |
| 104 | (uri "ftp://sunsite.unc.edu/pub/Linux/libs/graphics/t1lib-5.1.2.tar.gz") |
| 105 | (sha256 (base32 |
| 106 | "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2")))) |
| 107 | (build-system gnu-build-system) |
| 108 | (arguments |
| 109 | ;; Making the documentation requires latex, but t1lib is also an input |
| 110 | ;; for building texlive. |
| 111 | `(#:tests? #f ; no test target |
| 112 | #:make-flags |
| 113 | '("without_doc"))) |
| 114 | (synopsis "T1lib, a library for generating bitmaps from type 1 fonts.") |
| 115 | (description |
| 116 | "T1lib is a library for generating/rasterising bitmaps from Type 1 fonts. |
| 117 | It is based on the code of the X11 rasteriser of the X11 project. |
| 118 | |
| 119 | The bitmaps created by t1lib are returned in a data structure with type |
| 120 | GLYPH. This special GLYPH-type is also used in the X11 window system to |
| 121 | describe character bitmaps. It contains the bitmap data as well as some |
| 122 | metric information. But t1lib is in itself entirely independent of the |
| 123 | X11-system or any other graphical user interface. ") |
| 124 | (license license:gpl2) |
| 125 | (home-page "http://www.t1lib.org/"))) |
| 126 | |
| 127 | (define-public teckit |
| 128 | (package |
| 129 | (name "teckit") |
| 130 | (version "2.5.1") |
| 131 | (source (origin |
| 132 | (method url-fetch) |
| 133 | (uri (string-append |
| 134 | "http://scripts.sil.org/svn-view/teckit/TAGS/TECkit_" |
| 135 | (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) |
| 136 | ".tar.gz")) |
| 137 | (sha256 (base32 |
| 138 | "0fjiwvic8mdxpkyccfp7zh26y9xnvkp0skqbyfkrjiacd191k82r")))) |
| 139 | (build-system gnu-build-system) |
| 140 | (inputs `(("patch/teckit" ,(search-patch "teckit-cstdio.patch")) |
| 141 | ("zlib" ,zlib))) |
| 142 | (arguments |
| 143 | `(#:patches (list (assoc-ref %build-inputs "patch/teckit")))) |
| 144 | (synopsis "TECkit, a toolkit for encoding conversions") |
| 145 | (description |
| 146 | "TECkit is a low-level toolkit intended to be used by other applications |
| 147 | that need to perform encoding conversions (e.g., when importing legacy data |
| 148 | into a Unicode-based application). The primary component of the TECkit |
| 149 | package is therefore a library that performs conversions; this is the |
| 150 | \"TECkit engine\". The engine relies on mapping tables in a specific binary |
| 151 | format (for which documentation is available); there is a compiler that |
| 152 | creates such tables from a human-readable mapping description (a simple |
| 153 | text file). |
| 154 | |
| 155 | To facilitate the development and testing of mapping tables for TECkit, |
| 156 | several applications are also included in the current package; these |
| 157 | include simple tools for applying conversions to plain-text and Standard |
| 158 | Format files, as well as both command-line and simple GUI versions of the |
| 159 | TECkit compiler. However, it is not intended that these tools will be the |
| 160 | primary means by which end users perform conversions, and they have not |
| 161 | been designed, tested, and debugged to the extent that general-purpose |
| 162 | applications should be.") |
| 163 | (license license:lgpl2.1+) |
| 164 | (home-page "http://scripts.sil.org/cms/scripts/page.php?cat_id=teckit"))) |