Added condition in OptimalSize to ensure that the returned value does not go below the value of the minFontSize parameter.