* [PATCH 1/3] gnu: mkfontdir: Do not propagate 'mkfontscale'.
2016-07-01 9:27 [PATCH 0/3] Generate "<profile>/share/fonts/truetype/fonts.dir" file Alex Kost
@ 2016-07-01 9:27 ` Alex Kost
2016-07-02 14:26 ` Ludovic Courtès
2016-07-01 9:27 ` [PATCH 2/3] profiles: Add fonts-dir-file hook Alex Kost
2016-07-01 9:27 ` [PATCH 3/3] doc: Describe how to make X server find TrueType fonts Alex Kost
2 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-07-01 9:27 UTC (permalink / raw)
To: guix-devel
* gnu/packages/xorg.scm (mkfontdir)[propagated-inputs]: Move
'mkfontscale' to ...
[inputs]: ... here.
[arguments]: Add 'wrap-mkfontdir' phase.
---
gnu/packages/xorg.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 431c591..090f661 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4631,7 +4631,17 @@ protocol and arbitrary X extension protocol.")
(base32
"0c3563kw9fg15dpgx4dwvl12qz6sdqdns1pxa574hc7i5m42mman"))))
(build-system gnu-build-system)
- (propagated-inputs
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-mkfontdir
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/mkfontdir")
+ `("PATH" ":" prefix
+ (,(string-append (assoc-ref inputs "mkfontscale")
+ "/bin")))))))))
+ (inputs
`(("mkfontscale" ,mkfontscale)))
(native-inputs
`(("pkg-config" ,pkg-config)))
--
2.8.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-01 9:27 [PATCH 0/3] Generate "<profile>/share/fonts/truetype/fonts.dir" file Alex Kost
2016-07-01 9:27 ` [PATCH 1/3] gnu: mkfontdir: Do not propagate 'mkfontscale' Alex Kost
@ 2016-07-01 9:27 ` Alex Kost
2016-07-02 14:34 ` Ludovic Courtès
2016-07-01 9:27 ` [PATCH 3/3] doc: Describe how to make X server find TrueType fonts Alex Kost
2 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-07-01 9:27 UTC (permalink / raw)
To: guix-devel
* guix/profiles.scm (fonts-dir-file): New procedure.
(%default-profile-hooks): Add it.
---
guix/profiles.scm | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 90c4332..945da62 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2014, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;;
@@ -756,10 +756,51 @@ entries. It's used to query the MIME type of a given file."
#:substitutable? #f)
(return #f))))
+(define (fonts-dir-file manifest)
+ "Return a derivation that builds the @file{fonts.dir} and @file{fonts.scale}
+files for the truetype fonts of the @var{manifest} entries."
+ (define mkfontscale
+ (module-ref (resolve-interface '(gnu packages xorg)) 'mkfontscale))
+
+ (define mkfontdir
+ (module-ref (resolve-interface '(gnu packages xorg)) 'mkfontdir))
+
+ (define build
+ #~(begin
+ (use-modules (srfi srfi-26)
+ (guix build utils)
+ (guix build union))
+ (let ((ttf-dirs (filter file-exists?
+ (map (cut string-append <>
+ "/share/fonts/truetype")
+ '#$(manifest-inputs manifest)))))
+ (mkdir #$output)
+ (if (null? ttf-dirs)
+ (exit #t)
+ (let* ((fonts-dir (string-append #$output "/share/fonts"))
+ (ttf-dir (string-append fonts-dir "/truetype"))
+ (mkfontscale (string-append #+mkfontscale
+ "/bin/mkfontscale"))
+ (mkfontdir (string-append #+mkfontdir
+ "/bin/mkfontdir")))
+ (mkdir-p fonts-dir)
+ (union-build ttf-dir ttf-dirs
+ #:log-port (%make-void-port "w"))
+ (with-directory-excursion ttf-dir
+ (exit (and (zero? (system* mkfontscale))
+ (zero? (system* mkfontdir))))))))))
+
+ (gexp->derivation "fonts-dir-file" build
+ #:modules '((guix build utils)
+ (guix build union))
+ #:local-build? #t
+ #:substitutable? #f))
+
(define %default-profile-hooks
;; This is the list of derivation-returning procedures that are called by
;; default when making a non-empty profile.
(list info-dir-file
+ fonts-dir-file
ghc-package-cache-file
ca-certificate-bundle
gtk-icon-themes
--
2.8.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-01 9:27 ` [PATCH 2/3] profiles: Add fonts-dir-file hook Alex Kost
@ 2016-07-02 14:34 ` Ludovic Courtès
2016-07-02 19:19 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2016-07-02 14:34 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * guix/profiles.scm (fonts-dir-file): New procedure.
> (%default-profile-hooks): Add it.
[...]
> +(define (fonts-dir-file manifest)
> + "Return a derivation that builds the @file{fonts.dir} and @file{fonts.scale}
> +files for the truetype fonts of the @var{manifest} entries."
> + (define mkfontscale
> + (module-ref (resolve-interface '(gnu packages xorg)) 'mkfontscale))
> +
> + (define mkfontdir
> + (module-ref (resolve-interface '(gnu packages xorg)) 'mkfontdir))
> +
> + (define build
> + #~(begin
> + (use-modules (srfi srfi-26)
> + (guix build utils)
> + (guix build union))
> + (let ((ttf-dirs (filter file-exists?
> + (map (cut string-append <>
> + "/share/fonts/truetype")
> + '#$(manifest-inputs manifest)))))
> + (mkdir #$output)
> + (if (null? ttf-dirs)
> + (exit #t)
> + (let* ((fonts-dir (string-append #$output "/share/fonts"))
> + (ttf-dir (string-append fonts-dir "/truetype"))
> + (mkfontscale (string-append #+mkfontscale
> + "/bin/mkfontscale"))
> + (mkfontdir (string-append #+mkfontdir
> + "/bin/mkfontdir")))
> + (mkdir-p fonts-dir)
> + (union-build ttf-dir ttf-dirs
> + #:log-port (%make-void-port "w"))
> + (with-directory-excursion ttf-dir
> + (exit (and (zero? (system* mkfontscale))
> + (zero? (system* mkfontdir))))))))))
> +
> + (gexp->derivation "fonts-dir-file" build
> + #:modules '((guix build utils)
> + (guix build union))
> + #:local-build? #t
> + #:substitutable? #f))
A potential problem with this hook is that it pulls mkfontscale and
mkfontdir regardless of whether they are needed; I can’t really think of
a way to avoid it though.
Also, how does it relate to this:
commit bf9655f57d2442d56661594b80f6d0031ca0ae73
Author: Eric Bavier <bavier@member.fsf.org>
Date: Mon Oct 19 06:44:23 2015 -0500
font-alias: Install dummy fonts.dir files.
* gnu/packages/xorg.scm (font-alias)[arguments]: New 'install-fonts-dir'
phase.
?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-02 14:34 ` Ludovic Courtès
@ 2016-07-02 19:19 ` Alex Kost
2016-07-05 14:31 ` Ludovic Courtès
0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-07-02 19:19 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-07-02 17:34 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> * guix/profiles.scm (fonts-dir-file): New procedure.
>> (%default-profile-hooks): Add it.
>
> [...]
>
> A potential problem with this hook is that it pulls mkfontscale and
> mkfontdir regardless of whether they are needed; I can’t really think of
> a way to avoid it though.
Yes, I also don't like it. We have the same problem with
'info-file-dir' hook: it always pulls texinfo and gzip, but not all
profiles include info manuals.
> Also, how does it relate to this:
>
> commit bf9655f57d2442d56661594b80f6d0031ca0ae73
> Author: Eric Bavier <bavier@member.fsf.org>
> Date: Mon Oct 19 06:44:23 2015 -0500
>
> font-alias: Install dummy fonts.dir files.
>
> * gnu/packages/xorg.scm (font-alias)[arguments]: New 'install-fonts-dir'
> phase.
>
> ?
It doesn't relate at all. This hook generates "fonts.dir" only for
"share/fonts/truetype" directory. Directories with X fonts are not
touched, because all sub-directories of "share/fonts/X11" already
contain "fonts.dir" files (font-adobe75dpi, font-misc-misc and other X
font packages install "fonts.dir").
'font-alias' package does not contain fonts.dir file because it doesn't
make sense: this package does not provide any font. It just installs
"fonts.alias" files inside "share/fonts/X11/{75dpi,100dpi,cyrillic,misc}"
directories. Eric made this commit for one particular case: to make it
possible to use font aliases in the default X server configuration
('xorg-configuration-file' in (gnu services xorg) module).
Just to mention, I think we shouldn't modify 'font-alias' package as it
leads to a bug <http://bugs.gnu.org/22100>, and should do some other
workaround. I have 2 ideas (not sure if they make any sense):
1) To add a special package (font-alias-with-fonts.dir) that will be used
in 'xorg-configuration-file'.
2) To do 'union-build' on packages with X fonts and aliases and to use it
in the X config. With this, we can revert that Eric's commit, and
everything should just work (I mean the X config will work and the bug
will be fixed).
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-02 19:19 ` Alex Kost
@ 2016-07-05 14:31 ` Ludovic Courtès
2016-07-06 19:41 ` Alex Kost
2016-07-22 6:59 ` Alex Kost
0 siblings, 2 replies; 14+ messages in thread
From: Ludovic Courtès @ 2016-07-05 14:31 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Ludovic Courtès (2016-07-02 17:34 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> * guix/profiles.scm (fonts-dir-file): New procedure.
>>> (%default-profile-hooks): Add it.
>>
>> [...]
>>
>> A potential problem with this hook is that it pulls mkfontscale and
>> mkfontdir regardless of whether they are needed; I can’t really think of
>> a way to avoid it though.
>
> Yes, I also don't like it. We have the same problem with
> 'info-file-dir' hook: it always pulls texinfo and gzip, but not all
> profiles include info manuals.
Yes, but I thought it was OK to make these mandatory dependencies.
The closure of mkfontscale + mkfontdir is small; it’s slightly annoying
for someone building from source because you have to build a few X11
libraries, but it’s not that much either (‘guix graph’ shows just a few
boxes.)
So this hook is probably fine, after all.
What do people think?
>> Also, how does it relate to this:
>>
>> commit bf9655f57d2442d56661594b80f6d0031ca0ae73
>> Author: Eric Bavier <bavier@member.fsf.org>
>> Date: Mon Oct 19 06:44:23 2015 -0500
>>
>> font-alias: Install dummy fonts.dir files.
>>
>> * gnu/packages/xorg.scm (font-alias)[arguments]: New 'install-fonts-dir'
>> phase.
>>
>> ?
>
> It doesn't relate at all.
Good. :-)
> This hook generates "fonts.dir" only for "share/fonts/truetype"
> directory. Directories with X fonts are not touched, because all
> sub-directories of "share/fonts/X11" already contain "fonts.dir" files
> (font-adobe75dpi, font-misc-misc and other X font packages install
> "fonts.dir").
>
> 'font-alias' package does not contain fonts.dir file because it doesn't
> make sense: this package does not provide any font. It just installs
> "fonts.alias" files inside "share/fonts/X11/{75dpi,100dpi,cyrillic,misc}"
> directories. Eric made this commit for one particular case: to make it
> possible to use font aliases in the default X server configuration
> ('xorg-configuration-file' in (gnu services xorg) module).
>
> Just to mention, I think we shouldn't modify 'font-alias' package as it
> leads to a bug <http://bugs.gnu.org/22100>, and should do some other
> workaround. I have 2 ideas (not sure if they make any sense):
>
> 1) To add a special package (font-alias-with-fonts.dir) that will be used
> in 'xorg-configuration-file'.
>
> 2) To do 'union-build' on packages with X fonts and aliases and to use it
> in the X config. With this, we can revert that Eric's commit, and
> everything should just work (I mean the X config will work and the bug
> will be fixed).
Could you discuss it with 22100@debbugs.gnu.org and Cc: Eric? I’m not
sure I’m competent enough to comment, so I’d rather let you and Eric
figure out what needs to be done. :-)
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-05 14:31 ` Ludovic Courtès
@ 2016-07-06 19:41 ` Alex Kost
2016-07-22 6:59 ` Alex Kost
1 sibling, 0 replies; 14+ messages in thread
From: Alex Kost @ 2016-07-06 19:41 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-07-05 17:31 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
[...]
>> This hook generates "fonts.dir" only for "share/fonts/truetype"
>> directory. Directories with X fonts are not touched, because all
>> sub-directories of "share/fonts/X11" already contain "fonts.dir" files
>> (font-adobe75dpi, font-misc-misc and other X font packages install
>> "fonts.dir").
>>
>> 'font-alias' package does not contain fonts.dir file because it doesn't
>> make sense: this package does not provide any font. It just installs
>> "fonts.alias" files inside "share/fonts/X11/{75dpi,100dpi,cyrillic,misc}"
>> directories. Eric made this commit for one particular case: to make it
>> possible to use font aliases in the default X server configuration
>> ('xorg-configuration-file' in (gnu services xorg) module).
>>
>> Just to mention, I think we shouldn't modify 'font-alias' package as it
>> leads to a bug <http://bugs.gnu.org/22100>, and should do some other
>> workaround. I have 2 ideas (not sure if they make any sense):
>>
>> 1) To add a special package (font-alias-with-fonts.dir) that will be used
>> in 'xorg-configuration-file'.
>>
>> 2) To do 'union-build' on packages with X fonts and aliases and to use it
>> in the X config. With this, we can revert that Eric's commit, and
>> everything should just work (I mean the X config will work and the bug
>> will be fixed).
>
> Could you discuss it with 22100@debbugs.gnu.org and Cc: Eric? I’m not
> sure I’m competent enough to comment, so I’d rather let you and Eric
> figure out what needs to be done. :-)
OK, I think I should try to make a patch at first to show what I mean.
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-05 14:31 ` Ludovic Courtès
2016-07-06 19:41 ` Alex Kost
@ 2016-07-22 6:59 ` Alex Kost
2016-07-24 17:09 ` Ludovic Courtès
1 sibling, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-07-22 6:59 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-07-05 17:31 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2016-07-02 17:34 +0300) wrote:
>>
>>> Alex Kost <alezost@gmail.com> skribis:
>>>
>>>> * guix/profiles.scm (fonts-dir-file): New procedure.
>>>> (%default-profile-hooks): Add it.
>>>
>>> [...]
>>>
>>> A potential problem with this hook is that it pulls mkfontscale and
>>> mkfontdir regardless of whether they are needed; I can’t really think of
>>> a way to avoid it though.
>>
>> Yes, I also don't like it. We have the same problem with
>> 'info-file-dir' hook: it always pulls texinfo and gzip, but not all
>> profiles include info manuals.
>
> Yes, but I thought it was OK to make these mandatory dependencies.
>
> The closure of mkfontscale + mkfontdir is small; it’s slightly annoying
> for someone building from source because you have to build a few X11
> libraries, but it’s not that much either (‘guix graph’ shows just a few
> boxes.)
>
> So this hook is probably fine, after all.
>
> What do people think?
Since there were no objections in 2 weeks, I think it's OK to commit
this 'fonts-dir-file' hook, right?
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-22 6:59 ` Alex Kost
@ 2016-07-24 17:09 ` Ludovic Courtès
2016-07-25 14:26 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2016-07-24 17:09 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Ludovic Courtès (2016-07-05 17:31 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> Ludovic Courtès (2016-07-02 17:34 +0300) wrote:
>>>
>>>> Alex Kost <alezost@gmail.com> skribis:
>>>>
>>>>> * guix/profiles.scm (fonts-dir-file): New procedure.
>>>>> (%default-profile-hooks): Add it.
>>>>
>>>> [...]
>>>>
>>>> A potential problem with this hook is that it pulls mkfontscale and
>>>> mkfontdir regardless of whether they are needed; I can’t really think of
>>>> a way to avoid it though.
>>>
>>> Yes, I also don't like it. We have the same problem with
>>> 'info-file-dir' hook: it always pulls texinfo and gzip, but not all
>>> profiles include info manuals.
>>
>> Yes, but I thought it was OK to make these mandatory dependencies.
>>
>> The closure of mkfontscale + mkfontdir is small; it’s slightly annoying
>> for someone building from source because you have to build a few X11
>> libraries, but it’s not that much either (‘guix graph’ shows just a few
>> boxes.)
>>
>> So this hook is probably fine, after all.
>>
>> What do people think?
>
> Since there were no objections in 2 weeks, I think it's OK to commit
> this 'fonts-dir-file' hook, right?
I think so!
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] profiles: Add fonts-dir-file hook.
2016-07-24 17:09 ` Ludovic Courtès
@ 2016-07-25 14:26 ` Alex Kost
0 siblings, 0 replies; 14+ messages in thread
From: Alex Kost @ 2016-07-25 14:26 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-07-24 20:09 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2016-07-05 17:31 +0300) wrote:
>>
>>> Alex Kost <alezost@gmail.com> skribis:
>>>
>>>> Ludovic Courtès (2016-07-02 17:34 +0300) wrote:
>>>>
>>>>> Alex Kost <alezost@gmail.com> skribis:
>>>>>
>>>>>> * guix/profiles.scm (fonts-dir-file): New procedure.
>>>>>> (%default-profile-hooks): Add it.
>>>>>
>>>>> [...]
>>>>>
>>>>> A potential problem with this hook is that it pulls mkfontscale and
>>>>> mkfontdir regardless of whether they are needed; I can’t really think of
>>>>> a way to avoid it though.
>>>>
>>>> Yes, I also don't like it. We have the same problem with
>>>> 'info-file-dir' hook: it always pulls texinfo and gzip, but not all
>>>> profiles include info manuals.
>>>
>>> Yes, but I thought it was OK to make these mandatory dependencies.
>>>
>>> The closure of mkfontscale + mkfontdir is small; it’s slightly annoying
>>> for someone building from source because you have to build a few X11
>>> libraries, but it’s not that much either (‘guix graph’ shows just a few
>>> boxes.)
>>>
>>> So this hook is probably fine, after all.
>>>
>>> What do people think?
>>
>> Since there were no objections in 2 weeks, I think it's OK to commit
>> this 'fonts-dir-file' hook, right?
>
> I think so!
Committed, thanks!
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/3] doc: Describe how to make X server find TrueType fonts.
2016-07-01 9:27 [PATCH 0/3] Generate "<profile>/share/fonts/truetype/fonts.dir" file Alex Kost
2016-07-01 9:27 ` [PATCH 1/3] gnu: mkfontdir: Do not propagate 'mkfontscale' Alex Kost
2016-07-01 9:27 ` [PATCH 2/3] profiles: Add fonts-dir-file hook Alex Kost
@ 2016-07-01 9:27 ` Alex Kost
2016-07-02 14:38 ` Ludovic Courtès
2 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-07-01 9:27 UTC (permalink / raw)
To: guix-devel
* doc/guix.texi (Application Setup): Document how to add TrueType fonts
installed in a Guix profile to the X server font path.
---
doc/guix.texi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 62c0d34..0e7b698 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13,6 +13,7 @@
Copyright @copyright{} 2012, 2013, 2014, 2015, 2016 Ludovic Courtès@*
Copyright @copyright{} 2013, 2014, 2016 Andreas Enge@*
Copyright @copyright{} 2013 Nikita Karetnikov@*
+Copyright @copyright{} 2014, 2015, 2016 Alex Kost@*
Copyright @copyright{} 2015, 2016 Mathieu Lirzin@*
Copyright @copyright{} 2014 Pierre-Antoine Rault@*
Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer@*
@@ -1192,6 +1193,24 @@ to display fonts, you have to install fonts with Guix as well.
Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and
@code{font-gnu-freefont-ttf}.
+However, some programs do not support Fontconfig and rely on the X
+server to recognize a font. Such programs require to specify a full
+name of a font using XLFD (X Logical Font Description), like this:
+
+@example
+-*-dejavu sans-medium-r-normal-*-*-100-*-*-*-*-*-1
+@end example
+
+To be able to use such full names for the TrueType fonts installed in
+your Guix profile, you need to extend the font path of the X server:
+
+@example
+xset +fp ~/.guix-profile/share/fonts/truetype
+@end example
+
+After that, you can run @code{xlsfonts} (from @code{xlsfonts} package)
+to make sure your TrueType fonts are listed there.
+
To display text written in Chinese languages, Japanese, or Korean in
graphical applications, consider installing
@code{font-adobe-source-han-sans} or @code{font-wqy-zenhei}. The former
--
2.8.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] doc: Describe how to make X server find TrueType fonts.
2016-07-01 9:27 ` [PATCH 3/3] doc: Describe how to make X server find TrueType fonts Alex Kost
@ 2016-07-02 14:38 ` Ludovic Courtès
2016-07-02 19:22 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2016-07-02 14:38 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * doc/guix.texi (Application Setup): Document how to add TrueType fonts
> installed in a Guix profile to the X server font path.
[...]
> @@ -1192,6 +1193,24 @@ to display fonts, you have to install fonts with Guix as well.
> Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and
> @code{font-gnu-freefont-ttf}.
>
> +However, some programs do not support Fontconfig and rely on the X
> +server to recognize a font.
What about: “Older programs such as @command{xterm} do not use
Fontconfig and instead rely on server-side font rendering.”?
> Such programs require to specify a full
> +name of a font using XLFD (X Logical Font Description), like this:
> +
> +@example
> +-*-dejavu sans-medium-r-normal-*-*-100-*-*-*-*-*-1
> +@end example
> +
> +To be able to use such full names for the TrueType fonts installed in
> +your Guix profile, you need to extend the font path of the X server:
> +
> +@example
> +xset +fp ~/.guix-profile/share/fonts/truetype
> +@end example
> +
> +After that, you can run @code{xlsfonts} (from @code{xlsfonts} package)
> +to make sure your TrueType fonts are listed there.
OK.
> To display text written in Chinese languages, Japanese, or Korean in
> graphical applications, consider installing
> @code{font-adobe-source-han-sans} or @code{font-wqy-zenhei}. The former
I would move the new text below the paragraph about Chinese languages
(the paragraph about Chinese languages is about client-side rendering.)
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] doc: Describe how to make X server find TrueType fonts.
2016-07-02 14:38 ` Ludovic Courtès
@ 2016-07-02 19:22 ` Alex Kost
0 siblings, 0 replies; 14+ messages in thread
From: Alex Kost @ 2016-07-02 19:22 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-07-02 17:38 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> * doc/guix.texi (Application Setup): Document how to add TrueType fonts
>> installed in a Guix profile to the X server font path.
>
> [...]
>
>> @@ -1192,6 +1193,24 @@ to display fonts, you have to install fonts
>> with Guix as well.
>> Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and
>> @code{font-gnu-freefont-ttf}.
>>
>> +However, some programs do not support Fontconfig and rely on the X
>> +server to recognize a font.
>
> What about: “Older programs such as @command{xterm} do not use
> Fontconfig and instead rely on server-side font rendering.”?
Sure.
[...]
>> To display text written in Chinese languages, Japanese, or Korean in
>> graphical applications, consider installing
>> @code{font-adobe-source-han-sans} or @code{font-wqy-zenhei}. The former
>
> I would move the new text below the paragraph about Chinese languages
> (the paragraph about Chinese languages is about client-side rendering.)
Right, will do, thanks!
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread