44import psMat
55import os
66import sys
7+ import math
78from logging import getLogger , StreamHandler , Formatter , DEBUG
89logger = getLogger (__name__ )
910handler = StreamHandler ()
2122DIST = './dist'
2223LICENSE = open ('./LICENSE.txt' ).read ()
2324COPYRIGHT = open ('./COPYRIGHT.txt' ).read ()
24- VERSION = '2.0.0 '
25+ VERSION = '2.0.1 '
2526
2627fonts = [
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+
310329def 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