Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some fonts do not support some utf symbols #1798

Closed
3 tasks done
hikamaree opened this issue Feb 12, 2025 · 10 comments
Closed
3 tasks done

some fonts do not support some utf symbols #1798

hikamaree opened this issue Feb 12, 2025 · 10 comments

Comments

@hikamaree
Copy link

Requirements

  • I have searched the issues for my issue and found nothing related or helpful
  • I have searched the FAQ for help
  • I have checked the Wiki for help

Experienced Behavior

Most fonts do not support some symbols (eg the symbol for the graph in btop). I tried JetBrainsMono and SauceCodePro, but the only font that supports these symbols is Iosevka. I also tried this package on arch linux ttf-nerd-fonts-symbols but it doesn't work either. Here is the difference between JetBrainsMono and Iosevka

Expected Behavior

No response

Example Symbols or Text

btop: ⣀⣄⣀⣠⣀⣦⣀
neovim: ★

Font Used

JetBrainsMono, SauceCodePro, ttf-nerd-fonts-symbols

Source of Font File

https://archlinux.org/packages/extra/any/ttf-jetbrains-mono-nerd/, https://archlinux.org/packages/extra/any/ttf-sourcecodepro-nerd/, https://archlinux.org/packages/extra/any/ttf-nerd-fonts-symbols/

Terminal Emulator (and the title of the terminal window)

alacritty

Operating System and Version

Arch Linux

Screenshots

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

The neovim star is codepoint 2605. I also use neovim, where does it show up there? I mean, is that some plugin, or how do I get that info page?

The symbols (mis)used in btop is Braille. 28c0 28c4 28c0 28e0 28c0 28e6 28c0
See

Both are not part of the Nerd Font icon set, and thus are not added to the fonts. If one font has them (Iosevka) it had them already before patching.

The Braille implementation in Iosevka is ... optimized for graphics output and renders them useless for their original purpose - you can not read that Braille anymore. See discussion in the PR mentioned above.

I font fallback not working in Alacritty? Did you try some more user friendly (less speed optimized) terminal? Would be interesting if Ghostty supports font fallback 🤔

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

Image

Box drawing (2500 - 25FF) is part of Nerd Fonts, Braille (2800 - 28FF) is not.

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

https://github.com/aristocratos/btop#notice-text-rendering-issues

Image

So the question remains why font fallback is (seems to be) not working in Alacritty. I would check some other terminal ;-)
Do you need speed so desperately that a terminal that actually cares about how text needs to be rendered correctly is too slow for you? (i.e. dumping megabytes of text through the terminal as opposed to use the terminal for human interaction)

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

A quick search looks like Alacritty should probably support font fallback. Ghostty (which is also fast 😉) does, I guess. 😀

To solve your problem I would try to get font fallback running on your system and follow the fallback font advice given with btop. If you have Iosevka installed on your system it should be fallen back to automagically, though, so it is unclear why that does not happen.

Adding Braille, as you see in the PR, is a bit problematic, because - especially how it is optimized for misuse in Iosevka - it is unclear what we want and what we are prepared for to break. After the CJK Compatibility Forms and Arabic Presentation Forms-B debacle I am rather hesitant to be non-unicode-conformant (and that is what Iosevka does 😬)

@hikamaree
Copy link
Author

I managed to set the fallback font in alacritty, sometimes it looks a bit off like here for example, but it's ok.

Image

@hikamaree
Copy link
Author

The neovim star is codepoint 2605. I also use neovim, where does it show up there? I mean, is that some plugin, or how do I get that info page?

If you use lazy plugin manager, type :Lazy and go to the profile tab.

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

go to the profile tab.

Image

Ah I see.

That should also come in via font-fallback, can you

$ fc-list :charset=2605

Image

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

sometimes it looks a bit off like here for example

Hmm, but that is the non-Braille mode of btop 🤔

If the stars (also) do not font-fallback, maybe the fallback is not working correctly.
Still I would recommend trying some 'simple' terminal first to resolve possible fallback things, and then look at Alacritty and its specialties.

@hikamaree
Copy link
Author

That should also come in via font-fallback, can you

$ fc-list :charset=2605

