pub enum TextLineHeightPolicy {
ExpandToFit,
FixedFromStyle,
}Variants§
ExpandToFit
Expand the line box to fit font extents (never reduce below ascent+descent).
This avoids clipping but can cause line height to vary when fallback fonts or emoji participate in shaping.
FixedFromStyle
Keep a fixed line box derived from style (px or ratio) and compute baseline placement via a CSS/GPUI-like “half-leading” model.
This favors stable layout for UI surfaces (forms, lists, buttons). Glyphs whose ink extends beyond the line box may be clipped by the caller’s bounds.
Trait Implementations§
Source§impl Clone for TextLineHeightPolicy
impl Clone for TextLineHeightPolicy
Source§fn clone(&self) -> TextLineHeightPolicy
fn clone(&self) -> TextLineHeightPolicy
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 TextLineHeightPolicy
impl Debug for TextLineHeightPolicy
Source§impl Default for TextLineHeightPolicy
impl Default for TextLineHeightPolicy
Source§fn default() -> TextLineHeightPolicy
fn default() -> TextLineHeightPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TextLineHeightPolicy
impl<'de> Deserialize<'de> for TextLineHeightPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for TextLineHeightPolicy
impl Hash for TextLineHeightPolicy
Source§impl PartialEq for TextLineHeightPolicy
impl PartialEq for TextLineHeightPolicy
Source§impl Serialize for TextLineHeightPolicy
impl Serialize for TextLineHeightPolicy
impl Copy for TextLineHeightPolicy
impl Eq for TextLineHeightPolicy
impl StructuralPartialEq for TextLineHeightPolicy
Auto Trait Implementations§
impl Freeze for TextLineHeightPolicy
impl RefUnwindSafe for TextLineHeightPolicy
impl Send for TextLineHeightPolicy
impl Sync for TextLineHeightPolicy
impl Unpin for TextLineHeightPolicy
impl UnsafeUnpin for TextLineHeightPolicy
impl UnwindSafe for TextLineHeightPolicy
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