Tools and instructions on how to have awesome symbols in a terminal with a monospace font
Shell
2,524
73 commits
updated Jan 16, 2024
Why do you want to use fancy symbols in your standard monospace font? Obviously to have a fancy prompt like mine :-)

And because when you live in a terminal a symbol can convey more informations in less space creating a dense and beautiful (for those who have a certain aesthetic taste) informative workspace
Heavily inspired by https://github.com/Lokaltog/vim-powerline and the relative patch script from Kim Silkebækken (kim.silkebaekken+vim@gmail.com)
There are two strategies that could be used to have symbols in a terminal
freetype2 font engine, basically you can say that whenever the current font doesn't have a glyph for a certain codepoint then fallback and go look into other fonts (fallback strategy)Initially I used the first strategy, later I switched to the second. The patching strategy it's more reliable and portable, the problem is that you need to patch every monospace font you want to use and patching a single font it's a lot of manual fine tuning. If you want you can find all previous patched fonts in patching-strategy branch
Referring to glyphs by codepints (eg. \uf00c) in your scripts or shell configuration it's not recommended because icon fonts like Font Awesome use code points ranges those ranges are not disciplined by the unicode consortium, every font can associate every glyphs to those codepoints. This means that Font Awesome can choose to move glyphs around freely, today \uf00c is associated to the check symbol, tomorrow it can be associated to something else. Moreover, more than one icon font can use the same codepoint for different glyphs and if we want to use them both we need to move one of them. So, if you use a codepoint to refer to a glyph after an update that codepoint can point to another glyph. To avoid this situation you can use the font maps in the ./build directory, font maps are scripts which define shell variables that give names to glyphs, by sourcing those files in your shell you can refer to glyphs by name (eg. $CODEPOINT_OF_AWESOME_CHECK).
TLDR: don't refer to glyphs by codepoints (eg. \uf00c) but by name (eg. $CODEPOINT_OF_AWESOME_CHECK) to make your scripts and shell configurations resilient to future updates. To do that don't forget to copy font maps (*.sh files) in the ./build directory in your home directory and to source them in your shell startup
In this repository you can find a bunch of fonts that I use as symbol fonts with the relative font maps
./fonts/fontawesome-regular.ttf, for further informations and license see http://fortawesome.github.io/Font-Awesome./fonts/devicons-regular.ttf, for further informations and license see https://github.com/vorillaz/devicons./fonts/octicons-regular.ttf, for further informations and license see https://github.com/blog/1135-the-making-of-octicons./fonts/pomicons-regular.ttf, for further informations and license see https://github.com/gabrielelana/pomicons./build directory to ~/.fonts directory*.sh files) from ./build directory to ~/.fonts directoryfc-cache -fv ~/.fonts to let freetype2 know of those fonts./config/10-symbols.conf replacing PragmataPro with the name of the font you want to use in the terminal (I will add more fonts in the future so that this step could be skippable)~/.config/fontconfig/conf.d directorysource ~/.fonts/*.sh) in your shell startup script (eg. ~/.bashrc or ~/.zshrc)We have been included in the official repositories, so if you are running an Arch Linux
pacman -Syu awesome-terminal-fonts*.sh files) from ./build directory to ~/.fonts directorysource ~/.fonts/*.sh) in your shell startup script (eg. ~/.bashrc or ~/.zshrc)Set-ExecutionPolicy RemoteSigned./install.ps11,693 followers · starred Mar 2022
513 followers · starred Sep 2022
400 followers · starred Dec 2021
69 followers · starred Feb 2015
Tools and instructions on how to have awesome symbols in a terminal with a monospace font
Shell
2,524
73 commits
updated Jan 16, 2024
Why do you want to use fancy symbols in your standard monospace font? Obviously to have a fancy prompt like mine :-)

And because when you live in a terminal a symbol can convey more informations in less space creating a dense and beautiful (for those who have a certain aesthetic taste) informative workspace
Heavily inspired by https://github.com/Lokaltog/vim-powerline and the relative patch script from Kim Silkebækken (kim.silkebaekken+vim@gmail.com)
There are two strategies that could be used to have symbols in a terminal
freetype2 font engine, basically you can say that whenever the current font doesn't have a glyph for a certain codepoint then fallback and go look into other fonts (fallback strategy)Initially I used the first strategy, later I switched to the second. The patching strategy it's more reliable and portable, the problem is that you need to patch every monospace font you want to use and patching a single font it's a lot of manual fine tuning. If you want you can find all previous patched fonts in patching-strategy branch
Referring to glyphs by codepints (eg. \uf00c) in your scripts or shell configuration it's not recommended because icon fonts like Font Awesome use code points ranges those ranges are not disciplined by the unicode consortium, every font can associate every glyphs to those codepoints. This means that Font Awesome can choose to move glyphs around freely, today \uf00c is associated to the check symbol, tomorrow it can be associated to something else. Moreover, more than one icon font can use the same codepoint for different glyphs and if we want to use them both we need to move one of them. So, if you use a codepoint to refer to a glyph after an update that codepoint can point to another glyph. To avoid this situation you can use the font maps in the ./build directory, font maps are scripts which define shell variables that give names to glyphs, by sourcing those files in your shell you can refer to glyphs by name (eg. $CODEPOINT_OF_AWESOME_CHECK).
TLDR: don't refer to glyphs by codepoints (eg. \uf00c) but by name (eg. $CODEPOINT_OF_AWESOME_CHECK) to make your scripts and shell configurations resilient to future updates. To do that don't forget to copy font maps (*.sh files) in the ./build directory in your home directory and to source them in your shell startup
In this repository you can find a bunch of fonts that I use as symbol fonts with the relative font maps
./fonts/fontawesome-regular.ttf, for further informations and license see http://fortawesome.github.io/Font-Awesome./fonts/devicons-regular.ttf, for further informations and license see https://github.com/vorillaz/devicons./fonts/octicons-regular.ttf, for further informations and license see https://github.com/blog/1135-the-making-of-octicons./fonts/pomicons-regular.ttf, for further informations and license see https://github.com/gabrielelana/pomicons./build directory to ~/.fonts directory*.sh files) from ./build directory to ~/.fonts directoryfc-cache -fv ~/.fonts to let freetype2 know of those fonts./config/10-symbols.conf replacing PragmataPro with the name of the font you want to use in the terminal (I will add more fonts in the future so that this step could be skippable)~/.config/fontconfig/conf.d directorysource ~/.fonts/*.sh) in your shell startup script (eg. ~/.bashrc or ~/.zshrc)We have been included in the official repositories, so if you are running an Arch Linux
pacman -Syu awesome-terminal-fonts*.sh files) from ./build directory to ~/.fonts directorysource ~/.fonts/*.sh) in your shell startup script (eg. ~/.bashrc or ~/.zshrc)Set-ExecutionPolicy RemoteSigned./install.ps11,693 followers · starred Mar 2022
513 followers · starred Sep 2022
400 followers · starred Dec 2021
69 followers · starred Feb 2015