title: Ruby & RMagick: determining real width & height of text
body: <p>I'm using RMagick and I want to draw text vertically or horizontally (depends on user input) with background color set by user. I've ran into odd problem: get_type_metrics(text) returns invalid data. Actual width / height are smaller than returned by method.</p>
  
  <p>I've been trying to play around with ascent / descent values, but no luck. Is there any way to determine <em>real</em> width / height of text string? I've seen couple solutions drawing text on empty image then determining width height then looking through whole image pixel by pixel, but imho thats stupid and really resource consumptive. Also as I've find out PHP GD has same issue and no solution.</p>
  
  <p>P.S. I can't use Draw#annotate because user should be able to change background box size.</p>