View Single Post
Old 12-14-2012, 12:27 PM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
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.
Jellby is offline   Reply With Quote