Open mtkennerly opened 1 year ago
It does work (visible text and no crash) if the text starts with a Latin letter like "A", but not a symbol like "+":
diff --git a/examples/counter/src/main.rs b/examples/counter/src/main.rs
index 0cc7d9f7..9a3a0518 100644
--- a/examples/counter/src/main.rs
+++ b/examples/counter/src/main.rs
@@ -42,7 +42,7 @@ impl Sandbox for Counter {
button("Increment").on_press(Message::IncrementPressed),
text(self.value).size(50),
button("Decrement").on_press(Message::DecrementPressed),
- text("العربية").shaping(text::Shaping::Advanced),
+ text("a العربية").shaping(text::Shaping::Advanced),
]
.padding(20)
.align_items(Alignment::Center)
diff --git a/examples/pick_list/src/main.rs b/examples/pick_list/src/main.rs
index 3fb064cc..68db2592 100644
--- a/examples/pick_list/src/main.rs
+++ b/examples/pick_list/src/main.rs
@@ -98,7 +98,7 @@ impl std::fmt::Display for Language {
Language::Haskell => "Haskell",
Language::C => "C",
Language::Javascript => "Javascript",
- Language::Other => "العربية",
+ Language::Other => "a العربية",
}
)
}
RTL/BiDi is still not officially supported.
We probably need to handle positioning differently when the text starts with RTL.
Is there an existing issue for this?
Is this issue related to iced?
What happened?
I've run into a couple of issues with Arabic text. In a column, it just doesn't show up, and inside of a PickList, it causes a crash.
I did see https://github.com/iced-rs/iced/issues/250 and https://github.com/iced-rs/iced/issues/1877, but the latter shows an example of Arabic text at least partially working, so I'm not sure what changed since then. The crash is attributed to Glyphon, so maybe it's related to a change in that crate?
Here's a diff based on 50ce65b3b7ad10a8537b751b3890d9dcfaecf846 to demonstrate the issue (invisible text in
counter
example and crash inpick_list
example):What is the expected behavior?
Visible text and no crash.
Version
crates.io release
Operating System
Windows
Do you have any log output?