Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunset ligature removal #977

Merged
merged 1 commit into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/scripts/gotta-patch-em-all-font-patcher!.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function patch_font {
if [ -f "$config_parent_dir/config.json" ]
then
# load font configuration file and remove ligatures (for mono fonts):
# (tables have been removed from the repo with >this< commit)
font_config="--removeligatures --configfile $config_parent_dir/config.json"
else
font_config=""
Expand Down
1 change: 1 addition & 0 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ class font_patcher:

def remove_ligatures(self):
# let's deal with ligatures (mostly for monospaced fonts)
# the tables have been removed from the repo with >this< commit
if self.args.configfile and self.config.read(self.args.configfile):
if self.args.removeligatures:
print("Removing ligatures from configfile `Subtables` section")
Expand Down
19 changes: 17 additions & 2 deletions src/config.sample.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
[Subtables]
ligatures: [
"Single Substitution lookup 1 subtable" ]
ligatures: [
"'dlig' Discretionary Ligatures lookup 9 subtable",
"'dlig' Discretionary Ligatures lookup 11 subtable",
"'dlig' Discretionary Ligatures lookup 12 contextual 0",
"'dlig' Discretionary Ligatures lookup 12 contextual 1",
"'dlig' Discretionary Ligatures lookup 12 contextual 2",
"'dlig' Discretionary Ligatures lookup 18 subtable",
"'dlig' Discretionary Ligatures lookup 19 contextual 0",
"'dlig' Discretionary Ligatures lookup 24 contextual 0",
"'dlig' Discretionary Ligatures lookup 24 contextual 1",
"'dlig' Discretionary Ligatures lookup 24 contextual 2",
"'dlig' Discretionary Ligatures lookup 24 contextual 3",
"'dlig' Discretionary Ligatures lookup 24 contextual 4",
"'dlig' Discretionary Ligatures lookup 24 contextual 5",
"'dlig' Discretionary Ligatures lookup 26 subtable",
"'dlig' Discretionary Ligatures lookup 33 contextual 0",
"'dlig' Discretionary Ligatures lookup 33 contextual 1" ]
13 changes: 7 additions & 6 deletions src/readme-per-directory-addendum.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,28 @@
* If you are on Windows pick a font with the `'Windows Compatible'` suffix.
* This includes specific tweaks to ensure the font works on Windows, in particular monospace identification and font name length limitations
* If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with the `'Mono'` suffix.
* This denotes that the Nerd Font glyphs will be monospaced not necessarily that the entire font will be monospaced
* If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `'Mono'` suffix. Most terminals support this, but ymmv.

### Ligatures

By the *Nerd Font* policy, the variant with the `'Mono'` suffix is not supposed to have any ligatures.
Use the non-*Mono* variants to have ligatures.
Ligatures are generally preserved in the patched fonts.
Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`.
If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings.

### Explanation

Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:

#### `Option 1: Download already patched font`

* download an already patched font from the `complete` folder
* This is most likely the one you want. It includes **all** of the glyphs from all of the glyph sets. Only caution here is that some fonts have glyphs in the _same_ code point so to include everything some had to be moved to alternate code points.
* For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases)
* Or download the development version from the `complete` folder here

#### `Option 2: Patch your own font`

* patch your own variations with the various options provided by the font patcher (see each font's readme for full list of combinations available)
* This is the option you want if the font you use is _not_ already included or you want maximum control of what's included
* This contains a list of _all permutations_ of the various glyphs. E.g. You want the font with only [Octicons][octicons] or you want the font with just [Font Awesome][font-awesome] and [Devicons][vorillaz-devicons]. The goal is to provide every combination possible in this folder.
* This contains a list of _all permutations_ of the various glyphs. E.g. You want the font with only [Octicons][octicons] or you want the font with just [Font Awesome][font-awesome] and [Devicons][vorillaz-devicons].


For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)
Expand Down
2 changes: 0 additions & 2 deletions src/unpatched-fonts/Arimo/config.json

This file was deleted.

2 changes: 0 additions & 2 deletions src/unpatched-fonts/Cousine/config.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/unpatched-fonts/DejaVuSansMono/config.json

This file was deleted.

66 changes: 0 additions & 66 deletions src/unpatched-fonts/FiraCode/config.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/unpatched-fonts/FiraMono/config.json

This file was deleted.

28 changes: 0 additions & 28 deletions src/unpatched-fonts/Hasklig/config.json

This file was deleted.

18 changes: 0 additions & 18 deletions src/unpatched-fonts/Iosevka/config.json

This file was deleted.

5 changes: 0 additions & 5 deletions src/unpatched-fonts/Lekton/config.json

This file was deleted.

138 changes: 0 additions & 138 deletions src/unpatched-fonts/Monoid/config.json

This file was deleted.

5 changes: 0 additions & 5 deletions src/unpatched-fonts/Noto/config.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/unpatched-fonts/OpenDyslexic/config.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/unpatched-fonts/Overpass/Mono/config.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/unpatched-fonts/Overpass/Non-Mono/config.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/unpatched-fonts/ShareTechMono/config.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/unpatched-fonts/SpaceMono/config.json

This file was deleted.

5 changes: 0 additions & 5 deletions src/unpatched-fonts/Ubuntu/config.json

This file was deleted.