mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Basic support for bidirectional text
This commit is contained in:
parent
b386d7ae44
commit
dfac8ce4a1
20 changed files with 309 additions and 107 deletions
|
@ -85,6 +85,14 @@ impl WritingMode {
|
|||
(true, false) => PhysicalSide::Left,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// The default bidirectional embedding level for this writing mode.
|
||||
///
|
||||
/// Returns 0 if the mode is LTR, or 1 otherwise.
|
||||
pub fn to_bidi_level(&self) -> u8 {
|
||||
!self.is_bidi_ltr() as u8
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for WritingMode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue