#NEWLINE# def set_vmetrics( font , xheight , capheight , ascender , descender , emsquare , gridsize = 1 ) : #NEWLINE# #INDENT# font . info . xHeight = ( xheight * gridsize ) #NEWLINE# font . info . capHeight = ( capheight * gridsize ) #NEWLINE# font . info . descender = ( - abs ( ( descender * ascender ) ) ) #NEWLINE# font . info . ascender = ( ascender * gridsize ) #NEWLINE# font . info . unitsPerEm = ( emsquare * gridsize )