View Single Post
Old 08-27-2024, 06:50 PM   #28
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,932
Karma: 6361444
Join Date: Nov 2009
Device: many
Not quite. The line gaps are typically 0 so scaling them in any way will not help.

So *instead* of scaling the ascent and descent values (ie. leave them alone) and just change the lineGap values as follows:

new_line_gap = int(0.5 * (ascent + descent)) (assuming of course descent is positive).

The 0.5 comes from (1.5 line spacing - 1).

That sets the leading value in the font metrics to be half the font original height.

Either way I will try it tomorrow when I get back home.

Thanks!
KevinH is online now   Reply With Quote