#NEWLINE# def make_outline( glyph , distance , join , cap ) : #NEWLINE# #INDENT# '\n    Calculate expanded outlines for a given glyph.\n\n    ' #NEWLINE# options = [ 'Square' , 'Round' , 'Butt' ] #NEWLINE# pen = OutlinePen ( glyph . getParent ( ) , distance , connection = options [ join ] , cap = options [ cap ] , miterLimit = None , closeOpenPaths = True ) #NEWLINE# glyph . draw ( pen ) #NEWLINE# pen . drawSettings ( drawOriginal = False , drawInner = True , drawOuter = True ) #NEWLINE# return pen