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
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
7 changed files with 37155 additions and 28275 deletions

View File

@ -28,6 +28,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Implement special rendering for various characters from the set of "Symbols
for Legacy Computing" from the Unicode 13 standard
- Unicode input kitten: Allow choosing symbols from the NERD font as well.
These are mostly Private Use symbols not in any standard, however are common. (:iss:`2972`)
- Allow specifying border sizes in either pts or pixels. Change the default to
0.5pt borders as this works best with the new minimal border style

View File

@ -98,6 +98,18 @@ def add_word(w: str, c: int) -> 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']

File diff suppressed because one or more lines are too long

2
kitty/emoji.h generated
View File

@ -1,4 +1,4 @@
// unicode data, built from the unicode standard on: 2020-08-06
// unicode data, built from the unicode standard on: 2020-09-22
// see gen-wcwidth.py
#pragma once
#include "data-types.h"

2
kitty/unicode-data.c generated
View File

@ -1,4 +1,4 @@
// unicode data, built from the unicode standard on: 2020-08-06
// unicode data, built from the unicode standard on: 2020-09-22
// see gen-wcwidth.py
#include "data-types.h"

2
kitty/wcwidth-std.h generated
View File

@ -1,4 +1,4 @@
// unicode data, built from the unicode standard on: 2020-08-06
// unicode data, built from the unicode standard on: 2020-09-22
// see gen-wcwidth.py
#pragma once
#include "data-types.h"

3692
nerd-fonts-glyphs.txt Normal file

File diff suppressed because it is too large Load Diff