pub struct StrokeFont { /* private fields */ }Expand description
Bounded single-line Latin lettering built from original segment geometry.
Implementations§
Source§impl StrokeFont
impl StrokeFont
Sourcepub fn new(height: f64) -> Result<Self, ValidationError>
pub fn new(height: f64) -> Result<Self, ValidationError>
Creates uppercase/digit lettering with positive local height, at most 512 units.
Sourcepub fn strokes(
&self,
text: &str,
width: f64,
color: Color,
) -> Result<Vec<BrushStroke>, ValidationError>
pub fn strokes( &self, text: &str, width: f64, color: Color, ) -> Result<Vec<BrushStroke>, ValidationError>
Emits one extended stroke per glyph; spaces/newlines advance without drawing. Lowercase is mapped to uppercase; unsupported characters fail instead of substituting.
Trait Implementations§
Source§impl Clone for StrokeFont
impl Clone for StrokeFont
impl Copy for StrokeFont
Auto Trait Implementations§
impl Forget for StrokeFont
impl Freeze for StrokeFont
impl RefUnwindSafe for StrokeFont
impl Send for StrokeFont
impl Sync for StrokeFont
impl Unpin for StrokeFont
impl UnsafeUnpin for StrokeFont
impl UnwindSafe for StrokeFont
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