pub struct CharacterProperty<'a> {Show 39 fields
pub style_id: Option<CharacterStyleId<'a>>,
pub fonts: Option<Fonts>,
pub bold: Option<Bold>,
pub bold_complex: Option<BoldComplex>,
pub italics: Option<Italics>,
pub italics_complex: Option<ItalicsComplex>,
pub caps: Option<Caps>,
pub small_caps: Option<SmallCaps>,
pub strike: Option<Strike>,
pub dstrike: Option<Dstrike>,
pub outline: Option<Outline>,
pub shadow: Option<Shadow>,
pub emboss: Option<Emboss>,
pub imprint: Option<Imprint>,
pub no_proof: Option<NoProof>,
pub snap_to_grid: Option<SnapToGrid>,
pub vanish: Option<Vanish>,
pub web_hidden: Option<WebHidden>,
pub color: Option<Color<'a>>,
pub spacing: Option<TextSpacing>,
pub scale: Option<Scale>,
pub kern: Option<Kern>,
pub position: Option<Position>,
pub size: Option<Size>,
pub size_complex: Option<SizeComplex>,
pub highlight: Option<Highlight>,
pub underline: Option<Underline<'a>>,
pub effect: Option<Effect>,
pub border: Option<TextBorder<'a>>,
pub shading: Option<Shading<'a>>,
pub fit_text: Option<FitText>,
pub vertical_align: Option<VertAlign>,
pub rtl: Option<RightToLeftText>,
pub complex_script: Option<ComplexScript>,
pub emphasis: Option<Emphasis>,
pub lang: Option<Lang<'a>>,
pub east_asian_layout: Option<EastAsianLayout>,
pub spec_vanish: Option<SpecVanish>,
pub o_math: Option<OMath>,
}
Expand description
Character Property
use docx_rust::formatting::{CharacterProperty, UnderlineStyle, HighlightType};
let prop = CharacterProperty::default()
.style_id("foo")
.color("00ff00")
.color(0xff0000)
.color((0x00, 0x00, 0xff))
.size(42isize)
.bold(true)
.italics(false)
.strike(true)
.dstrike(false)
.outline(true)
.highlight(HighlightType::Yellow)
.underline("00ff00")
.underline(("ff0000", UnderlineStyle::Dash));
Fields§
§style_id: Option<CharacterStyleId<'a>>
Specifies the style ID of the character style.
fonts: Option<Fonts>
Specifies the font.
bold: Option<Bold>
Specifies that the text of the text run is to be bold.
bold_complex: Option<BoldComplex>
§italics: Option<Italics>
Specifies that the text of the text run is to be italics.
italics_complex: Option<ItalicsComplex>
Complex Script Italics
caps: Option<Caps>
Display All Characters As Capital Letters
small_caps: Option<SmallCaps>
Small Caps
strike: Option<Strike>
Specifies that the contents are to be displayed with a horizontal line through the center of the line.
dstrike: Option<Dstrike>
Specifies that the contents are to be displayed with two horizontal lines through each character.
outline: Option<Outline>
Specifies that the content should be displayed as if it had an outline.
shadow: Option<Shadow>
Shadow
emboss: Option<Emboss>
Embossing
imprint: Option<Imprint>
Imprinting
no_proof: Option<NoProof>
Do Not Check Spelling or Grammar
snap_to_grid: Option<SnapToGrid>
Use Document Grid Settings For Inter-Character Spacing
vanish: Option<Vanish>
Hidden Text
Web Hidden Text
color: Option<Color<'a>>
Specifies the color to be used to display text.
spacing: Option<TextSpacing>
Character Spacing Adjustment
scale: Option<Scale>
Expanded/Compressed Text
kern: Option<Kern>
Font Kerning
position: Option<Position>
Vertically Raised or Lowered Text
size: Option<Size>
Specifies the font size in half points.
size_complex: Option<SizeComplex>
Complex Script Font Size
highlight: Option<Highlight>
Text Highlighting
underline: Option<Underline<'a>>
Specifies that the content should be displayed with an underline
effect: Option<Effect>
Animated Text Effect
border: Option<TextBorder<'a>>
Text Border
shading: Option<Shading<'a>>
Run Shading
fit_text: Option<FitText>
Manual Run Width
vertical_align: Option<VertAlign>
Subscript/Superscript Text
rtl: Option<RightToLeftText>
Right To Left Text
complex_script: Option<ComplexScript>
Use Complex Script Formatting on Run
emphasis: Option<Emphasis>
Emphasis Mark
lang: Option<Lang<'a>>
Specifies the language to be used.
east_asian_layout: Option<EastAsianLayout>
East Asian Typography Settings
spec_vanish: Option<SpecVanish>
Paragraph Mark Is Always Hidden
o_math: Option<OMath>
Office Open XML Math
Implementations§
Source§impl<'a> CharacterProperty<'a>
impl<'a> CharacterProperty<'a>
pub fn style_id<T: Into<CharacterStyleId<'a>>>(self, value: T) -> Self
pub fn color<T: Into<Color<'a>>>(self, value: T) -> Self
pub fn highlight<T: Into<Highlight>>(self, value: T) -> Self
pub fn bold<T: Into<Bold>>(self, value: T) -> Self
pub fn dstrike<T: Into<Dstrike>>(self, value: T) -> Self
pub fn italics<T: Into<Italics>>(self, value: T) -> Self
pub fn outline<T: Into<Outline>>(self, value: T) -> Self
pub fn strike<T: Into<Strike>>(self, value: T) -> Self
pub fn size<T: Into<Size>>(self, value: T) -> Self
pub fn underline<T: Into<Underline<'a>>>(self, value: T) -> Self
pub fn fonts<T: Into<Fonts>>(self, value: T) -> Self
Trait Implementations§
Source§impl<'a> Clone for CharacterProperty<'a>
impl<'a> Clone for CharacterProperty<'a>
Source§fn clone(&self) -> CharacterProperty<'a>
fn clone(&self) -> CharacterProperty<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more