pub struct RubyLayout {
pub base_glyphs: Vec<PositionedGlyph>,
pub ruby_glyphs: Vec<PositionedGlyph>,
pub ruby_y_offset: f32,
pub extra_line_height: f32,
}Expand description
The result of a ruby layout pass.
Contains the base glyphs (unchanged from input) alongside newly positioned ruby glyphs that are centered over their base span.
Fields§
§base_glyphs: Vec<PositionedGlyph>Base glyphs positioned as normal (same as the input base_glyphs).
ruby_glyphs: Vec<PositionedGlyph>Ruby glyphs centered horizontally over the base span.
These glyphs should be rendered at (x, y + ruby_y_offset) relative
to the line baseline.
ruby_y_offset: f32Y offset for ruby glyphs from the line baseline.
Negative for RubyPosition::Above (ruby is above the baseline),
positive for RubyPosition::Below.
extra_line_height: f32Extra vertical space needed above (or below) the line to accommodate the ruby text without overlapping neighbouring lines.
Trait Implementations§
Source§impl Clone for RubyLayout
impl Clone for RubyLayout
Source§fn clone(&self) -> RubyLayout
fn clone(&self) -> RubyLayout
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 moreAuto Trait Implementations§
impl Freeze for RubyLayout
impl RefUnwindSafe for RubyLayout
impl Send for RubyLayout
impl Sync for RubyLayout
impl Unpin for RubyLayout
impl UnsafeUnpin for RubyLayout
impl UnwindSafe for RubyLayout
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<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