title: Why is tkfont.Font().measure returning large values?
body: <p>I've been developing a Python 3.X app which leverages tkinter, specifically using ttk.Treeview in order to build some tables from a database.  When measuring how wide to make the columns, it seems that the value returned is often too large.</p>
  
  <p>Where val is the value of the cell, the following code is used to find the width:</p>
  
  <pre><code>col_w = tkfont.Font().measure(str(val).rstrip())
  </code></pre>
  
  <p>Here's what the end result is in practice:</p>
  
  <p><img src="https://i.stack.imgur.com/Zo0Fv.png" alt="Actual result"></p>
  
  <p>Here's what I would like to see:</p>
  
  <p><img src="https://i.stack.imgur.com/nfNbB.png" alt="Desired result"></p>
  
  <p>Any thoughts?</p>