pub struct FontConfig {
pub name: Option<String>,
pub size: Option<u32>,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub color: Option<Color>,
}Expand description
文本片段的字体配置。
用于段落文本和表格单元格内容。
对应 Java: com.alibaba.excel.write.metadata.style.WriteFont
Fields§
§name: Option<String>Font family name (e.g. “Arial”, “Times New Roman”, “宋体”).
size: Option<u32>Font size in half-points (e.g. 24 = 12pt).
bold: boolWhether the text is bold.
italic: boolWhether the text is italic.
underline: boolWhether the text is underlined.
color: Option<Color>Text color. None means auto/inherit.
Implementations§
Source§impl FontConfig
impl FontConfig
Sourcepub fn with_italic(self, italic: bool) -> Self
pub fn with_italic(self, italic: bool) -> Self
Sets italic on or off.
Sourcepub fn with_underline(self, underline: bool) -> Self
pub fn with_underline(self, underline: bool) -> Self
Sets underline on or off.
Trait Implementations§
Source§impl Clone for FontConfig
impl Clone for FontConfig
Source§fn clone(&self) -> FontConfig
fn clone(&self) -> FontConfig
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 FontConfig
impl Debug for FontConfig
Auto Trait Implementations§
impl Freeze for FontConfig
impl RefUnwindSafe for FontConfig
impl Send for FontConfig
impl Sync for FontConfig
impl Unpin for FontConfig
impl UnsafeUnpin for FontConfig
impl UnwindSafe for FontConfig
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