mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
feat: add reder for nerdfont glyphs,\ue0d6, \ue0d7
This commit is contained in:
parent
28a5bfe379
commit
a580717eba
2 changed files with 6 additions and 2 deletions
|
|
@ -613,6 +613,8 @@ START_ALLOW_CASE_RANGE
|
|||
case '\t':
|
||||
case IMAGE_PLACEHOLDER_CHAR:
|
||||
return BLANK_FONT;
|
||||
case 0xe0d7:
|
||||
case 0xe0d6:
|
||||
case 0x2500 ... 0x2573:
|
||||
case 0x2574 ... 0x259f:
|
||||
case 0x25d6 ... 0x25d7:
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ def line_equation(x1: int, y1: int, x2: int, y2: int) -> Callable[[int], float]:
|
|||
|
||||
|
||||
@supersampled()
|
||||
def triangle(buf: SSByteArray, width: int, height: int, left: bool = True) -> None:
|
||||
def triangle(buf: SSByteArray, width: int, height: int, left: bool = True, inverted: bool = False) -> None:
|
||||
ay1, by1, y2 = 0, height - 1, height // 2
|
||||
if left:
|
||||
x1, x2 = 0, width - 1
|
||||
|
|
@ -210,7 +210,7 @@ def triangle(buf: SSByteArray, width: int, height: int, left: bool = True) -> No
|
|||
uppery = line_equation(x1, ay1, x2, y2)
|
||||
lowery = line_equation(x1, by1, x2, y2)
|
||||
xlimits = [(uppery(x), lowery(x)) for x in range(width)]
|
||||
fill_region(buf, width, height, xlimits)
|
||||
fill_region(buf, width, height, xlimits, inverted)
|
||||
|
||||
|
||||
@supersampled()
|
||||
|
|
@ -1011,8 +1011,10 @@ box_chars: Dict[str, List[Callable[[BufType, int, int], Any]]] = {
|
|||
'╾': [p(half_hline, level=3), p(half_hline, which='right')],
|
||||
'╿': [p(half_vline, level=3), p(half_vline, which='bottom')],
|
||||
'': [triangle],
|
||||
'': [p(triangle, inverted = True)],
|
||||
'': [p(half_cross_line, which='tl'), p(half_cross_line, which='bl')],
|
||||
'': [p(triangle, left=False)],
|
||||
'': [p(triangle, left=False, inverted = True)],
|
||||
'': [p(half_cross_line, which='tr'), p(half_cross_line, which='br')],
|
||||
'': [D],
|
||||
'◗': [D],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue