Skip to content

Commit 19b2c8c

Browse files
committed
🐞 vim-deviconsのNERDTreeの展開済みディレクトリの下三角アイコンを修正
0x25b8 と 0x25be を追加
1 parent fa7bb48 commit 19b2c8c

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

cica.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import psMat
55
import os
66
import sys
7+
import math
78
from logging import getLogger, StreamHandler, Formatter, DEBUG
89
logger = getLogger(__name__)
910
handler = StreamHandler()
@@ -21,7 +22,7 @@
2122
DIST = './dist'
2223
LICENSE = open('./LICENSE.txt').read()
2324
COPYRIGHT = open('./COPYRIGHT.txt').read()
24-
VERSION = '2.0.0'
25+
VERSION = '2.0.1'
2526

2627
fonts = [
2728
{
@@ -307,6 +308,24 @@ def zenkaku_space(_f):
307308
g = align_to_center(g)
308309
return _f
309310

311+
def add_smalltriangle(_f):
312+
_f.selection.select(0x25bc)
313+
_f.copy()
314+
_f.selection.select(0x25be)
315+
_f.paste()
316+
_f.transform(psMat.compose(psMat.scale(0.64), psMat.translate(0, 68)))
317+
_f.copy()
318+
_f.selection.select(0x25b8)
319+
_f.paste()
320+
_f.transform(psMat.rotate(math.radians(90)))
321+
322+
for g in _f.glyphs():
323+
if g.encoding == 0x25be or g.encoding == 0x25b8:
324+
g.width = 512
325+
g = align_to_center(g)
326+
327+
return _f
328+
310329
def build_font(_f):
311330
log('Generating %s ...' % _f.get('weight_name'))
312331
ubuntu = fontforge.open('./sourceFonts/%s' % _f.get('ubuntu_mono'))
@@ -369,6 +388,7 @@ def build_font(_f):
369388
cica = vertical_line_to_broken_bar(cica)
370389
cica = emdash_to_broken_dash(cica)
371390
cica = add_notoemoji(cica)
391+
cica = add_smalltriangle(cica)
372392
# cica = add_powerline(cica)
373393

374394

@@ -383,7 +403,7 @@ def build_font(_f):
383403
cica.appendSFNTName(0x411,0, COPYRIGHT)
384404
cica.appendSFNTName(0x411,1, _f.get('family'))
385405
cica.appendSFNTName(0x411,2, _f.get('style_name'))
386-
cica.appendSFNTName(0x411,3, "")
406+
# cica.appendSFNTName(0x411,3, "")
387407
cica.appendSFNTName(0x411,4, _f.get('name'))
388408
cica.appendSFNTName(0x411,5, "Version " + VERSION)
389409
cica.appendSFNTName(0x411,6, _f.get('family') + "-" + _f.get('weight_name'))

0 commit comments

Comments
 (0)