IDWriteTextFormat

<summary> The format of text used for text layout. </summary> <remarks> This object may not be thread-safe and it may carry the state of text format change. </remarks>

Members

Functions

GetFlowDirection
DWRITE_FLOW_DIRECTION GetFlowDirection()

<summary> Get paragraph flow direction. </summary>

GetFontCollection
HRESULT GetFontCollection(IDWriteFontCollection* fontCollection)

<summary> Get the font collection. </summary> <param name="fontCollection">The current font collection.</param> <returns> Standard HRESULT error code. </returns>

GetFontFamilyName
HRESULT GetFontFamilyName(WCHAR* fontFamilyName, UINT32 nameSize)

<summary> Get a copy of the font family name. </summary> <param name="fontFamilyName">Character array that receives the current font family name</param> <param name="nameSize">Size of the character array in character count including the terminated NULL character.</param> <returns> Standard HRESULT error code. </returns>

GetFontFamilyNameLength
UINT32 GetFontFamilyNameLength()

<summary> Get the length of the font family name, in characters, not including the terminating NULL character. </summary>

GetFontSize
FLOAT GetFontSize()

<summary> Get the font em height. </summary>

GetFontStretch
DWRITE_FONT_STRETCH GetFontStretch()

<summary> Get the font stretch. </summary>

GetFontStyle
DWRITE_FONT_STYLE GetFontStyle()

<summary> Get the font style. </summary>

GetFontWeight
DWRITE_FONT_WEIGHT GetFontWeight()

<summary> Get the font weight. </summary>

GetIncrementalTabStop
FLOAT GetIncrementalTabStop()

<summary> Get incremental tab stop position. </summary>

GetLineSpacing
HRESULT GetLineSpacing(DWRITE_LINE_SPACING_METHOD* lineSpacingMethod, FLOAT* lineSpacing, FLOAT* baseline)

<summary> Get line spacing. </summary> <param name="lineSpacingMethod">How line height is determined.</param> <param name="lineSpacing">The line height, or rather distance between one baseline to another.</param> <param name="baseline">Distance from top of line to baseline.</param> <returns> Standard HRESULT error code. </returns>

GetLocaleName
HRESULT GetLocaleName(WCHAR* localeName, UINT32 nameSize)

<summary> Get a copy of the locale name. </summary> <param name="localeName">Character array that receives the current locale name</param> <param name="nameSize">Size of the character array in character count including the terminated NULL character.</param> <returns> Standard HRESULT error code. </returns>

GetLocaleNameLength
UINT32 GetLocaleNameLength()

<summary> Get the length of the locale name, in characters, not including the terminating NULL character. </summary>

GetParagraphAlignment
DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment()

<summary> Get alignment option of paragraph relative to layout box's top and bottom edge. </summary>

GetReadingDirection
DWRITE_READING_DIRECTION GetReadingDirection()

<summary> Get paragraph reading direction. </summary>

GetTextAlignment
DWRITE_TEXT_ALIGNMENT GetTextAlignment()

<summary> Get alignment option of text relative to layout box's leading and trailing edge. </summary>

GetTrimming
HRESULT GetTrimming(DWRITE_TRIMMING* trimmingOptions, IDWriteInlineObject* trimmingSign)

<summary> Get trimming options for text overflowing the layout width. </summary> <param name="trimmingOptions">Text trimming options.</param> <param name="trimmingSign">Trimming omission sign. This parameter may be NULL.</param> <returns> Standard HRESULT error code. </returns>

GetWordWrapping
DWRITE_WORD_WRAPPING GetWordWrapping()

<summary> Get word wrapping option. </summary>

SetFlowDirection
HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION flowDirection)

<summary> Set paragraph flow direction. </summary> <param name="flowDirection">Paragraph flow direction</param> <returns> Standard HRESULT error code. </returns> <remarks> The flow direction must be perpendicular to the reading direction. Setting both to a vertical direction or both to horizontal yields DWRITE_E_FLOWDIRECTIONCONFLICTS when calling GetMetrics or Draw. </remark>

SetIncrementalTabStop
HRESULT SetIncrementalTabStop(FLOAT incrementalTabStop)

<summary> Set incremental tab stop position. </summary> <param name="incrementalTabStop">The incremental tab stop value</param> <returns> Standard HRESULT error code. </returns>

SetLineSpacing
HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD lineSpacingMethod, FLOAT lineSpacing, FLOAT baseline)

<summary> Set line spacing. </summary> <param name="lineSpacingMethod">How to determine line height.</param> <param name="lineSpacing">The line height, or rather distance between one baseline to another.</param> <param name="baseline">Distance from top of line to baseline. A reasonable ratio to lineSpacing is 80%.</param> <remarks> For the default method, spacing depends solely on the content. For uniform spacing, the given line height will override the content. </remarks> <returns> Standard HRESULT error code. </returns>

SetParagraphAlignment
HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment)

<summary> Set alignment option of paragraph relative to layout box's top and bottom edge. </summary> <param name="paragraphAlignment">Paragraph alignment option</param> <returns> Standard HRESULT error code. </returns>

SetReadingDirection
HRESULT SetReadingDirection(DWRITE_READING_DIRECTION readingDirection)

<summary> Set paragraph reading direction. </summary> <param name="readingDirection">Text reading direction</param> <returns> Standard HRESULT error code. </returns> <remarks> The flow direction must be perpendicular to the reading direction. Setting both to a vertical direction or both to horizontal yields DWRITE_E_FLOWDIRECTIONCONFLICTS when calling GetMetrics or Draw. </remark>

SetTextAlignment
HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT textAlignment)

<summary> Set alignment option of text relative to layout box's leading and trailing edge. </summary> <param name="textAlignment">Text alignment option</param> <returns> Standard HRESULT error code. </returns>

SetTrimming
HRESULT SetTrimming(const(DWRITE_TRIMMING)* trimmingOptions, IDWriteInlineObject trimmingSign)

<summary> Set trimming options for any trailing text exceeding the layout width or for any far text exceeding the layout height. </summary> <param name="trimmingOptions">Text trimming options.</param> <param name="trimmingSign">Application-defined omission sign. This parameter may be NULL if no trimming sign is desired.</param> <remarks> Any inline object can be used for the trimming sign, but CreateEllipsisTrimmingSign provides a typical ellipsis symbol. Trimming is also useful vertically for hiding partial lines. </remarks> <returns> Standard HRESULT error code. </returns>

SetWordWrapping
HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wordWrapping)

<summary> Set word wrapping option. </summary> <param name="wordWrapping">Word wrapping option</param> <returns> Standard HRESULT error code. </returns>

Meta