Font dimensions using GetOutlineTextMetrics or GetGlyphOutline-VBForums
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
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,334
    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
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.