pub struct LinraRenderParams {
pub size: f32,
pub direction: Direction,
pub foreground: Color,
pub background: Option<Color>,
pub padding: u32,
pub variations: Vec<(String, f32)>,
pub features: Vec<(String, u32)>,
pub language: Option<String>,
pub script: Option<String>,
pub antialias: bool,
pub letter_spacing: f32,
pub color_palette: u16,
}Expand description
Combined parameters for linra shape+render operations
This replaces separate ShapingParams and RenderParams when using a linra renderer that handles both steps internally.
Fields§
§size: f32Font size in points
direction: DirectionText direction
foreground: ColorText color
background: Option<Color>Background color (None = transparent)
padding: u32Padding around the rendered text
variations: Vec<(String, f32)>Variable font axis values like [(“wght”, 700.0), (“wdth”, 100.0)]
features: Vec<(String, u32)>OpenType feature settings like [(“liga”, 1), (“kern”, 1)]
language: Option<String>Language code for shaping (e.g., “en”, “ar”, “zh”)
script: Option<String>Script tag for shaping (e.g., “latn”, “arab”)
antialias: boolEnable antialiasing
letter_spacing: f32Extra spacing between characters (in points, can be negative)
color_palette: u16CPAL color palette index for COLR color glyphs (0 = default palette)
Implementations§
Source§impl LinraRenderParams
impl LinraRenderParams
Sourcepub fn to_shaping_params(&self) -> ShapingParams
pub fn to_shaping_params(&self) -> ShapingParams
Convert to separate ShapingParams for compatibility
Sourcepub fn to_render_params(&self) -> RenderParams
pub fn to_render_params(&self) -> RenderParams
Convert to separate RenderParams for compatibility
Trait Implementations§
Source§impl Clone for LinraRenderParams
impl Clone for LinraRenderParams
Source§fn clone(&self) -> LinraRenderParams
fn clone(&self) -> LinraRenderParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinraRenderParams
impl Debug for LinraRenderParams
Auto Trait Implementations§
impl Freeze for LinraRenderParams
impl RefUnwindSafe for LinraRenderParams
impl Send for LinraRenderParams
impl Sync for LinraRenderParams
impl Unpin for LinraRenderParams
impl UnsafeUnpin for LinraRenderParams
impl UnwindSafe for LinraRenderParams
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