You are not logged in.
Installing package otf-font-awesome breaks fonts in apps. For example in firefox (or ungoogled chromium) on some sites like wikipedia.org i see blank pages with some random symbols and it replaces firefox default font and even if i choose different font in settings the problem stays. I also have Hack Nerd font insatlled and it works perfectly.
OS: Arch Linux x86_64
Kernel: 6.8.5-arch1-1
WM: Hyprland (Wayland)
So far I've tried:
sudo pacman -Suy
rebooting
installing font using pacman and just directly copying files into
/usr/share/fonts/OTF
and running
$ fc-cache
.
deleting my font and installing this one first.
creating config in
/etc/fonts/local.conf
which looked like
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>HackNerdFont</family>
</prefer>
</alias>
<alias>
<family>sans</family>
<prefer>
<family>Liberation Sans</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>HackNerdFont</family>
</prefer>
</alias>
</fontconfig>
and maybe a few different versions of this config but this one was the last one.
enabling 50-user.conf and 51-local.conf presets.
and something else i've already forgotten about.
Also
fc-match
outputs awesome when font is installed and it doesn't change no matter which configs i use.
Last edited by Tom Lipa (2024-04-20 21:21:35)
Offline
fc-match -s sans
fc-conflist
otf-font-awesome doesn't come w/ a config so it should™ not impact any defaults.
Offline
fc-match -s sans
Font Awesome 6 Brands-Regular-400.otf: "Font Awesome 6 Brands" "Regular"
Font Awesome 6 Free-Regular-400.otf: "Font Awesome 6 Free" "Regular"
HackNerdFont-Regular.ttf: "Hack Nerd Font" "Regular"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
Cantarell-VF.otf: "Cantarell" "Regular"
HackNerdFont-Bold.ttf: "Hack Nerd Font" "Bold"
Font Awesome 6 Free-Solid-900.otf: "Font Awesome 6 Free" "Solid"
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-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/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
+ /etc/fonts/conf.d/50-user.conf: Load per-user customization files
+ /etc/fonts/conf.d/51-local.conf: Load local customization file
+ /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-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/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/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.conf: Reject bitmap fonts
- /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
Offline
grep -Ri awesome /etc/fonts/conf.d/
Offline
No output
Offline
Actually there's more oddity: Hack, LiberationMono and SourceCodePro are all monospace fonts and should not match "sans" at all.
What happens if you install dejavu?
Offline
fc-match
DejaVuSans.ttf: "DejaVu Sans" "Book"
fc-match -s sans
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
Font Awesome 6 Brands-Regular-400.otf: "Font Awesome 6 Brands" "Regular"
Font Awesome 6 Free-Regular-400.otf: "Font Awesome 6 Free" "Regular"
HackNerdFont-Regular.ttf: "Hack Nerd Font" "Regular"
DejaVuMathTeXGyre.ttf: "DejaVu Math TeX Gyre" "Regular"
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
Cantarell-VF.otf: "Cantarell" "Regular"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold"
Font Awesome 6 Free-Solid-900.otf: "Font Awesome 6 Free" "Solid"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
Offline
Your fonts probably now work - you had no actual variable sans-serif font installed (besides *maybe* liberation sans, but that's now gone?) and fontconfig just resorted to some monospace font.
Once you installed awesome it took the main spot as it's (likely) not marked as fixed width.
Offline
Hmm. Yeah i restarted firefox and now i have dejavu there but i'm still curios why when awesome isn't instaleld i have HACK everywhere without any issues and why config is being ignored.
Offline
What config?
You're getting hack as a last resort.
The one you posted mapped sans to liberation sans which doesn't even seem to exist(?) and everything else to a mis-spelled version of hack
~/.config/fontconfig/conf.d/99-hack.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Hack Nerd Font</family>
</prefer>
</alias>
<alias>
<family>sans</family>
<prefer>
<family>Hack Nerd Font</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Hack Nerd Font</family>
</prefer>
</alias>
</fontconfig>
Offline
Thanks, i guess i get it maybe... But i still don't understand how to make HACK used as sans I mean i copied config you sent and
fc-match mono
gives me HACK, but how to make
fc-match sans
give me HACK instead of Dejavu?
Offline
You could try to unconditionally
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match>
<edit mode="prepend" name="family">
<string>Hack Nerd Font</string>
</edit>
</match>
</fontconfig>
Offline
Thank you, it worked. Exactly what i wanted. Have a good day.
Offline