ContributionsĬontributions always welcome! Please submit a Pull Request, or create an Issue if you have an idea for a feature/enhancement (or bug). ToxicFrog has made a large number of contributions. Navid Rojiani made a few changes to generalize the script so that it works for any font. A lookup might specify how to form ligatures or how to do kerning, or any of a number of. A lookup is a collection of commands that provide a text layout program with a transformation to apply on the input glyph stream. This script was originally written by IlyaSkriblovsky for adding ligatures to DejaVuSans Mono ( dv-code-font). You use the Lookups pane of the Element->Font Info command to control OpenType lookups. 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. 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. The font weight will be inherited from the original file the font name will be replaced with whatever you specified in -output-name. Which will produce fonts/output/LigaturizedCousine-Regular.ttf. $ fontforge -lang py -script ligaturize.py fonts/Cousine-Regular.ttf Move/copy the font you want to ligaturize into fonts/ (or somewhere else convenient).Įdit ligatures.py to disable any ligatures you don't want. The output fonts will be renamed with the prefix "Liga".The value should be a list of postscript glyph names separated by spaces. FontForge will sometimes be able to fill this in with the right default value, but not always. Retrieve the ligaturized fonts from fonts/output/. Glyph Ligature Substitution The ligature pane allows you to tell FontForge that the current glyph is a ligature composed of several other glyphs.It supports globbing, so if (e.g.) you want to ligaturize all the different weights of FooFont you can add 'FooFont*' to the list. Edit build.py to add your new font(s) to the prefixed_fonts list.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.Use automatic mode to easily convert 1 or more font(s). For macOS, they are available via brew ( brew install fontforge). For OpenSUSE and NixOS, they are included in the fontforge package. For Debian/Ubuntu they are available in python-fontforge package. ![]() Script: This script requires FontForge python bindings. Using the Fonts: See the FiraCode README for a list of supported editors. This Repo: You'll need the repo and its submodules, so git clone with -recurse-submodules. Here's a couple examples of the fonts generated: SF Mono & Menlo with ligatures (note the != and ->): Pre-ligaturized versions are available under releases. ![]() 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. (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 script copies the ligatures (glyphs and rendering information) from Fira Code into any other TrueType or OpenType font.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |