Open cyrgani opened 4 days ago
I do not know enough about fonts to properly comment on this, but, apparently, there are some hints made by font designers for multiline rendering, for example this field looks relevant? https://docs.rs/fontdue/latest/fontdue/struct.LineMetrics.html#structfield.line_gap
This PR adds two functions for drawing multiline text that breaks on newlines. The new
draw_multiline_text
anddraw_multiline_text_ex
functions mirror the existing signatures of thedraw_text
anddraw_text_ex
functions.A different option would be to add a field
pub is_multiline: bool
toTextParams
, which would avoid having two new functions, but that would be a breaking change and would have to wait for 0.5.