GETEXTENDEDTEXTMETRICS

  #define GETEXTENDEDTEXTMETRICS 256    

  short Control(lpDevice, GETEXTENDEDTEXTMETRICS, lpInData, lpOutData)    
  LPPDEVICE lpDevice;    
  LPEXTTEXTDATA lpInData;    
  LPEXTTEXTMETRIC lpOutData;    

The GETEXTENDEDTEXTMETRICS escape fills the buffer pointed to by the lpOutData parameter with the extended text metrics for the currently selected font.

Parameters

lpDevice

A long pointer to a PDEVICE structure, which is the destination device bitmap.

lpInData

Points to a EXTTEXTDATA structure containing information The EXTTEXTDATA structure has the following form:

typedef struct tagEXTTEXTDATA {

short nSize;

LPAPPEXTTEXTDATA lpInData;

LPFONTINFO lpFont;

LPTEXTXFORM lpXForm;

LPDRAWMODE lpDrawMode;

} EXTTEXTDATA;

lpOutData

Points to a EXTTEXTMETRIC structure. The EXTTEXTMETRIC structure has the following form:

typedef struct tagEXTTEXTMETRIC {

short etmSize;

short etmPointSize;

short etmOrientation;

short etmMasterHeight;

short etmMinScale;

short etmMaxScale;

short etmMasterUnits;

short etmCapHeight;

short etmXHeight;

short etmLowerCaseAscent;

short etmUpperCaseDescent;

short etmSlant;

short etmSuperScript;

short etmSubScript;

short etmSuperScriptSize;

short etmSubScriptSize;

short etmUnderlineOffset;

short etmUnderlineWidth;

short etmDoubleUpperUnderlineOffset;

short etmDoubleLowerUnderlineOffset;

short etmDoubleUpperUnderlineWidth;

short etmDoubleLowerUnderlineWidth;

short etmStrikeOutOffset;

short etmStrikeOutWidth;

WORD etmKernPairs;

WORD etmKernTracks;

} EXTTEXTMETRIC;

Return Value

The return value is the number of bytes copied to the buffer pointed to by the lpOutData parameter. This value will never exceed the size specified by the etmSize member in the EXTTEXTMETRIC structure. Otherwise, the return value is zero if the escape fails or is not implemented.

Comments

The values returned in many of the fields of the EXTTEXTMETRIC structure are affected by whether relative character widths are enabled or disabled.

See Also

ENABLERELATIVEWIDTHS