unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add Mozilla Fira Mono font.
@ 2015-11-17 20:04 Roel Janssen
  2015-11-18 11:21 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Janssen @ 2015-11-17 20:04 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-Mozilla-Fira-Mono-font.patch --]
[-- Type: text/x-patch, Size: 1810 bytes --]

From e0c9fea99b69e252d99a4ecd3cb781135faaf79c Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@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


[-- Attachment #2: Type: text/plain, Size: 277 bytes --]

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

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

* Re: [PATCH] gnu: Add Mozilla Fira Mono font.
  2015-11-17 20:04 [PATCH] gnu: Add Mozilla Fira Mono font Roel Janssen
@ 2015-11-18 11:21 ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-11-18 11:21 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

Roel Janssen <roel@gnu.org> skribis:

> From e0c9fea99b69e252d99a4ecd3cb781135faaf79c Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@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.

[...]

> +    (source (origin
> +              (method url-fetch)
> +              (uri "https://github.com/mozilla/Fira/raw/master/otf/FiraMono-Regular.otf")

Would be nice to see if this can be built from source.

> 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.

It has to be installed in ~/.guix-profile because that’s where Guix’s
Fontconfig looks for font (I assume you’re talking about a
Guix-installed Emacs.)

Maybe you need to run ‘fc-cache -vfr’ (from Fontconfig) to update the
font cache?

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

The best would be to build them from source, if possible.  Otherwise
there can be several origins listed in ‘native-inputs’.

Thanks!

Ludo’.

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

* [PATCH] gnu: Add Mozilla Fira Mono font
@ 2016-11-26 14:28 Toni Reina
  2016-11-26 22:10 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Toni Reina @ 2016-11-26 14:28 UTC (permalink / raw)
  To: guix-devel

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

Hello,

One year ago, Roel Janssen sent a patch adding this font but finally it
wasn't applied. I created a new one, building the fonts from source, and
it includes all fira mono family: Bold, Medium and Regular.

I'm downloading the sources from carrois.com website because from github
isn't possible to download only the Fira Mono font, Fira Sans is also
included. I checked the nix package and they are doing the same. 

Cheers,

Toni


[-- Attachment #2: Fira Mono patch --]
[-- Type: text/x-diff, Size: 2447 bytes --]

From 9487025f2b6101ce4436d60b49d58f6ba439cd97 Mon Sep 17 00:00:00 2001
From: Toni Reina <areina@riseup.net>
Date: Sat, 26 Nov 2016 15:12:22 +0100
Subject: [PATCH] gnu: Add Mozilla Fira Mono font.

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

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 009efd2..5967315 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016 Toni Reina <areina@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -898,3 +899,38 @@ powerline support.")
      "Source Code Pro is a set of monospaced OpenType fonts that have been
 designed to work well in user interface environments.")
     (license license:silofl1.1)))
+
+(define-public font-fira-mono
+  (package
+    (name "font-fira-mono")
+    (version "3.206")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
+                                  "FiraMonoFonts"
+                                  (string-replace-substring version "." "")
+                                  ".zip"))
+              (sha256
+               (base32
+                "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                     "/bin/unzip"))
+               (font-dir (string-append %output "/share/fonts/opentype")))
+           (mkdir-p font-dir)
+           (system* unzip
+                    "-j"
+                    (assoc-ref %build-inputs "source")
+                    "*.otf"
+                    "-d" font-dir)))))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (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)))
-- 
2.10.2


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

* Re: [PATCH] gnu: Add Mozilla Fira Mono font
  2016-11-26 14:28 Toni Reina
@ 2016-11-26 22:10 ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-11-26 22:10 UTC (permalink / raw)
  To: Toni Reina; +Cc: guix-devel

Hello,

Toni Reina <areina@riseup.net> skribis:

> One year ago, Roel Janssen sent a patch adding this font but finally it
> wasn't applied. I created a new one, building the fonts from source, and
> it includes all fira mono family: Bold, Medium and Regular.

This patch doesn’t build the fonts from source, which would be nice
(with Fontforge or similar), but it’s great anyway.

> I'm downloading the sources from carrois.com website because from github
> isn't possible to download only the Fira Mono font, Fira Sans is also
> included. I checked the nix package and they are doing the same. 
>
> Cheers,
>
> Toni
>
> From 9487025f2b6101ce4436d60b49d58f6ba439cd97 Mon Sep 17 00:00:00 2001
> From: Toni Reina <areina@riseup.net>
> Date: Sat, 26 Nov 2016 15:12:22 +0100
> Subject: [PATCH] gnu: Add Mozilla Fira Mono font.
>
> * gnu/packages/fonts.scm (font-fira-mono): New variable.

I made the description a full sentence and applied it.

Thanks!

Ludo’.

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

end of thread, other threads:[~2016-11-26 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 20:04 [PATCH] gnu: Add Mozilla Fira Mono font Roel Janssen
2015-11-18 11:21 ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2016-11-26 14:28 Toni Reina
2016-11-26 22:10 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).