Dec 6th, 2001, 09:34 PM
Font dimensions using GetOutlineTextMetrics or GetGlyphOutline
Does anyone know how to call GetOutlineTextMetrics or GetGlyphOutline and look at all of the different Font Dimensions for a specific Font (for example: Times New Roman) from VB? I am working on a cad application (TCadV7VBA) that will not give me the proper text heights (it posts by bondingbox height not Ascent, i need the "em Ascent") so I am trying to figure away to do it via code. The VBA has no functions I could find for the parameters, so I need to use API calls.
I tried GetTextMetrics but it apparently rounds off certain numbers thus I could not get the right answer. I thought I would look into the other recoverable parameters regarding fonts that are available through GetoutLineTextMetrics (for example otmrcFontBox , otmAscent, otmDescent etc. ) and GetGlyphOutline (for example gmBlackBoxY)
Can anyone help?
Dec 7th, 2001, 11:05 AM
There were darn few examples of these APIs that I could find, but take a look at the sample code from this link and see if it does anything for you.
Dec 7th, 2001, 11:04 PM
The link is to an extensive reference for declares, types and constants.
I need more help with setting up and calling the two functions, getting the values, and then releasing everthing after the values have beeen obtained.
Thank You for Your response
Click Here to Expand Forum to Full Width
Survey posted by VBForums.