You are not logged in.

#1 2025-03-25 10:53:16

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

[Workaround] setting through local.conf ignored by fontconfig ?

I use /etc/fonts/local.conf to ensure serif = DejaVu Serif , sans-serif = DejaVu Sans and monospace = JetBrainsMono Nerd Font Mono .
No other changes to fontconfig are made by me.

After noticing https://bbs.archlinux.org/viewtopic.php?id=304424 and https://bbs.archlinux.org/viewtopic.php?id=304433 I decided to check.

$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ 

Content of my /etc/fonts/local.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test qual="any" name="family">
            <string>
                serif
            </string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>
                DejaVu Serif
            </string>
        </edit>
    </match>
    <match target="pattern">
        <test qual="any" name="family">
            <string>
                sans-serif
            </string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>
                DejaVu Sans
            </string>
        </edit>
    </match>
    <match target="pattern">
        <test qual="any" name="family">
            <string>
                monospace
            </string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>
               JetBrainsMono Nerd Font Mono
            </string>
        </edit>
    </match>
</fontconfig>

I do vaguely remember some months ago monospace look changed, but couldn't find something wrong or new font configuration files .

Last edited by Lone_Wolf (2025-03-27 09:44:30)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#2 2025-03-25 16:31:10

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [Workaround] setting through local.conf ignored by fontconfig ?

Same as https://bbs.archlinux.org/viewtopic.php?id=304433 (unresolved)
If it's not fontconfig my money is on https://archlinux.org/packages/core/x86_64/expat/ - which is bad.
Same w/ expat 2.6.4-1 ?

Offline

#3 2025-03-26 12:26:38

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

Re: [Workaround] setting through local.conf ignored by fontconfig ?

re-installing ttf-jetbrains-mono-nerd : no change
downgrading expat & lib32-expat : no change

removing ttf-dejavu

$ fc-match monospace
AdwaitaMono-Regular.ttf: "Adwaita Mono" "Regular"

Trying to remove adwaita-fonts breaks to many things.

re-install ttf-dejavu does set monospace back to dejavu-sans-mono .

Comparing package filelists I did notice something that may be relevant :
ttf-dejavu installs files in /usr/share/fontconfig/conf.avail/ and /usr/share/fontconfig/conf.default/ .

ttf-jetbrains-mono-nerd does NOT come with such files.

