concerto/concerto — pull request #813 by mfrederickson (2014-01-11 00:35:11+00:00)
Title: autosizing the font more accurately

This addresses #539. The only way I've been able to get the sizing absolutely correct in every case was to have the adjustment done after the content has been appended to the field. It works under IE, FF, and Chrome, and even though it occurs after injection, you never see it resize.

The PR adds an attribute to the content class called autosize_font, which defaults to false. It's overridden in the HtmlText, Ticker, and ClientTime classes to true. The transition classes call the inject method of the field class to push the content into the dom. This hasn't changed. But now, they also pass along the content's autosize_font attribute, and if it is set to true then field's inject method will also call the new helper function SizeToFit after the content is injected.