ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
52.6k stars 3.59k forks source link

Add linux console support for Nerd Font #1663

Closed Qwer-TeX closed 4 days ago

Qwer-TeX commented 1 week ago

Requirements

Is your feature request related to a problem? Please describe. I've tried running Neovim/Vim in the linux console ( aka CLI ) and it seems that the linux console uses psf (PC Screen Font) format while NerdFonts use the TTF font format. The glyphs are displayed as small diamonds in the linux console.

Describe the solution you'd like What I want is to see if you can make it possible to add support for linux console fonts because some of the ttf2psf utilities I tried are crappy - I don't know how to use them.

Describe alternatives you've considered I wasn't able to find anything useful as an alternative. I tried using tmux on linux console but it still produced the same pink diamonds instead of the proper glyphs.

Additional context Idk if there is any other way to make linux console support ttf font format. Chatgpt wasn't also useful here either.

Finii commented 1 week ago

What is "the Linux console (aka CLI)"? Can you give the proper name of that terminal emulator?

Chatgpt wasn't also useful here either.

🤣 Thats a good one.

Qwer-TeX commented 1 week ago

@Finii It's not a terminal emulator. It's the bare bones command line interface. The one you can access using Ctrl+Alt+F(1,2,3,4,etc)

Finii commented 1 week ago

Ah, yes 🤦‍♀️

Yesteryear that font was predetermined by the VGA card's BIOS 😬 How is it done nowadays? I have no clue. Any pointers?

All the icons are outlines, and the main target of Nerd Fonts are outline fonts (i.e. OpenType fonts like ttf and otf). Anyhow, one can look into that; but I would need to get some impluse where to start without loosing to much time finding basics of how to manipulate that console out. I use it only as last resort when XWin crashed or something ;-)

Finii commented 1 week ago

Note to self:

One problem as I see it right now is that the font system is bad old codepage based, so only 256 characters. Even though unicode is used that is really limiting (I would say impossible to use for something like Nerd Fonts). We could substitude some lesser used glyphs with the powerline ones, but even powerline-extended seems like a stretch; and then the question is if this helps at all.

Qwer-TeX commented 1 week ago

I guess that to support nerd fonts the linux console would need a extensive rewrite in the kernel source.

Finii commented 4 days ago

Yes. With only 256 glyphs (codepages, I thought that stuff is so old it would not be in Linux at all, but codepages seem to hound us forever) I could only imagine to add the powerline (core) glyphs; I mean substitute some other glyphs with powerline glyphs, but ... that will break uses where these other glyphs are expected.

So I guess it is just not feasible, unfortunately.