That's probably because the "padding" you see is not actually padding, but some space that could be taken by other characters in the font (like a "(", or "g", or "É"). The vertical size of your black box is determined by the font size and line height. The actual size of the letters, in relation to the box height, is determined by the font itself, and you have (almost) no control over that.

Try writing "ÍNDICE" instead of "CONTENTS" and your line-height trick won't work so well. Worse still, try with different fonts and you'll probably find out each font requires a different line-height. And, since you can't control the font that will be used (not even if you embed it), you better not try to be very accurate.