Partager via


IXRTextBlock::SetFontStretch (Compact 2013)

3/28/2014

This method sets a value that indicates how much a font is condensed or expanded on-screen.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetFontStretch(
    XRFontStretch FontStretch
) = 0; 

Parameters

  • FontStretch
    [in] XRFontStretch enumerated type that indicates how much a font is condensed or expanded on-screen.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

A font stretch describes how much a font form is stretch from its usual aspect ratio. The aspect ratio is the original width-to-height ratio specified for the glyphs in the font. This value applies to fonts that exist in a font family. It does not cause programmatic stretching of glyphs.

Note

The value of FontStretch might not be used for the font stretch during rendering, because of font fallback. For example, if the font stretch XRFontStretch_ExtraExpanded is specified, but XRFontStretch_Normal is the closed font stretch available, the value of pFontStretch is still XRFontStretch_ExtraExpanded.

If you specified a different font-stretch value for a <Run> element in the source XAML for your application, it overrides this top-level setting.

.NET Framework Equivalent

System.Windows.Controls.TextBlock.FontStretch

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTextBlock
IXRTextBlock::GetFontStretch