$ fc-conflist 
+ /etc/fonts/conf.d/10-hinting-slight.conf: Set hintslight to hintstyle
+ /etc/fonts/conf.d/10-scale-bitmap-fonts.conf: Bitmap scaling
+ /etc/fonts/conf.d/10-sub-pixel-rgb.conf: Enable sub-pixel rendering with the RGB stripes layout
+ /etc/fonts/conf.d/10-yes-antialias.conf: Enable antialiasing
+ /etc/fonts/conf.d/11-lcdfilter-default.conf: Use lcddefault as default for LCD filter
+ /etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans-mono.conf: No description
+ /etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans.conf: No description
+ /etc/fonts/conf.d/20-unhint-small-dejavu-lgc-serif.conf: No description
+ /etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf: No description
+ /etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf: No description
+ /etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf: No description
+ /etc/fonts/conf.d/20-unhint-small-vera.conf: Disable hinting for Bitstream Vera fonts when the size is less than 8ppem
+ /etc/fonts/conf.d/30-metric-aliases.conf: Set substitutions for similar/metric-compatible families
+ /etc/fonts/conf.d/30-win32-aliases.conf: No description
+ /etc/fonts/conf.d/40-nonlatin.conf: Set substitutions for non-Latin fonts
+ /etc/fonts/conf.d/45-generic.conf: Set substitutions for emoji/math fonts
+ /etc/fonts/conf.d/45-latin.conf: Set substitutions for Latin fonts
+ /etc/fonts/conf.d/48-spacing.conf: Add mono to the family when spacing is 100
+ /etc/fonts/conf.d/49-sansserif.conf: Add sans-serif to the family when no generic name
+ /home/panoramix/.config/fontconfig/fonts.conf: No description
+ /etc/fonts/conf.d/50-user.conf: Load per-user customization files
+ /etc/fonts/local.conf: No description
+ /etc/fonts/conf.d/51-local.conf: Load local customization file
+ /etc/fonts/conf.d/57-dejavu-sans-mono.conf: No description
+ /etc/fonts/conf.d/57-dejavu-sans.conf: No description
+ /etc/fonts/conf.d/57-dejavu-serif.conf: No description
+ /etc/fonts/conf.d/58-dejavu-lgc-sans-mono.conf: No description
+ /etc/fonts/conf.d/58-dejavu-lgc-sans.conf: No description
+ /etc/fonts/conf.d/58-dejavu-lgc-serif.conf: No description
+ /etc/fonts/conf.d/60-generic.conf: Set preferable fonts for emoji/math fonts
+ /etc/fonts/conf.d/60-latin.conf: Set preferable fonts for Latin
+ /etc/fonts/conf.d/65-fonts-persian.conf: No description
+ /etc/fonts/conf.d/65-nonlatin.conf: Set preferable fonts for non-Latin
+ /etc/fonts/conf.d/69-unifont.conf: No description
+ /etc/fonts/conf.d/80-delicious.conf: No description
+ /etc/fonts/conf.d/90-synthetic.conf: No description
+ /etc/fonts/fonts.conf: Default configuration file
- /usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf: Re-define fonts dirs sample
- /usr/share/fontconfig/conf.avail/09-autohint-if-no-hinting.conf: Enable autohinter if font doesn't have any hinting
- /usr/share/fontconfig/conf.avail/10-autohint.conf: Enable autohinter
- /usr/share/fontconfig/conf.avail/10-hinting-full.conf: Set hintfull to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-medium.conf: Set hintmedium to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-none.conf: Set hintnone to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-slight.conf: Set hintslight to hintstyle
- /usr/share/fontconfig/conf.avail/10-no-antialias.conf: Disable antialiasing
- /usr/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf: Bitmap scaling
- /usr/share/fontconfig/conf.avail/10-sub-pixel-bgr.conf: Enable sub-pixel rendering with the BGR stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-none.conf: Disable sub-pixel rendering
- /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf: Enable sub-pixel rendering with the RGB stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-vbgr.conf: Enable sub-pixel rendering with the vertical BGR stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-vrgb.conf: Enable sub-pixel rendering with the vertical RGB stripes layout
- /usr/share/fontconfig/conf.avail/10-unhinted.conf: Disable hinting
- /usr/share/fontconfig/conf.avail/10-yes-antialias.conf: Enable antialiasing
- /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf: Use lcddefault as default for LCD filter
- /usr/share/fontconfig/conf.avail/11-lcdfilter-legacy.conf: Use lcdlegacy as default for LCD filter
- /usr/share/fontconfig/conf.avail/11-lcdfilter-light.conf: Use lcdlight as default for LCD filter
- /usr/share/fontconfig/conf.avail/11-lcdfilter-none.conf: Use lcdnone as default for LCD filter
- /usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf: No description
- /usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-lgc-sans.conf: No description
- /usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-lgc-serif.conf: No description
- /usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-sans-mono.conf: No description
- /usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-sans.conf: No description
- /usr/share/fontconfig/conf.avail/20-unhint-small-dejavu-serif.conf: No description
- /usr/share/fontconfig/conf.avail/20-unhint-small-vera.conf: Disable hinting for Bitstream Vera fonts when the size is less than 8ppem
- /usr/share/fontconfig/conf.avail/25-unhint-nonlatin.conf: Disable hinting for CJK fonts
- /usr/share/fontconfig/conf.avail/30-metric-aliases.conf: Set substitutions for similar/metric-compatible families
- /usr/share/fontconfig/conf.avail/30-win32-aliases.conf: No description
- /usr/share/fontconfig/conf.avail/35-lang-normalize.conf: No description
- /usr/share/fontconfig/conf.avail/40-nonlatin.conf: Set substitutions for non-Latin fonts
- /usr/share/fontconfig/conf.avail/45-generic.conf: Set substitutions for emoji/math fonts
- /usr/share/fontconfig/conf.avail/45-latin.conf: Set substitutions for Latin fonts
- /usr/share/fontconfig/conf.avail/48-spacing.conf: Add mono to the family when spacing is 100
- /usr/share/fontconfig/conf.avail/49-sansserif.conf: Add sans-serif to the family when no generic name
- /usr/share/fontconfig/conf.avail/50-user.conf: Load per-user customization files
- /usr/share/fontconfig/conf.avail/51-local.conf: Load local customization file
- /usr/share/fontconfig/conf.avail/57-dejavu-sans-mono.conf: No description
- /usr/share/fontconfig/conf.avail/57-dejavu-sans.conf: No description
- /usr/share/fontconfig/conf.avail/57-dejavu-serif.conf: No description
- /usr/share/fontconfig/conf.avail/58-dejavu-lgc-sans-mono.conf: No description
- /usr/share/fontconfig/conf.avail/58-dejavu-lgc-sans.conf: No description
- /usr/share/fontconfig/conf.avail/58-dejavu-lgc-serif.conf: No description
- /usr/share/fontconfig/conf.avail/60-generic.conf: Set preferable fonts for emoji/math fonts
- /usr/share/fontconfig/conf.avail/60-latin.conf: Set preferable fonts for Latin
- /usr/share/fontconfig/conf.avail/65-fonts-persian.conf: No description
- /usr/share/fontconfig/conf.avail/65-khmer.conf: No description
- /usr/share/fontconfig/conf.avail/65-nonlatin.conf: Set preferable fonts for non-Latin
- /usr/share/fontconfig/conf.avail/69-unifont.conf: No description
- /usr/share/fontconfig/conf.avail/70-no-bitmaps-and-emoji.conf: Reject bitmap fonts, including bitmap emoji fonts
- /usr/share/fontconfig/conf.avail/70-no-bitmaps-except-emoji.conf: Reject bitmap fonts except bitmap emoji fonts
- /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf: Reject bitmap fonts except bitmap emoji fonts (deprecated; use 70-no-bitmaps-except-emoji.conf)
- /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf: Accept bitmap fonts
- /usr/share/fontconfig/conf.avail/80-delicious.conf: No description
- /usr/share/fontconfig/conf.avail/90-synthetic.conf: No description
$ 

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2025-03-26 12:57:20

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [Workaround] setting through local.conf ignored by fontconfig ?

