This topic has not yet been rated - Rate this topic

GetOutlineTextMetrics function

Applies to: desktop apps only

The GetOutlineTextMetrics function retrieves text metrics for TrueType fonts.

Syntax

UINT GetOutlineTextMetrics(
  __in       HDC hdc,
  __in       UINT cbData,
  __out_opt  LPOUTLINETEXTMETRIC lpOTM
);

Parameters

hdc [in]

A handle to the device context.

cbData [in]

The size, in bytes, of the array that receives the text metrics.

lpOTM [out, optional]

A pointer to an OUTLINETEXTMETRIC structure. If this parameter is NULL, the function returns the size of the buffer required for the retrieved metric data.

Return value

If the function succeeds, the return value is nonzero or the size of the required buffer.

If the function fails, the return value is zero.

Remarks

The OUTLINETEXTMETRIC structure contains most of the text metric information provided for TrueType fonts (including a TEXTMETRIC structure). The sizes returned in OUTLINETEXTMETRIC are in logical units; they depend on the current mapping mode.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

Unicode and ANSI names

GetOutlineTextMetricsW (Unicode) and GetOutlineTextMetricsA (ANSI)

See also

Fonts and Text Overview
Font and Text Functions
GetTextMetrics
OUTLINETEXTMETRIC
TEXTMETRIC

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