def _handleBulletWidth(bulletText, style, maxWidths):
 if bulletText:
  if isinstance(bulletText, basestring):
   bulletWidth = stringWidth(bulletText, style.bulletFontName, style.bulletFontSize)
  else:
   bulletWidth = 0
   for f in bulletText:
    bulletWidth = (bulletWidth + stringWidth(f.text, f.fontName, f.fontSize))
  bulletRight = ((style.bulletIndent + bulletWidth) + (0.6 * style.bulletFontSize))
  indent = (style.leftIndent + style.firstLineIndent)
  if (bulletRight > indent):
   maxWidths[0] -= (bulletRight - indent)

def _handleBulletWidth ( bulletText , style , maxWidths ) : if bulletText : if isinstance ( bulletText , basestring ) : bulletWidth = stringWidth ( bulletText , style . bulletFontName , style . bulletFontSize ) else : bulletWidth = 0 for f in bulletText : bulletWidth = ( bulletWidth + stringWidth ( f . text , f . fontName , f . fontSize ) ) bulletRight = ( ( style . bulletIndent + bulletWidth ) + ( 0.6 * style . bulletFontSize ) ) indent = ( style . leftIndent + style . firstLineIndent ) if ( bulletRight > indent ) : maxWidths [ 0 ] -= ( bulletRight - indent )
work out bullet width and adjust maxwidths[0] if neccessary .