font browser
fix(preview): wrap the sample instead of clipping it at the box's wall
The preview followed the DE's textbox_line_wrap, off here, so a 32px
sample ran off the box's right edge (now clipped at the well's floor by
cce-ui). A sample is read whole, not scrolled sideways: always wrap it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main.rs b/src/main.rs
index 814a948..bad8533 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -693,7 +693,9 @@ impl Application for TypefaceApp {
let size_spinbox = Spinbox::new(32, 8, 120, 1).with_label("Size:");
- let mut preview_box = TextBox::new(String::from(DEFAULT_PREVIEW)).with_multiline(true).with_draw_bg_border(true).with_max_width(None);
+ // Wrapped whatever the DE's `textbox_line_wrap`: a sample is read whole,
+ // not scrolled sideways, and a 32px one outruns the box.
+ let mut preview_box = TextBox::new(String::from(DEFAULT_PREVIEW)).with_multiline(true).with_line_wrap(true).with_draw_bg_border(true).with_max_width(None);
preview_box.font_size = 32.0;
let btn_h = cce_ui::layout::button_height();