![]() # Objective - Allow users to customize the line height of text. - Implements #16085 ## Solution - Add a `line_height` field to `TextFont` to feed into `cosmic_text`'s `Metrics`. ## Testing - Tested on my own game, and worked exactly as I wanted. - My game is only 2D, so I only tested `Text2d`. `Text` still needs tested, but I imagine it'll work fine. - An example is available [here](https://code.cartoon-aa.xyz/Cyborus/custom-line-height-example) --- ## Showcase <details> <summary>Click to view showcase</summary> With font: ```rust TextFont { font: /* unimportant */, font_size: 16.0, line_height: None, ..default() } ```  With font: ```rust TextFont { font: /* unimportant */, font_size: 16.0, line_height: Some(16.0), ..default() } ```  </details> ## Migration Guide `TextFont` now has a `line_height` field. Any instantiation of `TextFont` that doesn't have `..default()` will need to add this field. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |