core: Empty text lines should still have a height.

This commit is contained in:
David Wendt 2022-10-20 23:06:27 -04:00 committed by kmeisthax
parent 425bea45f8
commit ecdef4c6f4
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ use gc_arena::{Collect, Gc, MutationContext};
use ruffle_render::backend::{RenderBackend, ShapeHandle};
use ruffle_render::transform::Transform;
use std::cell::{Cell, Ref, RefCell};
use std::cmp::max;
pub use swf::TextGridFit;
@ -314,6 +315,10 @@ impl<'gc> Font<'gc> {
},
);
if text.is_empty() {
height = max(height, params.height);
}
(width, height)
}