Results 1 to 3 of 3

Thread: [RESOLVED] What are Font 'Units' ?

  1. #1

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,426

    Resolved [RESOLVED] What are Font 'Units' ?

    Hi,

    I'm trying to understand how to manipulate fonts. So far I've managed to figure out how to change various aspects of the font as used with components of a form.

    In one application, I told it to print TextBox1.Font.ToString and it printed: -

    [Font: Name=Times New Roman, Size=18, Units=3, GdiCharSet=1, GdiVerticalFont=False]
    That's fine, I understand most of that, but MSDN isn't very helpful when it comes to the 'Units=3' bit... It tells me it's the number of units to which the font is set.
    Very helpful !

    I'd like to know what that means and how to use it, is it maybe what I'd call a 'look-up table' where '3' means that the font is set to 'Points' ?

    Poppa.
    Along with the sunshine there has to be a little rain sometime.

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: What are Font 'Units' ?

    I'm not sure, but I think unit used to the width of the letter M in physical metal type at a given point size. You could measure other things in relation to that unit size.
    In this case, again not sure, I'm thinking that Units = 3 may be referring to the Line height of the font, so for single spaced lines, each line would be 3 units (3 times the width of the letter M) from one line to the next.
    Again, don't know that for a fact.

  3. #3

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,426

    Re: What are Font 'Units' ?

    Thanks for the reply Passel, I just completed a quick test application to answer my own question...

    It turns out that 'Units' is in fact just a 'Look-up Table':

    Unit:
    0 =XXXWorld
    1 =XXXNothing, and I haven't tried to use 1.
    2 =XXXPixel
    3 =XXXPoint
    4 =XXXInch
    5 =XXXDocument
    6 =XXXMillimeter

    Poppa.
    Along with the sunshine there has to be a little rain sometime.

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