The ruler must have the same font as the button, if not it does not calculate the correct width!