IXpsOMGlyphs::SetFontRenderingEmSize method

Sets the font size of the text.

Syntax

HRESULT SetFontRenderingEmSize(
  [in] FLOAT fontRenderingEmSize
);

Parameters

  • fontRenderingEmSize [in]
    The font size.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK

The method succeeded.

E_INVALIDARG

The value of fontRenderingEmSize is not valid; it must be a non-negative number.

 

Remarks

The em size returned in fontRenderingEmSize specifies the font size in drawing surface units. Drawing surface units are expressed as floating-point values in the units of the effective coordinate space.

In new glyph objects, the default value of fontRenderingEmSize is 10.0.

If the value of fontRenderingEmSize is 0.0, no text is displayed.

A value of 0.0 results in no visible text being displayed.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMGlyphs

XPS Document Errors

XML Paper Specification