Crossterm - self designed glyph

Since crossterm supports unicode, and unicode has pua areas, I wonder if it is possible to self design a glyph and use it within a crossterm terminal app.

Not been able to find any examples of this - so I guess not?

The relationship between codepoints and the glyphs displayed is defined by the font used in the terminal. To the best of my knowledge, this is a purely user-controlled setting that can't be affected by programs running in the terminal.

If this is for your own personal use, or some other controlled environment, you can dive into the world of font design and make one that has your custom glyphs in the PUA. As long as your program is running in a terminal using your font, outputting the PUA codepoint will then show your custom glyph.

Any wider distribution than that, however, is unlikely to see much adoption— People often have strong opinions about things like fonts, and won't want to change the setting just to run your program.

5 Likes

A custom font is the way the popular GitHub - romkatv/powerlevel10k: A Zsh theme displays its symbols.

Depending on the terminal emulator, you may be able to use sixels to draw individual pixels.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.