~protesilaos/dotfiles

fontconfig: use strong alias binding--- v1 PROPOSED

Juanjo Presa: 1
 fontconfig: use strong alias binding---

 1 files changed, 3 insertions(+), 3 deletions(-)
Hi, thanks for your reply!
Next
You are welcome!
Next
juanjop@x2100 ~> fc-match -s Monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
DejaVuSansMono-Oblique.ttf: "DejaVu Sans Mono" "Oblique"
iosevka-comfy-wide-fixed-regular.ttf: "Iosevka Comfy Wide Fixed" "Extended"
Hack-Regular.ttf: "Hack" "Regular"
FreeMono.ttf: "FreeMono" "Regular"
FreeSans.ttf: "FreeSans" "Regular"
FreeSerif.ttf: "FreeSerif" "Regular"
FiraSans-Regular.otf: "Fira Sans" "Regular"
DejaVuMathTeXGyre.ttf: "DejaVu Math TeX Gyre" "Regular"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"
texgyreschola-regular.otf: "TeX Gyre Schola" "Regular"
NotoEmoji-Regular.ttf: "Noto Emoji" "Regular"
unifont.ttf: "Unifont" "Regular"
texgyrechorus-mediumitalic.otf: "TeX Gyre Chorus" "Regular"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
LiberationSerif-Italic.ttf: "Liberation Serif" "Italic"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"

maybe because my OS set 

juanjop@x2100 /e/f/conf.d> cat 52-nixos-default-fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
<fontconfig>

  <!-- Default fonts -->
  <alias binding="same">
  <family>sans-serif</family>
  <prefer>
  <family>DejaVu Sans</family>

  </prefer>
</alias>


  <alias binding="same">
  <family>serif</family>
  <prefer>
  <family>DejaVu Serif</family>

  </prefer>
</alias>


  <alias binding="same">
  <family>monospace</family>
  <prefer>
  <family>DejaVu Sans Mono</family>

  </prefer>
</alias>


  <alias binding="same">
  <family>emoji</family>
  <prefer>
  <family>Noto Color Emoji</family>

  </prefer>
</alias>


</fontconfig>


I guess binding "same" to DejaVu Sans Mono makes it "same" that
monospace. Taking priority against prefer without binding.
This has to be it.  Or at least some other config like it.  As far as I
can tell, the "same" binding is meant to be a substitution rule: if you
want to make, say, "DjvU Sns" actually use "DejaVu Sans".  It does not
feel right to use it for the generic sans, sans-serif, and monospace
families.

I can send you the entire fonts directory that Arch has, if you want to
check it out.  Though it does not need to be done on this list.
Sure, it have not sense, I'll report it upstream in NixOS repository.
Next
Okay.  Please keep me posted.
https://github.com/NixOS/nixpkgs/pull/177411
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~protesilaos/dotfiles/patches/32414/mbox | git am -3
Learn more about email & git

[PATCH] fontconfig: use strong alias binding--- Export this patch

Hi Prot, I just discover your user fontconfig config is not strong
enough to replace some OS (NixOS) fontconfig defaults. I research the
problem and have found this solution. For reference:
https://bbs.archlinux.org/viewtopic.php?pid=1867659#p1867659
I hope you found the solution good enough to merge in your codebase.
Regards,

---
 fontconfig/.config/fontconfig/conf.d/60-latin.conf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fontconfig/.config/fontconfig/conf.d/60-latin.conf b/fontconfig/.config/fontconfig/conf.d/60-latin.conf
index fc7278e0..4b6d02e9 100644
--- a/fontconfig/.config/fontconfig/conf.d/60-latin.conf
+++ b/fontconfig/.config/fontconfig/conf.d/60-latin.conf
@@ -7,7 +7,7 @@

  <description>Set preferable fonts for Latin</description>

  <alias>
  <alias binding="strong">
    <family>serif</family>
    <prefer>
      <family>Noto Serif</family>
@@ -17,7 +17,7 @@
      <family>DejaVu Serif</family>
    </default>
  </alias>
  <alias>
  <alias binding="strong">
    <family>sans-serif</family>
    <prefer>
      <family>FiraGO</family>
@@ -29,7 +29,7 @@
      <family>DejaVu Sans</family>
    </default>
  </alias>
  <alias>
  <alias binding="strong">
    <family>monospace</family>
    <prefer>
      <!-- My custom build of Iosevka has a "wide" variant that I
-- 
2.33.3



-- 
Juanjo Presa
https://nadanix.com
Hello there!
What exactly is the issue you have encountered?  These have worked fine
for me on Debian and now on Arch (probably for more than 3 years).
Maybe Nix does something differently?  Or maybe some settings' daemon is
misbehaving?