Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the given baseline from the font.
Syntax
HRESULT GetBaseline(
IDWriteFontFace *fontFace,
DWRITE_BASELINE baseline,
BOOL isVertical,
BOOL isSimulationAllowed,
DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
[in, optional] WCHAR const *localeName,
[out] INT32 *baselineCoordinate,
[out] BOOL *exists
);
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.
DWRITE_SCRIPT_ANALYSIS scriptAnalysis = {};
, and this method will return the default baseline.[in, optional] localeName
Type: const WCHAR*
The language of the run.
[out] baselineCoordinate
Type: INT32*
The baseline coordinate value in design units.
[out] exists
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
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dwrite_1.h |
Library | Dwrite.lib |
DLL | Dwrite.dll |