natiny.font.set_line_spacing
natiny.font.set_line_spacing(font, factor)
Sets how far apart the lines of this font sit, as a multiple of its natural line height.
Parameters
| Name | Type | Description |
|---|---|---|
font |
number |
Font handle from natiny.font.create |
factor |
number |
Non-negative multiplier applied to the natural line height; 1 restores it |
Example
natiny.font.set_line_spacing(font, 1.4)
Notes
natiny.font.get_line_height, measuring, wrapping, and drawing all use the adjusted line height.- Negative values and NaN are ignored;
0is allowed and stacks the lines. - The setting survives an atlas re-bake.