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:
parent
8122abeb64
commit
447f350123
4 changed files with 6 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue