Font Sizing in Metric

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jateennaran
    New Member
    • Sep 2007
    • 3

    Font Sizing in Metric

    Hi

    I was wondering is there a way to draw your fonts in Millimeters or inches instead of using point in VB. I know that you can use the graphics class to draw the text, but you still have to specify a font size in points.
  • SammyB
    Recognized Expert Contributor
    • Mar 2007
    • 807

    #2
    Originally posted by jateennaran
    Hi

    I was wondering is there a way to draw your fonts in Millimeters or inches instead of using point in VB. I know that you can use the graphics class to draw the text, but you still have to specify a font size in points.
    If you are using VBA in an Office app, then you use Application.Cen timetersToPoint s. In VB6 and VB.NET, you can create your own function using the fact that one point = 0.03527777777 centimeters or 1 centimeter = 28.34645669 points. Ref http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx

    Comment

    • jateennaran
      New Member
      • Sep 2007
      • 3

      #3
      Originally posted by SammyB
      If you are using VBA in an Office app, then you use Application.Cen timetersToPoint s. In VB6 and VB.NET, you can create your own function using the fact that one point = 0.03527777777 centimeters or 1 centimeter = 28.34645669 points. Ref http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx

      Thanks for the repy, but different fonts display at different sizes at the same point size. For example Arial at any point size will be greater than Times New Roman at the same point size. How is it possible that 1 point = 0.03527777777 centimeters when the heights of the two fonts are different.

      Comment

      • SammyB
        Recognized Expert Contributor
        • Mar 2007
        • 807

        #4
        Originally posted by jateennaran
        Thanks for the repy, but different fonts display at different sizes at the same point size. For example Arial at any point size will be greater than Times New Roman at the same point size. How is it possible that 1 point = 0.03527777777 centimeters when the heights of the two fonts are different.
        Well, if you create a Word document with two columns and paste the same text in both columns and make one column Times & the other Ariel, you will see that we are both correct. Notice that the lines are the same distance from the top in both columns, so Word causes them to take up the same space, but Ariel uses up more of the available room, so you could use Format|Paragrap h|LineSpacing=E xactly and make the Times closer together, but notice that the exact measurement is in points, so if you set both sides to 12 point Exact Line Spacing, they will still lineup. In VB.Net, the graphics object has a MeasureString method that will give you the exact size of a string. It would be different for Times vs Ariel. Nothing is simple, except that 1 point = 0.03527777777 cm. HTH! --Sam

        Comment

        Working...