code: def pixlen(text, widthlist, fontsize):
      
      pl = 0.0
      for t in text:
          pl += widthlist[ord(t)]
      return pl * fontsize
docs: Calculate the length of text in pixels, given a list of (font-specific)
      glyph widths and the fontsize. Parameter 'widthlist' should have been
      created by 'doc._getCharWidths()'.