[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57963] [PATCH v3] home: fontutils: Support user's fontconfig.
From: |
Taiju HIGASHI |
Subject: |
[bug#57963] [PATCH v3] home: fontutils: Support user's fontconfig. |
Date: |
Tue, 27 Sep 2022 19:10:34 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
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
- [bug#57963] [PATCH v2] home: fontutils: Support user's fontconfig., (continued)
- [bug#57963] [PATCH v2] home: fontutils: Support user's fontconfig., Taiju HIGASHI, 2022/09/22
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Ludovic Courtès, 2022/09/24
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/24
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Liliana Marie Prikler, 2022/09/25
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/25
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/25
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Liliana Marie Prikler, 2022/09/25
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/25
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Liliana Marie Prikler, 2022/09/26
[bug#57963] [PATCH v3] home: fontutils: Support user's fontconfig., Taiju HIGASHI, 2022/09/27
- [bug#57963] [PATCH v3] home: fontutils: Support user's fontconfig.,
Taiju HIGASHI <=
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Ludovic Courtès, 2022/09/28
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/28
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Ludovic Courtès, 2022/09/29
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/29
- [bug#57963] [PATCH 0/1] Support user's fontconfig., (, 2022/09/29
- [bug#57963] [PATCH 0/1] Support user's fontconfig., Taiju HIGASHI, 2022/09/29
- [bug#57963] [PATCH 0/1] Support user's fontconfig., liliana . prikler, 2022/09/30
[bug#57963] [PATCH v3] home: fontutils: Support user's fontconfig., Liliana Marie Prikler, 2022/09/28