> Oleander via <[email protected]> hat am 17.02.2025 17:08 CET geschrieben:
> 
>  
> Hello,
> is it possible to define my own fonts.conf file with a Guix home service or 
> to prevent Guix from creating the ~/.config/fontconfig/fonts.conf symlink? 
> I'm using a font that lacks built-in hints and I need to enable the autohint 
> setting with fontconfig by editing the fonts.conf file but this is not 
> possible with Guix. The file is read-only and even if I delete it with root 
> privileges, it is always recreated when I reconfigure my system.
> 
> The manual 
> https://guix.gnu.org/manual/devel/en/html_node/Fonts-Home-Services.html only 
> explains how to define an alias/font family by listing 
> "~/.nix-profile/share/fonts but not a local fonts.conf file and whether it's 
> possible.
> 
> Thanks!

You can't create your own file, but you can add to the file created by guix. 
The manual section you linked isn't super clear about this, but the elements of 
the list given to home-fontconfig-service-type will be serialized as xml.
So the example
'(alias
                        (family "monospace")
                        (prefer
                         (family "Liberation Mono"))))

would turn into <alias><family>monospace</family><prefer><family>Liberation 
Mono</family></prefer></alias>

So you can add arbitrary content to the file, including the autohint setting 
you need.

Reply via email to