natiny_font_set_line_spacing

C
void natiny_font_set_line_spacing(NatinyFont font, float factor);

Sets how far apart the lines of this font sit, as a multiple of its natural line height.

Parameters

Name Type Description
font NatinyFont Font handle from natiny_font_create
factor float Non-negative multiplier applied to the natural line height; 1.0f restores it

Example

C
natiny_font_set_line_spacing(font, 1.4f);

Notes

  • natiny_font_get_line_height, measuring, wrapping, and drawing all use the adjusted line height.
  • Negative values and NaN are ignored; 0.0f is allowed and stacks the lines.
  • The setting survives an atlas re-bake.