pub enum LineHeightMode {
Fixed,
Minimum,
Tight,
}Expand description
The line-height policy lives with the drawing-side text types, because a
DrawScope has to be able to name it too:
a run drawn through a canvas and a Text composable on the same screen must
resolve their line boxes by the same rule, and the only style a draw scope
can carry is the flat one from cranpose-ui-graphics.
What a requested line height means when the font does not fit inside it.
Variants§
Fixed
The request wins and the glyphs overflow their box.
Minimum
The font’s own extent is a floor. This is what Android does.
Tight
The font’s extent, whatever was requested.
Trait Implementations§
Source§impl Clone for LineHeightMode
impl Clone for LineHeightMode
Source§fn clone(&self) -> LineHeightMode
fn clone(&self) -> LineHeightMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LineHeightMode
Source§impl Debug for LineHeightMode
impl Debug for LineHeightMode
Source§impl Default for LineHeightMode
impl Default for LineHeightMode
Source§fn default() -> LineHeightMode
fn default() -> LineHeightMode
Returns the “default value” for a type. Read more
impl Eq for LineHeightMode
Source§impl Hash for LineHeightMode
impl Hash for LineHeightMode
Source§impl PartialEq for LineHeightMode
impl PartialEq for LineHeightMode
impl StructuralPartialEq for LineHeightMode
Auto Trait Implementations§
impl Freeze for LineHeightMode
impl RefUnwindSafe for LineHeightMode
impl Send for LineHeightMode
impl Sync for LineHeightMode
impl Unpin for LineHeightMode
impl UnsafeUnpin for LineHeightMode
impl UnwindSafe for LineHeightMode
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more