Export (0) Print
Expand All

IDWriteTextAnalyzer1::GetBaseline method

Retrieves the given baseline from the font.

Syntax


virtual HRESULT GetBaseline(
  IDWriteFontFace *fontFace,
  DWRITE_BASELINE baseline,
  BOOL isVertical,
  BOOL isSimulationAllowed,
  DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
  [in, optional]  const WCHAR *localeName,
  [out]           INT32 *baselineCoordinate,
  [out]           BOOL *exists
) = 0;

Parameters

fontFace

Type: IDWriteFontFace*

The font face to read.

baseline

Type: DWRITE_BASELINE

A DWRITE_BASELINE-typed value that specifies the baseline of interest.

isVertical

Type: BOOL

Whether the baseline is vertical or horizontal.

isSimulationAllowed

Type: BOOL

Simulate the baseline if it is missing in the font.

scriptAnalysis

Type: DWRITE_SCRIPT_ANALYSIS

Script analysis result from AnalyzeScript.

Note  You can pass an empty script analysis structure, like this DWRITE_SCRIPT_ANALYSIS scriptAnalysis = {};, and this method will return the default baseline.

localeName [in, optional]

Type: const WCHAR*

The language of the run.

baselineCoordinate [out]

Type: INT32*

The baseline coordinate value in design units.

exists [out]

Type: BOOL*

Whether the returned baseline exists in the font.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If the baseline does not exist in the font, it is not considered an error, but the function will return exists = false. You may then use heuristics to calculate the missing base, or, if the flag simulationAllowed is true, the function will compute a reasonable approximation for you.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

Dwrite_1.h

Library

Dwrite.lib

DLL

Dwrite.dll

See also

IDWriteTextAnalyzer1

 

 

Community Additions

ADD
Show:
© 2014 Microsoft