Repository: iced-rs/iced (language: rust)

Issue:
text("...").wrapping(Wrapping::None) is ignored
### Is your issue REALLY a bug?

- [X] My issue is indeed a bug!
- [X] I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

### Is there an existing issue for this?

- [X] I have searched the existing issues.

### Is this issue related to iced?

- [X] My hardware is compatible and my graphics drivers are up-to-date.

### What happened?

Even if I specify Wrapping::None, the text is wrapped.
Here is a SSCCE:
```rust
use iced::{widget::text, Element};

#[derive(Default)]
struct State;

#[derive(Debug)]
enum Message {}

fn main() -> iced::Result {
    iced::run("Text Wrapping Bug", update, view)
}

fn update(_state: &mut State, _message: Message) {}

fn view(_state: &State) -> Element<Message> {
    text("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.")
    .wrapping(text::Wrapping::None)
    .into()
}
```
<img width="513" alt="Screenshot 2024-11-24 at 23 58 55" src="https://github.com/user-attachments/assets/c27206ec-6353-4183-a615-9a628f262c13">


### What is the expected behavior?

I expect to see only one line of text as I specify Wrapping::None.

### Version

crates.io release

### Operating System

macOS

### Do you have any log output?

_No response_


Discussion / hints:

Fix patch:
diff --git a/graphics/src/text/paragraph.rs b/graphics/src/text/paragraph.rs
index 07ddbb821a..48c8e9e65f 100644
--- a/graphics/src/text/paragraph.rs
+++ b/graphics/src/text/paragraph.rs
@@ -80,6 +80,8 @@ impl core::text::Paragraph for Paragraph {
             Some(text.bounds.height),
         );
 
+        buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping));
+
         buffer.set_text(
             font_system.raw(),
             text.content,
@@ -122,6 +124,8 @@ impl core::text::Paragraph for Paragraph {
             Some(text.bounds.height),
         );
 
+        buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping));
+
         buffer.set_rich_text(
             font_system.raw(),
             text.content.iter().enumerate().map(|(i, span)| {


Test patch: