>From e0c9fea99b69e252d99a4ecd3cb781135faaf79c Mon Sep 17 00:00:00 2001
From: Roel Janssen <r...@gnu.org>
Date: Tue, 17 Nov 2015 20:37:13 +0100
Subject: [PATCH] gnu: Add Mozilla Fira Mono font.

* gnu/packages/fonts.scm (font-fira): New variable.
---
 gnu/packages/fonts.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index cfdcac8..332b73c 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -35,6 +35,33 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages pkg-config))
 
+(define-public font-fira
+  (package
+    (name "font-fira")
+    (version "4.106")
+    (source (origin
+              (method url-fetch)
+              (uri "https://github.com/mozilla/Fira/raw/master/otf/FiraMono-Regular.otf";)
+              (sha256
+               (base32
+                "1v9cwhx9js9s3icyp09ici56m7vda9s9sm45s4p8bl83k95r10qp"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((font-dir (string-append %output
+                                                  "/share/fonts/opentype"))
+                         (source (assoc-ref %build-inputs "source")))
+                     (mkdir-p font-dir)
+                     (copy-file source
+                                (string-append font-dir "/" "fira.otf"))))))
+    (native-inputs `(("source" ,source)))
+    (home-page "http://mozilla.github.io/Fira/";)
+    (synopsis "Mozilla's monospace font")
+    (description "Mozilla's new typeface, used in Firefox OS.")
+    (license license:silofl1.1)))
+
 (define-public font-inconsolata
   (package
     (name "font-inconsolata")
-- 
2.5.0

Dear list,

Here is a patch for adding Mozilla's Fira monospaced font. I do have a
problem with it: Emacs doesn't recognize the font.

I would really like to know how I can fix this.

And how could I download other variants of the font in the same package?

Kind regards,
Roel

Reply via email to