Ensure LineHeight > 0.0 for the WGPU renderer
This commit is contained in:
parent
a56b25b909
commit
ef429fbea6
1 changed files with 6 additions and 3 deletions
|
|
@ -96,7 +96,8 @@ impl Pipeline {
|
|||
section
|
||||
.line_height
|
||||
.to_absolute(Pixels(section.size)),
|
||||
),
|
||||
)
|
||||
.max(f32::MIN_POSITIVE),
|
||||
font: section.font,
|
||||
bounds: Size {
|
||||
width: section.bounds.width,
|
||||
|
|
@ -238,7 +239,8 @@ impl Pipeline {
|
|||
) -> Size {
|
||||
let mut cache = self.cache.borrow_mut();
|
||||
|
||||
let line_height = f32::from(line_height.to_absolute(Pixels(size)));
|
||||
let line_height = f32::from(line_height.to_absolute(Pixels(size)))
|
||||
.max(f32::MIN_POSITIVE);
|
||||
|
||||
let (_, entry) = cache.allocate(
|
||||
&mut self.font_system.borrow_mut(),
|
||||
|
|
@ -269,7 +271,8 @@ impl Pipeline {
|
|||
) -> Option<Hit> {
|
||||
let mut cache = self.cache.borrow_mut();
|
||||
|
||||
let line_height = f32::from(line_height.to_absolute(Pixels(size)));
|
||||
let line_height = f32::from(line_height.to_absolute(Pixels(size)))
|
||||
.max(f32::MIN_POSITIVE);
|
||||
|
||||
let (_, entry) = cache.allocate(
|
||||
&mut self.font_system.borrow_mut(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue