[][src]Struct directwrite::text_format::TextFormat

#[repr(transparent)]
pub struct TextFormat { /* fields omitted */ }

Represents a format for laying out text. You can think of this like a Font with all of the little customization boxes filled in.

Methods

impl TextFormat[src]

pub fn create<'a>(factory: &'a Factory) -> TextFormatBuilder<'a>[src]

Get a builder for creating a new text format.

pub fn flow_direction(&self) -> UncheckedEnum<FlowDirection>[src]

Get the flow direction of text in this format.

pub fn font_collection(&self) -> Option<FontCollection>[src]

Get the font collection this format loaded its font from.

pub fn font_family_name(&self) -> Option<String>[src]

Get the name of the font family specified for this format.

pub fn font_size(&self) -> f32[src]

Get the font size associated with this format.

pub fn font_stretch(&self) -> UncheckedEnum<FontStretch>[src]

Get the stretch applied to this format.

pub fn font_style(&self) -> UncheckedEnum<FontStyle>[src]

Get the style applied to this format.

pub fn font_weight(&self) -> FontWeight[src]

Get the weight applied to this format.

pub fn incremental_tabstop(&self) -> f32[src]

Get the incremental tabstop size for this format.

pub fn line_spacing(&self) -> DWResult<LineSpacing>[src]

Get the line spacing information for this format.

pub fn locale_name(&self) -> DWResult<String>[src]

Get the locale used for this format.

pub fn paragraph_alignment(&self) -> UncheckedEnum<ParagraphAlignment>[src]

Get the paragraph alignment of text under this format.

pub fn reading_direction(&self) -> UncheckedEnum<ReadingDirection>[src]

Get the reading direction of text under this format.

pub fn text_alignment(&self) -> UncheckedEnum<TextAlignment>[src]

Get the alignment of text under this format.

pub fn trimming(&self) -> DWResult<(Trimming, Option<InlineObject>)>[src]

Gets the trimming options for text that overflows the layout box.

The inline object is an omission sign that will be rendered to show that text was omitted.

pub fn word_wrapping(&self) -> UncheckedEnum<WordWrapping>[src]

Get the word wrapping for text under this format.

pub fn set_flow_direction(&mut self, value: FlowDirection) -> DWResult<()>[src]

Set the flow direction for text under this format.

pub fn set_incremental_tabstop(&mut self, value: f32) -> DWResult<()>[src]

Set the incremental tabstop value for text under this format.

pub fn set_line_spacing(
    &mut self,
    method: LineSpacingMethod,
    spacing: f32,
    baseline: f32
) -> DWResult<()>
[src]

Set the line spacing metrics for text under this format.

pub fn set_paragraph_alignment(
    &mut self,
    value: ParagraphAlignment
) -> DWResult<()>
[src]

Set the paragraph alignment for text under this format.

pub fn set_reading_direction(&mut self, value: ReadingDirection) -> DWResult<()>[src]

Set the reading direction used to lay out text under this format.

pub fn set_text_alignment(&mut self, value: TextAlignment) -> DWResult<()>[src]

Set the text alignment for this format.

pub fn set_trimming(
    &self,
    trimming: &Trimming,
    omission_sign: Option<&InlineObject>
) -> DWResult<()>
[src]

Sets trimming options for text overflowing the layout width.

pub fn set_word_wrapping(&mut self, value: WordWrapping) -> DWResult<()>[src]

Set the word wrapping for text under this format.

Trait Implementations

impl PartialEq<TextFormat> for TextFormat[src]

impl Sync for TextFormat[src]

impl Send for TextFormat[src]

impl Debug for TextFormat[src]

impl ComWrapper for TextFormat[src]

type Interface = IDWriteTextFormat

The raw interface type from winapi

Blanket Implementations

impl<T> FontKey for T where
    T: Send + Sync + 'static + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]