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
|
@ -146,8 +146,7 @@ impl Element for Label {
|
|||
.ceil()
|
||||
.max(constraint.min.x())
|
||||
.min(constraint.max.x()),
|
||||
cx.font_cache
|
||||
.line_height(self.style.text.font_id, self.style.text.font_size),
|
||||
cx.font_cache.line_height(self.style.text.font_size),
|
||||
);
|
||||
|
||||
(size, line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue