mbox series

[bug#57963,0/1] Support user's fontconfig.

Message ID 20220921002721.23511-1-higashi@taiju.info
Headers show
Series Support user's fontconfig. | expand

Message

Taiju HIGASHI Sept. 21, 2022, 12:27 a.m. UTC
Hi,

I want to add custom fontconfig, so I've implemented the ability of custom
font configuration to fontutils.

It allows us to set up our fontconfig as follows.

    (home-environment
     (packages (list font-google-noto))
     (services
      (list
       (simple-service 'my-fontconfig-service
                       home-fontconfig-service-type
                       (list
                        "<alias>
      <family>sans-serif</family>
      <prefer>
        <family>Noto Sans CJK JP</family>
      </prefer>
    </alias>"
                        "<alias>
      <family>sans-serif</family>
      <prefer>
        <family>Noto Serif CJK JP</family>
      </prefer>
    </alias>")))))

Of course, we can also use SXML!

    (define font-family-map
      '((sans-serif . "Noto Sans CJK JP")
        (serif . "Noto Serif CJK JP")))

    (home-environment
     (packages (list font-google-noto))
     (services
      (list
       (simple-service 'my-fontconfig-service
                       home-fontconfig-service-type
                       (list
                        (call-with-output-string
                          (lambda (port)
                            (sxml->xml
                             (map (lambda (pair)
                                    `(alias
                                      (family ,(car pair))
                                      (prefer
                                       (family ,(cdr pair)))))
                                  font-family-map)
                             port))))))))

Taiju HIGASHI (1):
  home: fontutils: Support user's fontconfig.

 gnu/home/services/fontutils.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

--
2.37.3

Comments

Taiju HIGASHI Oct. 7, 2022, 5:20 a.m. UTC | #1
Hi,

What are the next steps for this issue?

I recognize that the following work remains.

1. Review of the v5 patch
2. Consider which services to move from essentials services to base services
3. Modify Document

If I forgot to do something, please point it out.

Thanks,
Taiju HIGASHI Oct. 7, 2022, 5:44 a.m. UTC | #2
Hi Liliana,

I'm sorry, I had the wrong email address.

Taiju HIGASHI <higashi@taiju.info> writes:

> Hi,
>
> What are the next steps for this issue?
>
> I recognize that the following work remains.
>
> 1. Review of the v5 patch
> 2. Consider which services to move from essentials services to base services
> 3. Modify Document
>
> If I forgot to do something, please point it out.
>
> Thanks,