#NEWLINE# def bw_font( name , code_point ) : #NEWLINE# #INDENT# char = unichr ( int ( code_point , 16 ) ) #NEWLINE# AA_SCALE = 8 #NEWLINE# SIZE = ( 68 , 68 ) #NEWLINE# BIG_SIZE = tuple ( [ ( x * AA_SCALE ) for x in code_point ] ) #NEWLINE# font = ImageFont . truetype ( 'AndroidEmoji.ttf' , ( 65 * AA_SCALE ) ) #NEWLINE# image = Image . new ( 'RGBA' , BIG_SIZE ) #NEWLINE# draw = ImageDraw . Draw ( image ) #NEWLINE# draw . text ( ( 0 , 0 ) , char , font = font , fill = 'black' ) #NEWLINE# image . resize ( SIZE , Image . ANTIALIAS ) . save ( 'out/unicode/{}.png' . format ( code_point ) , 'PNG' )