See whether it's just an order issue or JBMN is completely igored (missing, ended up the cause in one case, the other one is probably gnome-specific)

fc-match -s monospace

Trying to remove adwaita-fonts breaks to many things.

pacman -Rdd adwaita-fonts

But while annoyingly being jammed down your throat, it doesn't seem to come w/ any fontconfig files to prefer it anyway hmm

What is (in) /home/panoramix/.config/fontconfig/fonts.conf ?

Offline

#5 2025-03-26 13:24:23

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

Re: [Workaround] setting through local.conf ignored by fontconfig ?

$ fc-match -s monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
DejaVuSansMono-Oblique.ttf: "DejaVu Sans Mono" "Oblique"
AdwaitaMono-Regular.ttf: "Adwaita Mono" "Regular"
DejaVuMathTeXGyre.ttf: "DejaVu Math TeX Gyre" "Regular"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
JetBrainsMonoNLNerdFont-Regular.ttf: "JetBrainsMonoNL Nerd Font" "Regular"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
SyrCOMAdiabene.otf: "East Syriac Adiabene" "Regular"
SyrCOMKharput.otf: "Serto Kharput" "Regular"
8x16.pcf.gz: "Sony Fixed" "Regular"
clR8x16.pcf.gz: "Schumacher Clean" "Regular"
GohaTibebZemen.otf: "Goha-Tibeb Zemen" "Regular"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
9x15.pcf.gz: "Misc Fixed" "Regular"
cu12.pcf.gz: "MUTT ClearlyU Wide" "Regular"
cu-alt12.pcf.gz: "MUTT ClearlyU Alternate Glyphs Wide" "Regular"
cu-pua12.pcf.gz: "MUTT ClearlyU PUA" "Regular"
18x18ja.pcf.gz: "Misc Fixed Wide" "ja"
18x18ko.pcf.gz: "Misc Fixed Wide" "ko"
12x13ja.pcf.gz: "Misc Fixed Wide" "ja"
6x13.pcf.gz: "Misc Fixed" "SemiCondensed"
10x20.pcf.gz: "Misc Fixed" "Regular"
6x12.pcf.gz: "Misc Fixed" "SemiCondensed"
AdwaitaSans-Regular.ttf: "Adwaita Sans" "Regular"
$ 

What is (in) /home/panoramix/.config/fontconfig/fonts.conf ?

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- created by lxqt-config-appearance (DO NOT EDIT!) -->
<fontconfig>
  <include ignore_missing="yes">conf.d</include>
  <match target="font">
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</const>
    </edit>
  </match>
  <match target="font">
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit name="hintstyle" mode="assign">
      <const>hintslight</const>
    </edit>
  </match>
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
  <match target="pattern">
    <edit name="dpi" mode="assign">
      <double>96</double>
    </edit>
  </match>
