#[repr(C)]pub struct ResolvedTextLayoutOptions {
pub font_size_px: f32,
pub line_height: OptionF32,
pub letter_spacing: OptionF32,
pub word_spacing: OptionF32,
pub tab_width: OptionF32,
pub max_horizontal_width: OptionF32,
pub leading: OptionF32,
pub holes: LogicalRectVec,
}Expand description
Same as TextLayoutOptions, but with the widths / heights of the PixelValues
resolved to regular f32s (because letter_spacing, word_spacing, etc. may be %-based value)
Fields§
§font_size_px: f32Font size (in pixels) that this text has been laid out with
line_height: OptionF32Multiplier for the line height, default to 1.0
letter_spacing: OptionF32Additional spacing between glyphs (in pixels)
word_spacing: OptionF32Additional spacing between words (in pixels)
tab_width: OptionF32How many spaces should a tab character emulate
(multiplying value, i.e. 4.0 = one tab = 4 spaces)?
max_horizontal_width: OptionF32Maximum width of the text (in pixels) - if the text is set to overflow:visible, set this
to None.
leading: OptionF32How many pixels of leading does the first line have? Note that this added onto to the
holes, so for effects like :first-letter, use a hole instead of a leading.
holes: LogicalRectVecThis is more important for inline text layout where items can punch “holes” into the text flow, for example an image that floats to the right.
TODO: Currently unused!
Trait Implementations§
Source§impl Clone for ResolvedTextLayoutOptions
impl Clone for ResolvedTextLayoutOptions
Source§fn clone(&self) -> ResolvedTextLayoutOptions
fn clone(&self) -> ResolvedTextLayoutOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedTextLayoutOptions
impl Debug for ResolvedTextLayoutOptions
Source§impl Default for ResolvedTextLayoutOptions
impl Default for ResolvedTextLayoutOptions
Source§fn default() -> ResolvedTextLayoutOptions
fn default() -> ResolvedTextLayoutOptions
Source§impl PartialOrd for ResolvedTextLayoutOptions
impl PartialOrd for ResolvedTextLayoutOptions
impl StructuralPartialEq for ResolvedTextLayoutOptions
Auto Trait Implementations§
impl Freeze for ResolvedTextLayoutOptions
impl RefUnwindSafe for ResolvedTextLayoutOptions
impl Send for ResolvedTextLayoutOptions
impl Sync for ResolvedTextLayoutOptions
impl Unpin for ResolvedTextLayoutOptions
impl UnwindSafe for ResolvedTextLayoutOptions
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
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>
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>
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