all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: fontconfig: Add replacement with font-dejavu instead of gs-fonts.
@ 2020-05-17 14:50 Marius Bakke
  2020-05-19 15:50 ` Leo Famulari
  2020-05-20 12:06 ` zimoun
  0 siblings, 2 replies; 11+ messages in thread
From: Marius Bakke @ 2020-05-17 14:50 UTC (permalink / raw)
  To: guix-devel

This fixes <https://bugs.gnu.org/41282> and <https://bugs.gnu.org/41241>.
Reported by Pierre Neidhardt, W Knight, and others.

* gnu/packages/fontutils.scm (fontconfig)[replacement]: New field.
(fontconfig/font-dejavu): New variable.
---
Guix,

This is a hack to make (some) fonts working when users don't have fonts
specified in their system configuration, and (crucially) places where
the fontconfig cache may be unavailable such as 'guix pack's.

I'm not sure whether font-dejavu is a good replacement here.  Another
approach could be to convert gs-fonts to TrueType or OpenType format.

Thoughts?  I don't know much about fonts and would appreciate feedback.

---
 gnu/packages/fontutils.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index e552ece50b..27c84d5814 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -37,6 +37,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages fonts)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
@@ -292,6 +293,12 @@ fonts to/from the WOFF2 format.")
 (define-public fontconfig
   (package
    (name "fontconfig")
+
+   ;; This replacement is not security-related, but works around the fact
+   ;; that gs-fonts are not recognized by Pango, causing many applications
+   ;; to fail to find fonts otherwise.
+   (replacement fontconfig/font-dejavu)
+
    (version "2.13.1")
    (source (origin
             (method url-fetch)
@@ -348,6 +355,13 @@ high quality, anti-aliased and subpixel rendered text on a display.")
                        "See COPYING in the distribution."))
    (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))
 
+(define fontconfig/font-dejavu
+  (package
+    (inherit fontconfig)
+    (inputs
+     ;; XXX: Reuse the name to avoid having to override the configure flags.
+     `(("gs-fonts" ,font-dejavu)))))
+
 (define-public t1lib
   (package
    (name "t1lib")
-- 
2.26.2



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

end of thread, other threads:[~2020-05-21 12:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17 14:50 [PATCH] gnu: fontconfig: Add replacement with font-dejavu instead of gs-fonts Marius Bakke
2020-05-19 15:50 ` Leo Famulari
2020-05-20 11:28   ` Marius Bakke
2020-05-20 22:59     ` Leo Famulari
2020-05-20 22:00   ` Marius Bakke
2020-05-20 12:06 ` zimoun
2020-05-20 13:55   ` Marius Bakke
2020-05-20 21:03     ` zimoun
2020-05-20 21:41       ` Marius Bakke
2020-05-20 23:35         ` zimoun
2020-05-21 12:46           ` Marius Bakke

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.