๐Ÿ“ฆ joeriddles / Ligaturizer-UbuntuSansNF

Add ligatures to UbuntuSans Nerd Font

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ GNU General Public License v3.0
๐Ÿ“ฅ Clone https://github.com/joeriddles/Ligaturizer-UbuntuSansNF.git
HTTPS git clone https://github.com/joeriddles/Ligaturizer-UbuntuSansNF.git
SSH git clone git@github.com:joeriddles/Ligaturizer-UbuntuSansNF.git
CLI gh repo clone joeriddles/Ligaturizer-UbuntuSansNF
joeriddles joeriddles Update README, add zip to build.sh b746a89 11 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ fonts
๐Ÿ“„ .gitignore
๐Ÿ“„ .gitmodules
๐Ÿ“„ build.py
๐Ÿ“„ build.sh
๐Ÿ“„ char_dict.py
๐Ÿ“„ LICENSE
๐Ÿ“„ ligatures.py
๐Ÿ“„ ligaturize.py
๐Ÿ“„ Makefile
๐Ÿ“„ README.md
๐Ÿ“„ stat.py
๐Ÿ“„ testpattern
๐Ÿ“„ README.md

Ligaturizer #

[!IMPORTANT]
Simply run ./build.sh to generate patched version of UbuntuSans. Currently macOS is assumed.
> Forked from https://github.com/ToxicFrog/Ligaturizer

Add ligatures to any coding font!

This script copies the ligatures (glyphs and rendering information) from Fira Code into any other TrueType or OpenType font. (Note that the ligatures are scale-corrected, but otherwise copied as is from Fira Code; it doesn't create new ligature graphics based on the font you're modifying.)

This repo contains a Fontforge python script that you can use to add the Fira Code ligatures to any font, as well as submodules for some popular coding fonts and another script for ligaturizing all of them at once.

Requirements ##

This Repo: You'll need the repo and its submodules, so git clone with --recurse-submodules.

Using the Fonts: See the FiraCode README for a list of supported editors.

Script: This script requires FontForge python bindings. For Debian/Ubuntu they are available in python-fontforge package. For OpenSUSE and NixOS, they are included in the fontforge package. For macOS, they are available via brew (brew install fontforge).

Using the Script ##

Automatic ###

Use automatic mode to easily convert 1 or more font(s).

  • Put the font(s) you want into fonts/.
  • Edit ligatures.py to disable any ligatures you don't want, and/or enable any (non-ligature) characters you want from Fira Code in addition to the ligatures.
  • Edit build.py to add your new font(s) to the prefixed_fonts list. It supports globbing, so if (e.g.) you want to ligaturize all the different weights of FooFont you can add 'FooFont*' to the list.
  • Run make.
  • Retrieve the ligaturized fonts from fonts/output/.
  • The output fonts will be renamed with the prefix "Liga".

Manual ###

  • Move/copy the font you want to ligaturize into fonts/ (or somewhere else convenient).
  • Edit ligatures.py to disable any ligatures you don't want.
  • Run the script:
$ fontforge -lang py -script ligaturize.py path/to/input/font.ttf
        --output-dir=path/to/output/dir/ \
        --output-name='Name of Ligaturized Font'
e.g.

$ fontforge -lang py -script ligaturize.py fonts/Cousine-Regular.ttf
        --output-dir='fonts/output/' \
        --output-name='Ligaturized Cousine'

Which will produce fonts/output/LigaturizedCousine-Regular.ttf.

The font weight will be inherited from the original file; the font name will be replaced with whatever you specified in --output-name. You can also use --prefix instead, in which case the original name will be preserved and whatever you put in --prefix will be prepended to it.

ligatures.py supports some additional command line options to (e.g.) change which font ligatures are copied from or enable copying of individual character glyphs; run fontforge -lang=py ligaturize.py --help to list them.

Misc. ##

Credit ###

Hard forked from https://github.com/ToxicFrog/Ligaturizer (git history reset).

This script was originally written by IlyaSkriblovsky for adding ligatures to DejaVuSans Mono (dv-code-font). Navid Rojiani made a few changes to generalize the script so that it works for any font. ToxicFrog has made a large number of contributions.

Contributions ###

Contributions always welcome! Please submit a Pull Request, or create an Issue if you have an idea for a feature/enhancement (or bug).

Related Projects ###

For more awesome programming fonts with ligatures, check out: