Unicode input kitten: Add symbols from NERD font

These are mostly Private Use symbols not in any standard,
however they are common enough to be useful.

Fixes #2972
This commit is contained in:
Kovid Goyal
2020-09-22 19:47:39 +05:30
parent 48e0ba1d3d
commit d09666aba9
7 changed files with 37155 additions and 28275 deletions

View File

@@ -98,6 +98,18 @@ def parse_ucd() -> None:
elif category.startswith('S'):
all_symbols.add(codepoint)
with open('nerd-fonts-glyphs.txt') as f:
for line in f:
line = line.strip()
if not line or line.startswith('#'):
continue
code, category, name = line.split(' ', 2)
codepoint = int(code, 16)
if name and codepoint not in name_map:
name_map[codepoint] = name.upper()
for word in name.lower().split():
add_word(word, codepoint)
# Some common synonyms
word_search_map['bee'] |= word_search_map['honeybee']
word_search_map['lambda'] |= word_search_map['lamda']