ENH: adding logic to automatically fit text based on width and height