mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-12 09:41:47 +02:00
Merge pull request #1597 from ryanoasis/bugfix/Ubuntu-ligatures
Bugfix Ubuntu ligatures
This commit is contained in:
commit
c59bacd90e
3 changed files with 12 additions and 5 deletions
10
font-patcher
10
font-patcher
|
@ -6,7 +6,7 @@
|
|||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
# Change the script version when you edit this script:
|
||||
script_version = "4.13.0"
|
||||
script_version = "4.13.1"
|
||||
|
||||
version = "3.2.0"
|
||||
projectName = "Nerd Fonts"
|
||||
|
@ -338,9 +338,9 @@ class font_patcher:
|
|||
def patch(self, font):
|
||||
self.sourceFont = font
|
||||
self.setup_version()
|
||||
self.get_essential_references()
|
||||
self.assert_monospace()
|
||||
self.remove_ligatures()
|
||||
self.get_essential_references()
|
||||
self.get_sourcefont_dimensions()
|
||||
self.setup_patch_set()
|
||||
self.improve_line_dimensions()
|
||||
|
@ -1135,14 +1135,14 @@ class font_patcher:
|
|||
# glyphs intact.
|
||||
# 0x0000-0x017f is the Latin Extended-A range
|
||||
# 0xfb00-0xfb06 are 'fi' and other ligatures
|
||||
basic_glyphs = set()
|
||||
basic_glyphs = { c for c in range(0x21, 0x17f + 1) if c in self.sourceFont }
|
||||
# Collect substitution destinations
|
||||
for glyph in [*range(0x21, 0x17f + 1), *range(0xfb00, 0xfb06 + 1)]:
|
||||
for glyph in list(basic_glyphs) + [*range(0xfb00, 0xfb06 + 1)]:
|
||||
if not glyph in self.sourceFont:
|
||||
continue
|
||||
basic_glyphs.add(glyph)
|
||||
for possub in self.sourceFont[glyph].getPosSub('*'):
|
||||
if possub[1] == 'Substitution' or possub[1] == 'Ligature':
|
||||
basic_glyphs.add(glyph)
|
||||
basic_glyphs.add(self.sourceFont[possub[2]].unicode)
|
||||
basic_glyphs.discard(-1) # the .notdef glyph
|
||||
for glyph in basic_glyphs:
|
||||
|
|
|
@ -13,6 +13,8 @@ you are expressly encouraged to experiment, modify, share and improve.
|
|||
|
||||
http://font.ubuntu.com/
|
||||
|
||||
The `fi`, `fl`, and similar ligatures are removed because they would block some Font Awesome glyphs.
|
||||
|
||||
Version: 0.83
|
||||
|
||||
## Preprocessed Source Font
|
||||
|
|
5
src/unpatched-fonts/Ubuntu/config.json
Normal file
5
src/unpatched-fonts/Ubuntu/config.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Subtables]
|
||||
ligatures: [
|
||||
"'liga' Standard Ligatures in Latin lookup 20 subtable",
|
||||
"'liga' Standard Ligatures in Greek lookup 21 subtable",
|
||||
"'liga' Standard Ligatures in Cyrillic lookup 22 subtable" ]
|
Loading…
Reference in a new issue