GetCharWidthFloat

  BOOL GetCharWidthFloat(hdc, iFirstChar, iLastChar, pxBuffer)    
  HDC hdc;    
  UINT iFirstChar;    
  UINT iLastChar;    
  PFLOAT pxBuffer;    

The GetCharWidthFloat function retrieves the fractional widths of individual characters, in the logical coordinate space, for a consecutive group of characters in the current font. For example, if iFirstChar identifies the letter a and iLastChar identifies the letter z, GetCharWidthFloat retrieves the widths of all lowercase characters. The function stores the values as 32 bit IEEE floating point values in the buffer pointed to by pxBuffer. The function comes in Ansi and Unicode versions.

Parameters

hdc

Identifies the device context.

iFirstChar

In the Ansi or Unicode version of the call iFirstChar represents the Ansi or Unicode code point of the first character in the contiguous range respetcively.

iLastChar

In the Ansi or Unicode version of the call iLastChar represents the Ansi or Unicode code point of the last character in the contiguous range respectively. This range is inclusive. An error is returned if iLastChar precedes iFirstChar.

pxBuffer

Points to a buffer that will receive the widths.

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE.

Comments

If a character does not exist in the current font, it will be assigned the width of the default character.

The character width is a positive number that is measured along the base line direction of the font.