DrvQueryTrueTypeOutline function (winddi.h)

The DrvQueryTrueTypeOutline function retrieves glyph outlines in native TrueType format.


LONG DrvQueryTrueTypeOutline(
  DHPDEV          dhpdev,
  FONTOBJ         *pfo,
  HGLYPH          hglyph,
  BOOL            bMetricsOnly,
  GLYPHDATA       *pgldt,
  ULONG           cjBuf,



Handle to a physical device's PDEV structure returned from a call to DrvEnablePDEV.


Pointer to a FONTOBJ structure. Details of the font realization can be queried from this structure.


Handle to the glyph for which the outline is being queried.


Specifies that font metrics (only) should be returned, or that TrueType outlines should be returned in cubic Bezier format, or that the TrueType outlines should be returned unhinted. This value can be one of the following:

Flag Meaning
TTO_METRICS_ONLY Only font metrics are to be returned. Font data (either outlines or bitmaps) will not be returned.
TTO_QUBICS Outlines are to be returned in cubic Bezier format.
TTO_UNHINTED Outlines are to be returned unhinted.


Pointer to the buffer where the GLYPHDATA structure for this glyph should be written. If pgldt is NULL, no data is written to the GLYPHDATA structure.


Specifies the size, in bytes, of the buffer that receives the TrueType outline.


Pointer to the buffer where the TrueType outline should be written. The format of the data is in native TrueType format, stored in a TTPOLYGONHEADER structure. See the Microsoft Windows SDK documentation for more information about the TTPOLYGONHEADER structure.

Return value

The return value is the size, in bytes, required for the ppoly buffer if pgldt is NULL. If pgldt is not NULL, the return value is the number of bytes copied into the ppoly buffer. If an error occurs, the return value is FD_ERROR.


DrvQueryTrueTypeOutline is required for TrueType font drivers.


Target Platform Desktop
Header winddi.h (include Winddi.h)

See also