Add builder method for TextFont::line_height (#17203)

# Objective

Followup from #16614

`TextFont` has builder methods for its other fields. Add
`with_line_height` for consistency.

## Solution

Add it
This commit is contained in:
Rob Parrett 2025-01-06 16:40:00 -08:00 committed by GitHub
parent fbc55b84e2
commit f896ad8457
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -323,6 +323,12 @@ impl TextFont {
self.font_smoothing = font_smoothing;
self
}
/// Returns this [`TextFont`] with the specified [`LineHeight`].
pub const fn with_line_height(mut self, line_height: LineHeight) -> Self {
self.line_height = line_height;
self
}
}
impl Default for TextFont {