-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is your issue REALLY a bug?
- My issue is indeed a bug!
- 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?
- I have searched the existing issues.
Is this issue related to iced?
- My hardware is compatible and my graphics drivers are up-to-date.
What happened?
I can't use RichText to write "fish" with the "f" and "i" in different font colors. I assume that's because a single ligature glyph is used for "fi". It's not that big a problem and I'm not sure if there's a good solution, but I figured I'd report it because RichText is not behaving as expected or documented.
Example that shows "fi" in red and "sh" in green, instead of "f" in red and "ish" in green:
use iced::{color, widget::{rich_text, text}};
struct S;
impl S {
fn new() -> S {
S {}
}
fn update(&mut self, _msg: ()) {}
fn view(&self) -> text::Rich<'_, (), ()> {
let red = color!(0xff0000);
let green = color!(0x00ff00);
let mut spans = Vec::new();
spans.push(text::Span::new('f').color(red));
spans.push(text::Span::new('i').color(green));
spans.push(text::Span::new('s').color(green));
spans.push(text::Span::new('h').color(green));
rich_text(spans)
}
}
fn main() {
iced::application(S::new, S::update, S::view).run();
}
What is the expected behavior?
"f" in red and "ish" in green
Version
crates.io release
Operating System
Linux
Do you have any log output?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working