mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-08-17 02:20:25 +03:00
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:
parent
48e0ba1d3d
commit
d09666aba9
@ -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
|
||||
|
||||
|
@ -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']
|
||||
|
61717
kittens/unicode_input/names.h
generated
61717
kittens/unicode_input/names.h
generated
File diff suppressed because one or more lines are too long
2
kitty/emoji.h
generated
2
kitty/emoji.h
generated
@ -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
2
kitty/unicode-data.c
generated
@ -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
2
kitty/wcwidth-std.h
generated
@ -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
3692
nerd-fonts-glyphs.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user