Improved logic when handling Wfontsize and Hfontsize (removed risk of passing undefined into Math.min())

Signed-off-by: Mikebert4 <Mikebert4@gmail.com>