pub struct TextSpanStyle {
pub size_px: Option<f32>,
pub weight: Option<f32>,
pub italic: Option<bool>,
pub font_family: Option<String>,
pub color: Option<Color>,
pub underline: Option<bool>,
pub strikethrough: Option<bool>,
}Expand description
Overrides de estilo aplicables a un rango de bytes dentro de un
bloque de texto, para Typesetter::layout_spans (RichText). Cada
campo es opcional: None hereda del default del bloque. La granularidad
es por bytes (convención de parley), igual que el runs multicolor.
Fields§
§size_px: Option<f32>Tamaño de fuente (CSS font-size). El reshape recalcula el alto
de la línea afectada.
weight: Option<f32>Peso de fuente (400 = normal, 700 = bold).
italic: Option<bool>Italic on/off.
font_family: Option<String>Family CSS-like (“Helvetica, sans-serif”). Útil para code inline
(forzar monospace en una palabra).
color: Option<Color>Color del texto (gana sobre el default_color del bloque).
underline: Option<bool>Subrayado on/off.
strikethrough: Option<bool>Tachado on/off.
Trait Implementations§
Source§impl Clone for TextSpanStyle
impl Clone for TextSpanStyle
Source§fn clone(&self) -> TextSpanStyle
fn clone(&self) -> TextSpanStyle
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 Debug for TextSpanStyle
impl Debug for TextSpanStyle
Source§impl Default for TextSpanStyle
impl Default for TextSpanStyle
Source§fn default() -> TextSpanStyle
fn default() -> TextSpanStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for TextSpanStyle
impl PartialEq for TextSpanStyle
Source§fn eq(&self, other: &TextSpanStyle) -> bool
fn eq(&self, other: &TextSpanStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextSpanStyle
Auto Trait Implementations§
impl Freeze for TextSpanStyle
impl RefUnwindSafe for TextSpanStyle
impl Send for TextSpanStyle
impl Sync for TextSpanStyle
impl Unpin for TextSpanStyle
impl UnsafeUnpin for TextSpanStyle
impl UnwindSafe for TextSpanStyle
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