<commit_before># Why?

Why do you want to use fancy symbols in your standard monospace font? Obviously to have a fancy prompt like mine :-)

![prompt](https://github.com/gabrielelana/awesome-terminal-fonts/raw/master/why.png)

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 **<NAME>** (<EMAIL>)

You can find every patched font in `./patched` directory:
* ./patched/Droid+Sans+Mono+Awesome.ttf (for further informations and license see <http://www.droidfonts.com>)
* ./patched/Inconsolata+Awesome.ttf (for further informations and license see <http://www.levien.com/type/myfonts/inconsolata.html>)

Every font is patched with the following icon fonts:
* ./fonts/fontawesome-webfont.ttf (for further informations and license see <http://fortawesome.github.io/Font-Awesome>)
* ./fonts/octicons-regular.ttf (for further informations and license see <https://github.com/blog/1135-the-making-of-octicons>)
* ./fonts/trellicons-regular.ttf (for further informations and license see <http://blog.fogcreek.com/trello-uses-an-icon-font-and-so-can-you>)

If you use these fonts for <https://github.com/Lokaltog/vim-powerline> then you should have this in your .vimrc

```vimscript
let g:Powerline_symbols = 'fancy'
let g:Powerline_dividers_override = [[0xe0b0], [0xe0b1], [0xe0b2], [0xe0b3]]
let g:Powerline_symbols_override = {
  \ 'BRANCH': [0xe238],
  \ 'RO'    : [0xe0a2],
  \ 'FT'    : [0xe1f6],
  \ 'LINE'  : [0xe0a1],
\ }
```

## How to patch

You need to have installed fontforge with Python bindings. For Ubuntu users the required package is **python-fontforge**, for Arch Linux users the required package is **fontforge**. It should be something similar for other distros.

Every font to patch has a dedicated script because for a really good result some parameters have to be manually tuned :-) so for example to patch by yourself `Droid Sans Mono` you should run

```shell
$ ./droid.sh
```<commit_msg>explained the patching vs fallback strategy<commit_after># Why?
Why do you want to use fancy symbols in your standard monospace font? Obviously to have a fancy prompt like mine :-)

![prompt](https://github.com/gabrielelana/awesome-terminal-fonts/raw/master/why.png)

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 **<NAME>** (<EMAIL>)

# Patching vs Fallback
There's two strategy that could be used to use symbols in a terminal
* you can take a bunch of symbol fonts, your favourite monospace font and merge them together (patching strategy) 
* you can use a feature of 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 work. If you want you can find all previous patched fonts in [patching-strategy branch](https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy)

# Font Map
* ... TODO

# How to install
* copy all the fonts from `./build` directory to `~/.fonts` directory
* run `fc-cache -fv ~/.fonts` to let freetype2 know of those fonts
* customize the configuration file `./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)
* copy the above configuration file to `~/.config/fontconfig/conf.d` directory
{'fraction_non_alphanumeric': 0.09187453692269697, 'fraction_numerical': 0.008150160533465053, 'mean_word_length': 4.525238744884038, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1906320', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1165, 'n_words': 508}