refactor font detecction and sizing