Twisol said:
EDIT: Oddly, this returns 12 for me, when my output font is Dina 10pt. Maybe I messed something up in translation.
I think your problem is here, from the page you quoted:
Nick Gammon said:
According to the Microsoft knowledge base article, the character height, which is what we want, is the font height minus the internal leading. So we need to take WindowFontInfo (win, "f", 1) and subtract WindowFontInfo (win, "f", 4) .
You have used the font height (effectively selector 1) without subtracting the leading (selector 4). Thus this method won't work for the world fonts, however as Worstje says, you don't need to bother anyway. |