pub struct ShapeRequest<'a> {
pub text: &'a str,
pub families: &'a [String],
pub weight: u16,
pub style: FontStyle,
pub font_size: f32,
pub direction: TextDirection,
}Expand description
A request to shape a run of text into positioned glyphs.
Fields§
§text: &'a strThe text to shape.
families: &'a [String]Priority-ordered font family preferences.
weight: u16Font weight (e.g. 400 = regular, 700 = bold).
style: FontStyleFont style variant.
font_size: f32Requested font size in pixels.
direction: TextDirectionBase writing direction. Defaults to TextDirection::Ltr.
Trait Implementations§
Source§impl<'a> Clone for ShapeRequest<'a>
impl<'a> Clone for ShapeRequest<'a>
Source§fn clone(&self) -> ShapeRequest<'a>
fn clone(&self) -> ShapeRequest<'a>
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 moreSource§impl<'a> Debug for ShapeRequest<'a>
impl<'a> Debug for ShapeRequest<'a>
Source§impl<'a> PartialEq for ShapeRequest<'a>
impl<'a> PartialEq for ShapeRequest<'a>
Source§fn eq(&self, other: &ShapeRequest<'a>) -> bool
fn eq(&self, other: &ShapeRequest<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ShapeRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for ShapeRequest<'a>
impl<'a> RefUnwindSafe for ShapeRequest<'a>
impl<'a> Send for ShapeRequest<'a>
impl<'a> Sync for ShapeRequest<'a>
impl<'a> Unpin for ShapeRequest<'a>
impl<'a> UnsafeUnpin for ShapeRequest<'a>
impl<'a> UnwindSafe for ShapeRequest<'a>
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