You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

169 lines
7.5 KiB

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