Use ceil to avoid cut text in iced_tiny_skia

This won't be necessary once we reuse the buffers from layouting by
leveraging layout linearity.
This commit is contained in:
Héctor Ramón Jiménez 2023-03-07 06:23:09 +01:00
parent 81d154d63a
commit 0850f52d8c
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -84,7 +84,12 @@ impl Pipeline {
) { ) {
self.system.as_mut().unwrap().with_mut(|fields| { self.system.as_mut().unwrap().with_mut(|fields| {
let key = Key { let key = Key {
bounds: bounds.size(), bounds: {
let size = bounds.size();
// TODO: Reuse buffers from layouting
Size::new(size.width.ceil(), size.height.ceil())
},
content, content,
font, font,
size, size,