$ fc-list :charset=2605
󰣇 ~ > fc-list :charset=2605
/usr/share/fonts/TTF/IosevkaNerdFont-SemiBoldItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF SemiBold:style=SemiBold Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Italic.ttf: Iosevka Nerd Font Propo,Iosevka NFP:style=Italic
/usr/share/fonts/TTF/IosevkaNerdFont-Bold.ttf: Iosevka Nerd Font,Iosevka NF:style=Bold
/usr/share/fonts/TTF/IosevkaNerdFontMono-ExtraBoldOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM ExtraBold Obl:style=ExtraBold Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Regular.ttf: Iosevka Nerd Font Mono,Iosevka NFM:style=Regular
/usr/share/fonts/TTF/IosevkaNerdFont-Thin.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Thin:style=Thin,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-MediumItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Medium:style=Medium Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-HeavyItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Heavy:style=Heavy Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-MediumOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Medium Obl:style=Medium Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Heavy.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Heavy:style=Heavy,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-BoldItalic.ttf: Iosevka Nerd Font,Iosevka NF:style=Bold Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-LightOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Light Obl:style=Light Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-Light.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Light:style=Light,Regular
/usr/share/fonts/TTF/IosevkaNerdFontMono-BoldItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM:style=Bold Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ExtraBoldItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP ExtraBold:style=ExtraBold Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ExtraLightItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP ExtraLight:style=ExtraLight Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-SemiBoldOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP SemiBold Obl:style=SemiBold Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-ExtraBoldItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF ExtraBold:style=ExtraBold Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-LightOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Light Obl:style=Light Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Medium.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Medium:style=Medium,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ExtraLight.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-ExtraLightOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF ExtraLight Obl:style=ExtraLight Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-HeavyItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Heavy:style=Heavy Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Bold.ttf: Iosevka Nerd Font Propo,Iosevka NFP:style=Bold
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Light.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Light:style=Light,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-ThinOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Thin Obl:style=Thin Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-MediumOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Medium Obl:style=Medium Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ExtraLight.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Medium.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Medium:style=Medium,Regular
/usr/share/fonts/TTF/IosevkaNerdFontMono-SemiBoldOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM SemiBold Obl:style=SemiBold Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-BoldItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP:style=Bold Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ThinItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Thin:style=Thin Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ThinOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Thin Obl:style=Thin Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-LightItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Light:style=Light Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ExtraBoldOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP ExtraBold Obl:style=ExtraBold Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Italic.ttf: Iosevka Nerd Font Mono,Iosevka NFM:style=Italic
/usr/share/fonts/TTF/IosevkaNerdFont-Italic.ttf: Iosevka Nerd Font,Iosevka NF:style=Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-SemiBoldItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP SemiBold:style=SemiBold Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-BoldOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Obl:style=Bold Oblique,Bold Italic
/usr/share/fonts/TTF/IosevkaNerdFont-Oblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Obl:style=Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Oblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Obl:style=Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-MediumItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Medium:style=Medium Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ThinItalic.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Thin:style=Thin Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ExtraLightOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM ExtraLight Obl:style=ExtraLight Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Thin.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Thin:style=Thin,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-ThinItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Thin:style=Thin Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-Medium.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Medium:style=Medium,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-SemiBoldOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF SemiBold Obl:style=SemiBold Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-LightOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Light Obl:style=Light Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-SemiBoldItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM SemiBold:style=SemiBold Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Thin.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Thin:style=Thin,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-ExtraBold.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF ExtraBold:style=ExtraBold,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ExtraBold.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP ExtraBold:style=ExtraBold,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ThinOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Thin Obl:style=Thin Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-Regular.ttf: Iosevka Nerd Font,Iosevka NF:style=Regular
/usr/share/fonts/TTF/IosevkaNerdFontMono-LightItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Light:style=Light Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-ExtraBoldOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF ExtraBold Obl:style=ExtraBold Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ExtraBoldItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM ExtraBold:style=ExtraBold Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Light.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Light:style=Light,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-SemiBold.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF SemiBold:style=SemiBold,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-Heavy.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Heavy:style=Heavy,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-LightItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Light:style=Light Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ExtraBold.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM ExtraBold:style=ExtraBold,Regular
/usr/share/fonts/TTF/IosevkaNerdFontMono-HeavyItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Heavy:style=Heavy Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Regular.ttf: Iosevka Nerd Font Propo,Iosevka NFP:style=Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-Heavy.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Heavy:style=Heavy,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-SemiBold.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP SemiBold:style=SemiBold,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-BoldOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Obl:style=Bold Oblique,Bold Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-MediumOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Medium Obl:style=Medium Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-SemiBold.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM SemiBold:style=SemiBold,Regular
/usr/share/fonts/TTF/IosevkaNerdFont-ExtraLight.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/TTF/IosevkaNerdFontPropo-ExtraLightOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP ExtraLight Obl:style=ExtraLight Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Oblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Obl:style=Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-BoldOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Obl:style=Bold Oblique,Bold Italic
/usr/share/fonts/TTF/IosevkaNerdFontPropo-HeavyOblique.ttf: Iosevka Nerd Font Propo,Iosevka NFP,Iosevka NFP Heavy Obl:style=Heavy Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-HeavyOblique.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM Heavy Obl:style=Heavy Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-MediumItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Medium:style=Medium Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-Bold.ttf: Iosevka Nerd Font Mono,Iosevka NFM:style=Bold
/usr/share/fonts/TTF/IosevkaNerdFont-ExtraLightItalic.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF ExtraLight:style=ExtraLight Italic,Italic
/usr/share/fonts/TTF/IosevkaNerdFont-HeavyOblique.ttf: Iosevka Nerd Font,Iosevka NF,Iosevka NF Heavy Obl:style=Heavy Oblique,Italic
/usr/share/fonts/TTF/IosevkaNerdFontMono-ExtraLightItalic.ttf: Iosevka Nerd Font Mono,Iosevka NFM,Iosevka NFM ExtraLight:style=ExtraLight Italic,Italic

@Finii
Copy link
Collaborator

Finii commented Feb 13, 2025

So fontconfig finds the glyph (in all the Iosevkas), somehow fallback is not working (in Alacritty)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants