Renamed input/output directories

Also cleaned up README.
This commit is contained in:
Navid Rojiani 2017-09-22 19:58:11 -07:00
parent 094e29fd87
commit 885b5835a2
42 changed files with 31 additions and 22 deletions

View File

@ -2,24 +2,25 @@
![](img.png)
This repo contains:
1. A script [ligaturize.py](ligaturize.py) to add the ligatures from [Fira Code](https://github.com/tonsky/FiraCode) to a font without ligatures
2. Programming fonts with ligatures added (generated using the above script), including:
**Add ligatures to any coding font!**
* Anonymous Pro
* CamingoCode
* Cousine
* DejaVu Sans Mono
* Droid Sans Mono
* Hack
* Inconsolata-g
* Inconsolata
* Meslo (sizes: LGL, LGLDZ, LGM, LGMDZ, LGS, LGSDZ)
* Oxygen Mono
* Roboto Mono
* SF Mono
* Ubuntu Mono
* edlo
What this repo contains:
1. Programming fonts with ligatures added (in `output-fonts/`), including:
* Anonymous Pro
* CamingoCode
* Cousine
* DejaVu Sans Mono
* Droid Sans Mono
* Hack
* Inconsolata-g
* Inconsolata
* Meslo (sizes: LGL, LGLDZ, LGM, LGMDZ, LGS, LGSDZ)
* Oxygen Mono
* Roboto Mono
* SF Mono
* Ubuntu Mono
* edlo
2. A script [ligaturize.py](ligaturize.py) that adds the ligatures from [Fira Code](https://github.com/tonsky/FiraCode) to a font without ligatures
**Credit**: This awesome script was written by [IlyaSkriblovsky](https://github.com/IlyaSkriblovsky) for adding ligatures to Deja Vu Sans Mono ([dv-code-font](https://github.com/IlyaSkriblovsky/dv-code-font)). I've just made a few minor changes to generalize the script so that it works for any given font.
@ -30,13 +31,21 @@ they are available via brew (`brew install fontforge`).
**Using the Fonts**: See the [FiraCode README](https://github.com/tonsky/FiraCode) for a list of supported editors.
## Using the Script ##
1. Move/copy the font you want to ligaturize into `source-fonts/`
1. Move/copy the font you want to ligaturize into `input-fonts/`
2. Run the script: `$ fontforge -lang=py ligaturize.py`
3. You'll be prompted for the name of the font, and the name for the generated font. Example:
```
```shell
fontforge -lang=py ligaturize.py
...
Enter the source font filename (including extension): RobotoMono-Regular.ttf
Enter a name for your ligaturized font -- or press ENTER to use the same name: <PRESS ENTER>
...
Generated ligaturized font Roboto Mono L in ligaturized-fonts/RobotoMono.ttf
```
```shell
fontforge -lang=py ligaturize.py
Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
...
Enter the source font filename (including extension): RobotoMono-Regular.ttf
Enter a name for your ligaturized font -- or press ENTER to use the same name: RobotoMonoL

Binary file not shown.

View File

@ -4,8 +4,8 @@ import fontforge
import os
# Constants
SOURCE_FONT_DIR = "source-fonts"
OUTPUT_FONT_DIR = "ligaturized-fonts"
SOURCE_FONT_DIR = "input-fonts"
OUTPUT_FONT_DIR = "output-fonts"
COPYRIGHT = '\nProgramming ligatures added by Ilya Skriblovsky from FiraCode\nFiraCode Copyright (c) 2015 by Nikita Prokopov'
def get_input_fontname():

Binary file not shown.