-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething is brokenSomething is broken
Milestone
Description
Describe the bug
I am trying to paint multi-line text with rotation:
let (_response, painter) =
ui.allocate_painter(ui.available_size_before_wrap(), Sense::empty());
let mut layout_job = LayoutJob::default();
let text_color = ui.visuals().text_color();
layout_job.append(
"A short first line\nA slightly longer second line\nCould this be a third line?",
0.0,
TextFormat {
font_id: FontId::proportional(20.0),
color: text_color,
..Default::default()
},
);
let galley = painter.layout_job(layout_job);
let text_shape = epaint::TextShape::new(Pos2::new(200.0, 200.0), galley, text_color)
.with_angle(PI / 2.0);
painter.add(text_shape);
Full repro repo: https://github.com/scvalex/demo-egui-text-rotation-bug
In egui-0.31, this looks like this:
In egui-0.32 and on main, it looks like this:
Desktop (please complete the following information):
- OS: Linux
- Browser: n/a (but also happens on Firefox when compiled to wasm)
- Version: NixOS 25.05 (Warbler)
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken