pub enum LeadingSpec {
None,
Fixed(u32),
Proportional(u32),
}Expand description
How leading (inter-line spacing) is specified.
Variants§
None
No extra leading — lines are packed at cell height.
Fixed(u32)
Fixed leading in sub-pixel units (1/256 px) added between lines.
Proportional(u32)
Leading as a fraction of line height (256 = 100% = double spacing).
Common values:
- 0 = single spacing (no extra)
- 51 ≈ 20% extra (1.2x line height, CSS default for body text)
- 128 = 50% extra (1.5x line height)
- 256 = 100% extra (double spacing)
Implementations§
Source§impl LeadingSpec
impl LeadingSpec
Sourcepub const CSS_DEFAULT: Self
pub const CSS_DEFAULT: Self
CSS-style 1.2x line height (20% extra leading).
Trait Implementations§
Source§impl Clone for LeadingSpec
impl Clone for LeadingSpec
Source§fn clone(&self) -> LeadingSpec
fn clone(&self) -> LeadingSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LeadingSpec
impl Debug for LeadingSpec
Source§impl Default for LeadingSpec
impl Default for LeadingSpec
Source§fn default() -> LeadingSpec
fn default() -> LeadingSpec
Returns the “default value” for a type. Read more
Source§impl Display for LeadingSpec
impl Display for LeadingSpec
Source§impl Hash for LeadingSpec
impl Hash for LeadingSpec
Source§impl PartialEq for LeadingSpec
impl PartialEq for LeadingSpec
impl Copy for LeadingSpec
impl Eq for LeadingSpec
impl StructuralPartialEq for LeadingSpec
Auto Trait Implementations§
impl Freeze for LeadingSpec
impl RefUnwindSafe for LeadingSpec
impl Send for LeadingSpec
impl Sync for LeadingSpec
impl Unpin for LeadingSpec
impl UnsafeUnpin for LeadingSpec
impl UnwindSafe for LeadingSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.