guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: font-comic-neue: Add fontconfig alias.


From: Arun Isaac
Subject: 02/02: gnu: font-comic-neue: Add fontconfig alias.
Date: Thu, 1 Jun 2017 11:11:53 -0400 (EDT)

arunisaac pushed a commit to branch master
in repository guix.

commit 532f09dff312089dfcfea0178edebbb435da3ff2
Author: Alex Griffin <address@hidden>
Date:   Wed May 31 11:51:41 2017 -0500

    gnu: font-comic-neue: Add fontconfig alias.
    
    * gnu/packages/fonts.scm (font-comic-neue): Add fontconfig alias for "Comic
    Sans MS".
    [arguments]: Add new 'install-conf' phase.
    
    Signed-off-by: Arun Isaac <address@hidden>
---
 gnu/packages/fonts.scm | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 6fe44d9..cedf357 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1121,9 +1121,25 @@ later hand-tweaked with the gbdfed(1) editor:
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-before 'install 'chdir
-           (lambda _
-             (chdir "Web")
+         (add-after 'install 'install-conf
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((conf-dir (string-append (assoc-ref outputs "out")
+                                            "/share/fontconfig/conf.avail")))
+               (mkdir-p conf-dir)
+               (call-with-output-file
+                   (string-append conf-dir "/30-comic-neue.conf")
+                 (lambda (port)
+                   (format port "<?xml version=\"1.0\"?>
+<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">
+<fontconfig>
+  <!-- If Comic Sans is missing, use Comic Neue instead. -->
+  <alias>
+    <family>Comic Sans MS</family>
+    <prefer>
+      <family>Comic Neue</family>
+    </prefer>
+  </alias>
+</fontconfig>\n"))))
              #t)))))
     (home-page "http://www.comicneue.com/";)
     (synopsis "Font that fixes the shortcomings of Comic Sans")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]