* bug#22927: system-installed emacs does not find system-installed fonts
@ 2016-03-06 18:57 myglc2
2016-03-07 9:27 ` Alex Kost
0 siblings, 1 reply; 6+ messages in thread
From: myglc2 @ 2016-03-06 18:57 UTC (permalink / raw)
To: 22927
Not technically not a bug because the doc says ...
2.6.2 X11 Fonts
The ‘fontconfig’ package in Guix looks for fonts in
‘$HOME/.guix-profile’ by default. Thus, to allow graphical applications
installed with Guix to display fonts, you have to install fonts with
Guix as well.
But it does seem counter-intuitive that emacs 'M-x list-fontsets' gives ...
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard
Fontset: -urw-Nimbus Mono L-normal-normal-normal-*-13-*-*-*-m-0-fontset-startup
... when the system package list is ...
% *Guix Package L... 5437 Guix-Output-List
[...]
emacs 24.5 out Yes The extensible, customizable, self-documenting text editor
[...]
font-dejavu 2.34 out Yes Vera font family derivate with additional characters
[...]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22927: system-installed emacs does not find system-installed fonts
2016-03-06 18:57 bug#22927: system-installed emacs does not find system-installed fonts myglc2
@ 2016-03-07 9:27 ` Alex Kost
2016-04-02 17:29 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-03-07 9:27 UTC (permalink / raw)
To: myglc2; +Cc: 22927
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
myglc2 (2016-03-06 21:57 +0300) wrote:
> Not technically not a bug because the doc says ...
>
> 2.6.2 X11 Fonts
>
> The ‘fontconfig’ package in Guix looks for fonts in
> ‘$HOME/.guix-profile’ by default. Thus, to allow graphical applications
> installed with Guix to display fonts, you have to install fonts with
> Guix as well.
(I have not checked but) I believe this can be fixed by adding
"/run/current-system/profile/share/fonts" to '--with-add-fonts'
configure flag of the 'fontconfig' package.
For now I think the following recipe should work:
1. Make a file "~/.config/fontconfig/fonts.conf" with the following
contents:
[-- Attachment #2: fonts.conf --]
[-- Type: text/plain, Size: 145 bytes --]
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/run/current-system/profile/share/fonts</dir>
</fontconfig>
[-- Attachment #3: Type: text/plain, Size: 34 bytes --]
2. Run "fc-cache -fv".
--
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22927: system-installed emacs does not find system-installed fonts
2016-03-07 9:27 ` Alex Kost
@ 2016-04-02 17:29 ` Ludovic Courtès
2016-04-03 7:44 ` Alex Kost
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-04-02 17:29 UTC (permalink / raw)
To: Alex Kost; +Cc: myglc2, 22927
Alex Kost <alezost@gmail.com> skribis:
> myglc2 (2016-03-06 21:57 +0300) wrote:
>
>> Not technically not a bug because the doc says ...
>>
>> 2.6.2 X11 Fonts
>>
>> The ‘fontconfig’ package in Guix looks for fonts in
>> ‘$HOME/.guix-profile’ by default. Thus, to allow graphical applications
>> installed with Guix to display fonts, you have to install fonts with
>> Guix as well.
>
> (I have not checked but) I believe this can be fixed by adding
> "/run/current-system/profile/share/fonts" to '--with-add-fonts'
> configure flag of the 'fontconfig' package.
>
> For now I think the following recipe should work:
>
> 1. Make a file "~/.config/fontconfig/fonts.conf" with the following
> contents:
>
> <?xml version="1.0"?>
> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
> <fontconfig>
> <dir>/run/current-system/profile/share/fonts</dir>
> </fontconfig>
Indeed. I realize I did this independently in
e71ef7adaece7e132a5059139122b45083ea1b39.
The better fix will be to rebuild Fontconfig as you suggest. Would you
like to try that and apply it to ‘core-updates’?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22927: system-installed emacs does not find system-installed fonts
2016-04-02 17:29 ` Ludovic Courtès
@ 2016-04-03 7:44 ` Alex Kost
2016-04-03 20:39 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-04-03 7:44 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: myglc2, 22927
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
Ludovic Courtès (2016-04-02 20:29 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> myglc2 (2016-03-06 21:57 +0300) wrote:
>>
>>> Not technically not a bug because the doc says ...
>>>
>>> 2.6.2 X11 Fonts
>>>
>>> The ‘fontconfig’ package in Guix looks for fonts in
>>> ‘$HOME/.guix-profile’ by default. Thus, to allow graphical applications
>>> installed with Guix to display fonts, you have to install fonts with
>>> Guix as well.
>>
>> (I have not checked but) I believe this can be fixed by adding
>> "/run/current-system/profile/share/fonts" to '--with-add-fonts'
>> configure flag of the 'fontconfig' package.
>>
>> For now I think the following recipe should work:
>>
>> 1. Make a file "~/.config/fontconfig/fonts.conf" with the following
>> contents:
>>
>> <?xml version="1.0"?>
>> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
>> <fontconfig>
>> <dir>/run/current-system/profile/share/fonts</dir>
>> </fontconfig>
>
> Indeed. I realize I did this independently in
> e71ef7adaece7e132a5059139122b45083ea1b39.
>
> The better fix will be to rebuild Fontconfig as you suggest. Would you
> like to try that and apply it to ‘core-updates’?
Yes, the patch is attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-fontconfig-Find-fonts-in-the-system-profile.patch --]
[-- Type: text/x-patch, Size: 3709 bytes --]
From fc239dda52244d6bd3b645660ca0827aa17afc05 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sun, 3 Apr 2016 10:27:45 +0300
Subject: [PATCH] gnu: fontconfig: Find fonts in the system profile.
Fixes <http://bugs.gnu.org/22927>.
Reported by myglc2 <myglc2@gmail.com>.
This also reverts commit e71ef7adaece7e132a5059139122b45083ea1b39.
* gnu/packages/fontutils.scm (fontconfig)[arguments]: Add
/run/current-system/profile/share/fonts to --with-add-fonts configure flag.
* gnu/system/shadow.scm (default-skeletons): Do not create "fonts.conf" file.
---
gnu/packages/fontutils.scm | 8 ++++----
gnu/system/shadow.scm | 23 -----------------------
2 files changed, 4 insertions(+), 27 deletions(-)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index ff10a4a..8d33211 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -95,10 +95,10 @@ anti-aliased glyph bitmap generation with 256 gray levels.")
(assoc-ref %build-inputs "gs-fonts")
"/share/fonts")
- ;; register fonts from user profile
- ;; TODO: Add /run/current-system/profile/share/fonts and remove
- ;; the skeleton that works around it from 'default-skeletons'.
- "--with-add-fonts=~/.guix-profile/share/fonts"
+ ;; Register fonts from user and system profiles.
+ (string-append "--with-add-fonts="
+ "~/.guix-profile/share/fonts,"
+ "/run/current-system/profile/share/fonts")
;; python is not actually needed
"PYTHON=false")
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index a13ef11..6e62aee 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -131,12 +131,6 @@
(define (default-skeletons)
"Return the default skeleton files for /etc/skel. These files are copied by
'useradd' in the home directory of newly created user accounts."
- (define fonts.conf-content
- ;; SXML for ~/.config/fontconfig/fonts.conf. This works around the fact
- ;; that Fontconfig currently does not such this directory by default,
- ;; thereby ignoring fonts installed system-wide (FIXME).
- `(fontconfig (dir "/run/current-system/profile/share/fonts")))
-
(define copy-guile-wm
#~(begin
(use-modules (guix build utils))
@@ -180,22 +174,6 @@ source /etc/profile\n"))
(xdefaults (plain-file "Xdefaults" "\
XTerm*utf8: always
XTerm*metaSendsEscape: true\n"))
- (fonts.conf (computed-file
- "fonts.conf"
- #~(begin
- (use-modules (guix build utils)
- (sxml simple))
-
- (define dir
- (string-append #$output
- "/fontconfig"))
-
- (mkdir-p dir)
- (call-with-output-file (string-append dir
- "/fonts.conf")
- (lambda (port)
- (sxml->xml '#$fonts.conf-content port))))
- #:modules '((guix build utils))))
(gdbinit (plain-file "gdbinit" "\
# Tell GDB where to look for separate debugging files.
set debug-file-directory ~/.guix-profile/lib/debug\n")))
@@ -204,7 +182,6 @@ set debug-file-directory ~/.guix-profile/lib/debug\n")))
(".zlogin" ,zlogin)
(".Xdefaults" ,xdefaults)
(".guile-wm" ,guile-wm)
- (".config" ,fonts.conf)
(".gdbinit" ,gdbinit))))
(define (skeleton-directory skeletons)
--
2.7.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#22927: system-installed emacs does not find system-installed fonts
2016-04-03 7:44 ` Alex Kost
@ 2016-04-03 20:39 ` Ludovic Courtès
2016-04-04 18:11 ` Alex Kost
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-04-03 20:39 UTC (permalink / raw)
To: Alex Kost; +Cc: myglc2, 22927
Alex Kost <alezost@gmail.com> skribis:
> From fc239dda52244d6bd3b645660ca0827aa17afc05 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Sun, 3 Apr 2016 10:27:45 +0300
> Subject: [PATCH] gnu: fontconfig: Find fonts in the system profile.
>
> Fixes <http://bugs.gnu.org/22927>.
> Reported by myglc2 <myglc2@gmail.com>.
>
> This also reverts commit e71ef7adaece7e132a5059139122b45083ea1b39.
>
> * gnu/packages/fontutils.scm (fontconfig)[arguments]: Add
> /run/current-system/profile/share/fonts to --with-add-fonts configure flag.
> * gnu/system/shadow.scm (default-skeletons): Do not create "fonts.conf" file.
[...]
> - ;; register fonts from user profile
> - ;; TODO: Add /run/current-system/profile/share/fonts and remove
> - ;; the skeleton that works around it from 'default-skeletons'.
> - "--with-add-fonts=~/.guix-profile/share/fonts"
> + ;; Register fonts from user and system profiles.
> + (string-append "--with-add-fonts="
> + "~/.guix-profile/share/fonts,"
> + "/run/current-system/profile/share/fonts")
If you’ve confirmed that passing a comma-separated list here works as
expected, then please push to ‘core-updates’.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22927: system-installed emacs does not find system-installed fonts
2016-04-03 20:39 ` Ludovic Courtès
@ 2016-04-04 18:11 ` Alex Kost
0 siblings, 0 replies; 6+ messages in thread
From: Alex Kost @ 2016-04-04 18:11 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: myglc2, 22927
Ludovic Courtès (2016-04-03 23:39 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> From fc239dda52244d6bd3b645660ca0827aa17afc05 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Sun, 3 Apr 2016 10:27:45 +0300
>> Subject: [PATCH] gnu: fontconfig: Find fonts in the system profile.
>>
>> Fixes <http://bugs.gnu.org/22927>.
>> Reported by myglc2 <myglc2@gmail.com>.
>>
>> This also reverts commit e71ef7adaece7e132a5059139122b45083ea1b39.
>>
>> * gnu/packages/fontutils.scm (fontconfig)[arguments]: Add
>> /run/current-system/profile/share/fonts to --with-add-fonts configure flag.
>> * gnu/system/shadow.scm (default-skeletons): Do not create "fonts.conf" file.
>
> [...]
>
>> - ;; register fonts from user profile
>> - ;; TODO: Add /run/current-system/profile/share/fonts and remove
>> - ;; the skeleton that works around it from 'default-skeletons'.
>> - "--with-add-fonts=~/.guix-profile/share/fonts"
>> + ;; Register fonts from user and system profiles.
>> + (string-append "--with-add-fonts="
>> + "~/.guix-profile/share/fonts,"
>> + "/run/current-system/profile/share/fonts")
>
> If you’ve confirmed that passing a comma-separated list here works as
> expected, then please push to ‘core-updates’.
Yes, I confirmed, pushed.
--
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-04 18:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-06 18:57 bug#22927: system-installed emacs does not find system-installed fonts myglc2
2016-03-07 9:27 ` Alex Kost
2016-04-02 17:29 ` Ludovic Courtès
2016-04-03 7:44 ` Alex Kost
2016-04-03 20:39 ` Ludovic Courtès
2016-04-04 18:11 ` Alex Kost
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).