all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add ttf-dejavu
@ 2014-02-16  3:46 Mark H Weaver
  2014-02-16 21:14 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Mark H Weaver @ 2014-02-16  3:46 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

Hello all,

This font is derived from Bitstream Vera but includes glyphs for more
languages and also includes a serif font family.  The latin sans-serif
and monospace is the same as Bitstream Vera, or at least I'm not aware
of any difference.  It's a drop-in replacement with no downsides.

If you install this, I suggest that you remove the ttf-bitstream-vera
package at the same time, so that generic font names such as "Monospace"
will henceforth refer to DejaVu.  Emacs users will notice a big
improvement in the look of many of the non-latin character sets, as
demonstrated on the HELLO page (C-h h).

Note that you must run "fc-cache -fv" after installing this package to
rebuild your font cache, and Emacs won't pick it up until it is
restarted.

I haven't pushed this yet.  Comments and suggestions welcome.

      Mark



[-- Attachment #2: [PATCH] gnu: Add ttf-dejavu --]
[-- Type: text/x-patch, Size: 4379 bytes --]

From c1efb6a23eb6c55537b7f397dfe327fa882f5ef7 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sat, 15 Feb 2014 20:32:57 -0500
Subject: [PATCH] gnu: Add ttf-dejavu.

* gnu/packages/fonts.scm (ttf-dejavu): New variable.
---
 gnu/packages/fonts.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index c367a46..8ec59e4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,72 @@
                 #:select (tar))
   #:use-module (gnu packages compression))
 
+(define-public ttf-dejavu
+  (package
+    (name "ttf-dejavu")
+    (version "2.34")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://sourceforge/dejavu/"
+                                 version "/dejavu-fonts-ttf-"
+                                 version ".tar.bz2"))
+             (sha256
+              (base32
+               "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+
+                   (let ((tar      (string-append (assoc-ref %build-inputs
+                                                             "tar")
+                                                  "/bin/tar"))
+                         (PATH     (string-append (assoc-ref %build-inputs
+                                                             "bzip2")
+                                                  "/bin"))
+                         (font-dir (string-append
+                                    %output "/share/fonts/truetype"))
+                         (conf-dir (string-append
+                                    %output "/share/fontconfig/conf.avail"))
+                         (doc-dir  (string-append
+                                    %output "/share/doc/" ,name "-" ,version)))
+                     (setenv "PATH" PATH)
+                     (system* tar "xvf" (assoc-ref %build-inputs "source"))
+
+                     (mkdir-p font-dir)
+                     (mkdir-p conf-dir)
+                     (mkdir-p doc-dir)
+                     (chdir (string-append "dejavu-fonts-ttf-" ,version))
+                     (for-each (lambda (ttf)
+                                 (copy-file ttf
+                                            (string-append font-dir "/"
+                                                           (basename ttf))))
+                               (find-files "ttf" "\\.ttf$"))
+                     (for-each (lambda (conf)
+                                 (copy-file conf
+                                            (string-append conf-dir "/"
+                                                           (basename conf))))
+                               (find-files "fontconfig" "\\.conf$"))
+                     (for-each (lambda (doc)
+                                 (copy-file doc
+                                            (string-append doc-dir "/"
+                                                           (basename doc))))
+                               (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
+    (native-inputs `(("source" ,source)
+                     ("tar" ,tar)
+                     ("bzip2" ,bzip2)))
+    (home-page "http://dejavu-fonts.org/")
+    (synopsis "Vera font family derivate with additional characters")
+    (description "DejaVu provides an expanded version of the Vera font family
+aiming for quality and broader Unicode coverage while retaining the original
+Vera style.  DejaVu currently works towards conformance with the Multilingual
+European Standards (MES-1 and MES-2) for Unicode coverage.  The DejaVu fonts
+provide serif, sans and monospaced variants.")
+    (license
+     (license:x11-style
+      "http://dejavu-fonts.org/"))))
+
 (define-public ttf-bitstream-vera
   (package
     (name "ttf-bitstream-vera")
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: Add ttf-dejavu
  2014-02-16  3:46 [PATCH] gnu: Add ttf-dejavu Mark H Weaver
@ 2014-02-16 21:14 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-02-16 21:14 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> From c1efb6a23eb6c55537b7f397dfe327fa882f5ef7 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Sat, 15 Feb 2014 20:32:57 -0500
> Subject: [PATCH] gnu: Add ttf-dejavu.
>
> * gnu/packages/fonts.scm (ttf-dejavu): New variable.

Excellent.  Please push!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-16 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-16  3:46 [PATCH] gnu: Add ttf-dejavu Mark H Weaver
2014-02-16 21:14 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.