Implement Editor::single_line

This commit is contained in:
Conrad Irwin 2023-11-07 11:12:16 -07:00
parent 4bf3a4e3d4
commit 3a72f2122a
3 changed files with 25 additions and 21 deletions

View file

@ -189,6 +189,10 @@ impl TextStyle {
}
}
pub fn line_height_in_pixels(&self, rem_size: Pixels) -> Pixels {
self.line_height.to_pixels(self.font_size, rem_size)
}
pub fn to_run(&self, len: usize) -> TextRun {
TextRun {
len,