nerd-fonts
nerd-fonts copied to clipboard
Natively bold letter symbols become extremely high in monospace editors
🗹 Requirements
- [x] I have searched the issues for my issue and found nothing related and/or helpful
- [x] I have searched the FAQ for help
- [x] I have searched the Wiki for help
🎯 Subject of the issue
Experienced behavior:
Natively bold unicode letters like 𝐅𝐎𝐎𝐁𝐀𝐑
are extremely high in a monospace editor like gedit.
Expected behavior:
𝐅𝐎𝐎𝐁𝐀𝐑
displays with normal height.
Example symbols:
𝐅𝐎𝐎𝐁𝐀𝐑
generated with: https://lingojam.com/BoldTextGenerator
🔧 Your Setup
-
Which font are you using (e.g.
Anonymice Powerline Nerd Font Complete.ttf
)? Tested with:- InconsolataNerdFont-Regular.ttf
- SauceCodeProNerdFontMono-Regular.ttf
-
Where did you get the file from (download link, self patched, source downloaded from link...)
-
git clone --filter=blob:none --sparse https://github.com/ryanoasis/nerd-fonts.git
-
git sparse-checkout add patched-fonts/{Inconsolata,SourceCodePro}
- copied to
~/.local/share/fonts/
-
-
Which terminal emulator are you using (e.g.
iterm2
,urxvt
,gnome
,konsole
)?- gnome
-
Are you using OS X, Linux or Windows? And which specific version or distribution?
- Linux, Fedora 39
★ Screenshots (Optional)
This is how hugely high line 4 becomes in gedit:
It seems to happen with every nerd font from https://www.nerdfonts.com/font-downloads While with any regular system-installed font there is no such issue.
It seems to happen with every nerd font
In my environment this happens with any font and in any application.
Oh, sorry to hear you have problems!
Hmm, just did one test, on my machine with Tilix and CaskadiaCove it does not happen
Ah gnome terminal you say ...
In my environment this happens with any font and in any application.
In my environment does not happen with any (of the two tested) applications
This must be something to do with your setup and what the fallback font is.
In my environment does not happen with any (of the two tested) applications
Are you serious? These aren't even alphabetic characters...
Firefox:
Tilix:
Are you serious? It's not even a font...
That it is working on my machine? Yes?!
Lets see, the codepoints are this:
The bold F
is U+1D405
.
$ fc-list :charset=1D405 family
DejaVu Math TeX Gyre
Latin Modern Math
TeX Gyre Pagella Math
TeX Gyre Termes Math
FreeSerif
TeX Gyre Schola Math
DejaVu Serif,DejaVu Serif Condensed
TeX Gyre Bonum Math
TeX Gyre DejaVu Math
FreeSans
DejaVu Serif
FreeMono
I have no clue which one is used, but the one randomly chosen seems good on my machine :-D
Anyhow that "bold codepoints" are not part of Nerd Fonts patching and not (at lost not many) of the to-be-patched fonts. That only works if some fontfallback like technique is active on your machine.
It's not even a font...
I edit it already
$ fc-list :charset=1D405 family
DejaVu Math TeX Gyre
DejaVu Serif,DejaVu Serif Condensed
Noto Sans Math
DejaVu Serif
Terminal enforces line height so it's not a good place to test. Please check a GUI plaintext editor like gedit
Mousepad:
@mooreye Please check with some more common GUI thing like Writer. Did you check the output of above fc-list
?
This is some font configuration thing; it has nothing to do with the patched fonts per se.
Edit: Typo
gedit via flatpak
Interestingly gedit
uses a different fallback font than writer
(on my system).
In writer
it is smaller (less tall) and has serifs; with gedit
it is slightly bigger and is a sans serif style.
Well, I have no preferences rules, as I never ever use these things.
Suggestion for @mooreye
- Find out which concrete fonts you have that supply these codepoints
- Select the one you like best
- Put that font into a preference rule in your fontconfig
If you never changed your fontconfig, this can be used as inspiration, but I am sure there are tons of example on SO or somewhere. https://github.com/ryanoasis/nerd-fonts/blob/-/10-nerd-font-symbols.conf
https://yaytext.com/blog/mathematical-unicode-letters/ :laughing:
But they are right:
Thank you all for trying to help with this.
I'm using Fedora 39.
I have Inconsolata
and SourceCodePro
fonts installed in ~/.local/share/fonts/
.
This is my ~/.config/fontconfig/fonts.conf
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>SauceCodePro Nerd Font Mono</string>
</edit>
</match>
<match target="pattern">
<test name="family" qual="any">
<string>proportional</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>SauceCodePro Nerd Font Propo</string>
</edit>
</match>
</fontconfig>
Command fc-match monospace
outputs SauceCodeProNerdFontMono-Regular.ttf: "SauceCodePro Nerd Font Mono" "Regular"
.
I have gedit
installed natively via dnf
.
With these Gedit settings, the issue happens:
When I untick Use the system fixed width font
, the issue resolves itself:
Command fc-match 'Monospace Regular'
outputs Vera.ttf: "Bitstream Vera Sans" "Regular"
.
And when I change to this font in Gedit, the issue is indeed resolved:
However, I want to use my Nerd Font. Is there some modification to fonts.conf
that can be made so these glyphs fall back to Bitstream Vera Sans Mono Regular
?
This didn't work:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>SauceCodePro Nerd Font Mono</string>
</edit>
<edit binding="strong" mode="prepend" name="family">
<string>Bitstream Vera Sans Mono</string>
</edit>
</match>
<match target="pattern">
<test name="family" qual="any">
<string>proportional</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>SauceCodePro Nerd Font Propo</string>
</edit>
<edit binding="strong" mode="prepend" name="family">
<string>Bitstream Vera Sans Mono</string>
</edit>
</match>
</fontconfig>
Where did you get the unpatched Vera from?
Can you show fc-list | grep Vera
;-D
But I guess I should not look at this until Nerd Fonts 3.2.0 is ready :grimacing:
fc-list | grep Vera
/usr/share/fonts/bitstream-vera-sans-mono-fonts/VeraMono.ttf: Bitstream Vera Sans Mono:style=Regular,Roman
/usr/share/fonts/bitstream-vera-serif-fonts/VeraSeBd.ttf: Bitstream Vera Serif:style=Bold
/usr/share/fonts/bitstream-vera-sans-fonts/Vera.ttf: Bitstream Vera Sans:style=Regular,Roman
/usr/share/fonts/bitstream-vera-sans-mono-fonts/VeraMoIt.ttf: Bitstream Vera Sans Mono:style=Oblique
/usr/share/fonts/bitstream-vera-sans-fonts/VeraBI.ttf: Bitstream Vera Sans:style=Bold Oblique
/usr/share/fonts/bitstream-vera-sans-fonts/VeraBd.ttf: Bitstream Vera Sans:style=Bold
/usr/share/fonts/bitstream-vera-serif-fonts/VeraSe.ttf: Bitstream Vera Serif:style=Regular,Roman
/usr/share/fonts/bitstream-vera-sans-mono-fonts/VeraMoBI.ttf: Bitstream Vera Sans Mono:style=Bold Oblique
/usr/share/fonts/bitstream-vera-sans-fonts/VeraIt.ttf: Bitstream Vera Sans:style=Oblique
/usr/share/fonts/bitstream-vera-sans-mono-fonts/VeraMoBd.ttf: Bitstream Vera Sans Mono:style=Bold
It's installed from dnf
:
rpm -qf /usr/share/fonts/bitstream-vera-sans-mono-fonts/VeraMono.ttf
bitstream-vera-sans-mono-fonts-1.10-48.fc38.noarch
Tnx. I'll try that after the 3.2.0 release
I don't know if this is the right place to report this, but I'm also having issues with bold fonts, but with the horizontal direction. When using ShureTech Regular and Propo, the bold characters overlap with the characters next to them. I noticed that this happens only with Shure, and no other Nerd Fonts that I've tested. I have currently disabled "bright colours rendered in bold" and it seems to take up less space and not overlap anymore.
@tukykarmakar That looks like ... Windows Terminal? ShureTech does not have a bold font, how is your font setup? That is most likely not the problem mentioned here, where the math-symbol-bold-letters have a problem.
Can you reproduce the problem with a simple echo
call?
@tukykarmakar That looks like ... Windows Terminal? ShureTech does not have a bold font, how is your font setup? That is most likely not the problem mentioned here, where the math-symbol-bold-letters have a problem.
That's Konsole, as it shows in the title bar. I downloaded the font from nerdfonts.com/font-downloads by clicking on the green Download button, then installed through the 3 .ttf files. Screenshot below
Can you reproduce the problem with a simple
echo
call?
Could you please provide an example command? My knowledge of the terminal is not that deep.
Hmm, can not reproduce.
Using Konsole Flatpak.
No change whether or not I activate Draw intense colors in bold font
You probably need echo -e
when using bash
.
As there just is no bold ShureTechMono Nerd Font
, where does your Konsole does get it from? Is there an option to autogenerate a bold font? Any other settings changed?
Hmm, this seems like a Konsole bug, when there is no bold font... sometimes it works, sometimes not.
It always works if the selected font actually HAS a bold font
But that is off topic here.
This Issue is about the unicode-math-symbols-bold-letters.
Please raise a new dedicated issue if there is anyhting more you need to discuss on the Konsole problem. But probably we can not do anything there. If you want a bold font, you should select a font that has a bold variant :grimacing: The bold you see there is probably something Konsole invented from thin air.