Subject: [bug#57963] [PATCH v4 2/2] home: fontutils: Support user's fontconfig.

From: Taiju HIGASHI <[email-masked]>
Date: Sun, 02 Oct 2022 22:22:42 +0900

>> > > +(define-record-type* <default-font> default-font
>> > > +  make-default-font
>> > > +  default-font?
>> > > +  (serif default-font-serif
>> > > +         (default '())
>> > > +         (sanitize (default-font-sanitizer 'serif)))
>> > > +  (sans-serif defalut-font-sans-serif
>> > default-font-sans-serif
>> > > +              (default '())
>> > > +              (sanitize (default-font-sanitizer 'sans-serif)))
>> > > +  (monospace default-font-monospace
>> > > +             (default '())
>> > > +             (sanitize (default-font-sanitizer 'monospace))))
>> > Rather than having a null default and sanitizing the field as here,
>> > can
>> > we have an #f default and omit the field?
>> >
>> > Btw. I'm not sure whether making this an extra record is the right
>> > idea.  Wouldn't "default-(serif|sans-serif|monospace)-family" at
>> > the
>> > root make more sense?
>> >
>> > Cheers
>>
>> Do you mean to write as follows?
>>
>> --8<---------------cut here---------------start------------->8---
>> (home-environment
>>  (packages (list font-google-noto))
>>  (services
>>   (append
>>       (list
>>        (service home-bash-service-type))
>>       (modify-services %home-base-services
>>         (home-fontconfig-service-type
>>          config => (home-fontconfig-configuration
>>                     (font-directories
>>                      (list "~/fonts"))
>>                     (default-serif-family "Noto Serif CJK JP")
>>                     (default-sans-serif-family "Noto Sans CJK JP")
>>                     (extra-config
>>                      `((match (@ (target font))
>>                          (edit (@ (mode assign)
>>                                   (name antialias))
>>                                (bool true)))))))))))
>> --8<---------------cut here---------------end--------------->8---
> Yep.  Feels more natural imho.

I have changed the interface as you suggested in the v5 patch.

Cheers,
-- 
Taiju