pub enum LineHeightAlignment {
Top,
Center,
Proportional,
Bottom,
}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.
Where the leading — the difference between a line’s box and the font’s own
ascent-plus-descent extent — is spent.
Variants§
Top
All of it below the glyphs.
Center
Split evenly, with the odd whole pixel below the baseline.
Proportional
Split in the font’s own ascent-to-descent ratio.
Bottom
All of it above the glyphs.
Trait Implementations§
Source§impl Clone for LineHeightAlignment
impl Clone for LineHeightAlignment
Source§fn clone(&self) -> LineHeightAlignment
fn clone(&self) -> LineHeightAlignment
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 LineHeightAlignment
Source§impl Debug for LineHeightAlignment
impl Debug for LineHeightAlignment
Source§impl Default for LineHeightAlignment
impl Default for LineHeightAlignment
Source§fn default() -> LineHeightAlignment
fn default() -> LineHeightAlignment
Returns the “default value” for a type. Read more
impl Eq for LineHeightAlignment
Source§impl Hash for LineHeightAlignment
impl Hash for LineHeightAlignment
Source§impl PartialEq for LineHeightAlignment
impl PartialEq for LineHeightAlignment
impl StructuralPartialEq for LineHeightAlignment
Auto Trait Implementations§
impl Freeze for LineHeightAlignment
impl RefUnwindSafe for LineHeightAlignment
impl Send for LineHeightAlignment
impl Sync for LineHeightAlignment
impl Unpin for LineHeightAlignment
impl UnsafeUnpin for LineHeightAlignment
impl UnwindSafe for LineHeightAlignment
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