Skip to content

Commit 0424d18

Browse files
authored
Allow Bidi base_level to be determined from text (#245)
`Layout::is_rtl` always returns `false` when `base_level` is forced to 0. Can it already safely be determined from the string buffer? It seems to work OK with this change: the fist strong Bidi character encountered determines the `base_level`.
1 parent 913c44b commit 0424d18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parley/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<B: Brush> LayoutContext<B> {
109109
self.bidi.resolve(
110110
text.chars()
111111
.zip(self.info.iter().map(|info| info.0.bidi_class())),
112-
Some(0),
112+
None,
113113
);
114114
}
115115
}

0 commit comments

Comments
 (0)