From: Chris Alfeld Date: 2006-03-29T23:59:33+09:00 Subject: Re: Get the size in pixels for a string This is undoubtedly overkill, but: require 'tk' f = TkFont.new('Courier 10') width = f.measure("Hi There!") height = f.metrics.assoc('linespace')[1]