Replace fontSizeForWidth by fontSizeForDimensions

This uses both width & height instead of only width