Compute line-height as a multiple of font size

...instead of using the bounding box. This makes `PragmataPro` and other
fonts render more cleanly.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-15 16:35:06 +01:00
parent 8122abeb64
commit 447f350123
4 changed files with 6 additions and 8 deletions

View file

@ -114,7 +114,7 @@ impl Element for Text {
max_line_width = max_line_width.max(shaped_line.width());
}
let line_height = cx.font_cache.line_height(font_id, self.style.font_size);
let line_height = cx.font_cache.line_height(self.style.font_size);
let size = vec2f(
max_line_width
.ceil()