Added dynamic font size calculation
Some further changes for the font size calculation