You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
width = 43.195313
full_width = 43.195313
line 0, trailing_whitespace = 0
line 1, trailing_whitespace = 0
(I added the grey block to make the actual layout width and height visible with the patch below.)
Patch
diff --git a/parley/src/tests/utils/renderer.rs b/parley/src/tests/utils/renderer.rs
index 2169eb7..a5d6736 100644
--- a/parley/src/tests/utils/renderer.rs+++ b/parley/src/tests/utils/renderer.rs@@ -61,6 +61,15 @@ pub(crate) fn render_layout(
let mut pen = TinySkiaPen::new(img.as_mut());
+ draw_rect(+ &mut pen,+ fpadding,+ fpadding,+ width as f32,+ height as f32,+ Color::from_rgba8(220, 220, 220, 255),+ );+
for rect in selection_rects {
draw_rect(
&mut pen,
I would expect that the full_width of this layout includes the whitespace, while the width does not. Additionally, I would expect the first line to have trailing_whitespace > 0 in its metrics.
The text was updated successfully, but these errors were encountered:
wfdewith
changed the title
Trailing whitespace is not marked correctly
Trailing whitespace is not handled correctly
Jan 23, 2025
In my attempts to implement
min_content_width
andmax_content_width
, I ran into another issue.I've written the following test:
This prints and renders the following:
(I added the grey block to make the actual layout width and height visible with the patch below.)
Patch
I would expect that the
full_width
of this layout includes the whitespace, while thewidth
does not. Additionally, I would expect the first line to havetrailing_whitespace > 0
in its metrics.The text was updated successfully, but these errors were encountered: