Added auto resizing of fonts.

Added logic to automatically resize fonts when the text to be displayed would exceed the bounds of the layer.