Skip to main content

TextCharacterPropertiesExt

Trait TextCharacterPropertiesExt 

Source
pub trait TextCharacterPropertiesExt {
    // Required methods
    fn language(&self) -> Option<&str>;
    fn font_size_pt(&self) -> Option<f64>;
    fn is_bold(&self) -> bool;
    fn is_italic(&self) -> bool;
    fn is_all_caps(&self) -> bool;
    fn is_small_caps(&self) -> bool;
    fn underline_style(&self) -> Option<STTextUnderlineType>;
    fn strike_type(&self) -> Option<STTextStrikeType>;
    fn kerning_pt(&self) -> Option<f64>;
    fn baseline_shift_pct(&self) -> Option<i32>;
    fn character_spacing_pt(&self) -> Option<f64>;
}
Expand description

Extension methods for TextCharacterProperties (ECMA-376 §21.1.2.3.9, CT_TextCharacterProperties).

Provides typed access to per-run formatting properties like language, font size, caps, underline, strikethrough, and spacing. All accessors are gated on dml-text.

Required Methods§

Source

fn language(&self) -> Option<&str>

Get the BCP 47 language tag for this run (e.g. "en-US").

Source

fn font_size_pt(&self) -> Option<f64>

Get the font size in points (sz / 100.0).

Source

fn is_bold(&self) -> bool

Check if bold is set.

Source

fn is_italic(&self) -> bool

Check if italic is set.

Source

fn is_all_caps(&self) -> bool

Check if all-caps is set.

Source

fn is_small_caps(&self) -> bool

Check if small-caps is set.

Source

fn underline_style(&self) -> Option<STTextUnderlineType>

Get the underline style.

Source

fn strike_type(&self) -> Option<STTextStrikeType>

Get the strikethrough style.

Source

fn kerning_pt(&self) -> Option<f64>

Get the kerning pair gap in points (kern / 100.0).

Source

fn baseline_shift_pct(&self) -> Option<i32>

Get the baseline shift as a signed percentage (positive = superscript).

Source

fn character_spacing_pt(&self) -> Option<f64>

Get the character spacing in points (spc / 100.0 when it is a point value).

Implementors§

Source§

impl TextCharacterPropertiesExt for TextCharacterProperties

Available on crate feature dml-text only.