TextMetrics

I've never noticed this before, but when using GetTextMetrics() to get the height of the font to display the next line with proper spacing, if I use '(' or ')', they get chopped off when displaying the next line. Does GetTextMetrics() only give height for alphanumeric characters? Not sure if other fonts do the same thing.
Does GetTextMetrics() only give height for alphanumeric characters?
I don't think that would make sense. The member tmHeight is supposed to give the maximum height of all characters.

Maybe you need to consider the tmExternalLeading member?
GetTextMetrics() fills in a structure about the font. For all fonts I am using, I am using tmHeight+tmExternalLeading as my total character height. tmExternalLeading is 0 for some reason and so it is chopping off certain special characters when displaying the next line. Alphanumerics seem OK. If I add 2 to the total character height, then special characters display fine, but that seems like a hack.
Last edited on
Found the problem. I was redefining a font to be a little larger at specific times, but not recalling GetTextMetrics() to get the new parameters. Thus, user error.
Topic archived. No new replies allowed.