summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorAlex Griffin <a@ajgrf.com>2017-05-31 11:51:41 -0500
committerArun Isaac <arunisaac@systemreboot.net>2017-06-01 20:38:18 +0530
commit532f09dff312089dfcfea0178edebbb435da3ff2 (patch)
treeb9d8f1cd000970960a43f30d839dd73c4c16c3b3 /gnu/packages
parentb963d8c2e549eeca2654e9e139f5835722a4ef9d (diff)
downloadguix-532f09dff312089dfcfea0178edebbb435da3ff2.tar.gz
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 <arunisaac@systemreboot.net>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/fonts.scm22
1 files changed, 19 insertions, 3 deletions
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 6fe44d90d1..cedf3573b6 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")