Original Post
I'm having a couple of problems with getting the correct size of a character in a windows font.
Quote:1. First of all what is the difference between the "> 0" and "< 0" values? 2. I know that I can get the width of the characters using "GetCharWidth32", but how do I get the height? I know that I can give CreateFont a height, but the function takes it and looks for the largest possible font without exceeding the size, but it's not necessarily the size of the font.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_8fp0.asp nHeight [in] Specifies the height, in logical units, of the font's character cell or character. The character height value (also known as the em height) is the character cell height value minus the internal-leading value. The font mapper interprets the value specified in nHeight in the following manner. Value Meaning > 0 The font mapper transforms this value into device units and matches it against the cell height of the available fonts. 0 The font mapper uses a default height value when it searches for a match. < 0 The font mapper transforms this value into device units and matches its absolute value against the character height of the available fonts. For all height comparisons, the font mapper looks for the largest font that does not exceed the requested size.