GNU bug report logs -
#57963
[PATCH 0/1] Support user's fontconfig.
Previous Next
Full log
View this message in rfc822 format
Hi,
I just sent you the v3 patch.
I have changed only the interface of `preferred-defalut-font` slightly
from what I suggested the other day.
We configure the service as follows.
--8<---------------cut here---------------start------------->8---
(simple-service
'my-fontconfig-service
home-fontconfig-service-type
(home-fontconfig-configuration
(font-directories
(list "~/fonts"))
(preferred-default-font
(default-font
(serif "Noto Serif CJK JP")
(sans-serif "Noto Sans CJK JP")
(monospace "PlemolJP Console")))
(extra-config
`((match (@ (target font))
(edit (@ (mode assign)
(name antialias))
(bool true)))))))
--8<---------------cut here---------------end--------------->8---
I didn't understand it properly, but `home-fontconfig-service-type` is
pre-registered as `essential-services` and needs to be extended using
`simple-service`.
> +(define (home-fontconfig-extend original-config extend-configs)
> + (home-fontconfig-configuration
> + (inherit original-config)
> + (font-directories
> + (append
> + (home-fontconfig-configuration-font-directories original-config)
> + (append-map home-fontconfig-configuration-font-directories extend-configs)))
> + (preferred-default-font
> + (home-fontconfig-configuration-preferred-default-font
> + (if (null? extend-configs)
> + original-config
> + (last extend-configs))))
This is the part I am most concerned about, not sure if replacing the
preferred-default-font setting with the last setting is the proper way
to go about it.
I wanted to write a test as well, but since it was to be handled by
gexp, I could not figure out how to write a test that would validate the
gexp result using only exported methods. (I would like to write tests
for serialized functions that are private functions.)
Cheers,
--
Taiju
This bug report was last modified 216 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.