Results 1 to 3 of 3

Thread: Font dimensions using GetOutlineTextMetrics or GetGlyphOutline

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    22

    Question 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?
    Thank You
    CWCookman

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    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.


    http://www.freevbcode.com/ShowCode.Asp?ID=1458

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    22

    Question

    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
    CWCookman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width