</fontconfig>

It appears both ttf-dejavu & adwaita-fonts somehow override my local.conf .
With both removed  , JBMN is used :

$ fc-match monospace
JetBrainsMonoNLNerdFont-Regular.ttf: "JetBrainsMonoNL Nerd Font" "Regular"
[panoramix@silverbolt ~]$ fc-match -s monospace
JetBrainsMonoNLNerdFont-Regular.ttf: "JetBrainsMonoNL Nerd Font" "Regular"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
SyrCOMAdiabene.otf: "East Syriac Adiabene" "Regular"
SyrCOMKharput.otf: "Serto Kharput" "Regular"
Cantarell-VF.otf: "Cantarell" "Regular"
8x16.pcf.gz: "Sony Fixed" "Regular"
clR8x16.pcf.gz: "Schumacher Clean" "Regular"
GohaTibebZemen.otf: "Goha-Tibeb Zemen" "Regular"
9x15.pcf.gz: "Misc Fixed" "Regular"
cu12.pcf.gz: "MUTT ClearlyU Wide" "Regular"
cu-alt12.pcf.gz: "MUTT ClearlyU Alternate Glyphs Wide" "Regular"
cu-pua12.pcf.gz: "MUTT ClearlyU PUA" "Regular"
18x18ja.pcf.gz: "Misc Fixed Wide" "ja"
18x18ko.pcf.gz: "Misc Fixed Wide" "ko"
12x13ja.pcf.gz: "Misc Fixed Wide" "ja"
6x13.pcf.gz: "Misc Fixed" "SemiCondensed"
10x20.pcf.gz: "Misc Fixed" "Regular"
6x12.pcf.gz: "Misc Fixed" "SemiCondensed"
$ 

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2025-03-26 13:33:06

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [Workaround] setting through local.conf ignored by fontconfig ?

sudo mv /etc/fonts/local.conf /etc/fonts/conf.d/99-default_generic.conf

Offline

#7 2025-03-26 13:58:01

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

Re: [Workaround] setting through local.conf ignored by fontconfig ?

No change

Edit: After relogin / reboot also no change.

Last edited by Lone_Wolf (2025-03-26 14:11:37)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2025-03-26 14:17:50

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [Workaround] setting through local.conf ignored by fontconfig ?

No doesn't.

D'oh.
"JetBrainsMono Nerd Font Mono"
"JetBrainsMonoNL Nerd Font"
The font name probalby changed.

Offline

#9 2025-03-26 14:34:21

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

Re: [Workaround] setting through local.conf ignored by fontconfig ?

Still no change with the other name.

Nothing in journal, xorg log , dmesg ....
Any idea for a simple guaranteed to work snippet for local.conf to verify its content is used at all ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2025-03-26 14:39:20

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [Workaround] setting through local.conf ignored by fontconfig ?

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>monospace</family>
        <prefer><family>JetBrainsMonoNL Nerd Font</family></prefer>
    </alias>
</fontconfig>

Or break it:

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>monospace</family>
        <prefer><family>JetBrainsMonoNL Nerd Font</family></prefer>
    </wtf>
</fontconfig>

Now running xterm or so will yell an error message "Opening and ending tag mismatch"

Offline

#11 2025-03-26 14:53:13

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

Re: [Workaround] setting through local.conf ignored by fontconfig ?

first one

$ fc-match monospace
JetBrainsMonoNLNerdFont-Regular.ttf: "JetBrainsMonoNL Nerd Font" "Regular"
$ 

The 2nd one doesn't crash xterm or konsole

$ fc-match monospace
Fontconfig error: "/etc/fonts/local.conf", line 6: mismatched tag
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ 

It appears local.conf file is read, but the content of mine now fails silently.

Looks like I have to read up on font configuration syntax .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#12 2025-03-26 14:56:21

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [Workaround] setting through local.conf ignored by fontconfig ?

I've always used the preference approach *shrug*

Offline

#13 2025-03-27 09:43:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,466

Re: [Workaround] setting through local.conf ignored by fontconfig ?

Couldn't figure out what was wrong with math method, switched to prefer.

Marking as workaround .

Last edited by Lone_Wolf (2025-03-27 09:43:40)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB