Printing words with different font sizes on the same line

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
I have developed my own printing routines for my apps, nearly always variables from database or dataviewgrid in rows and columns. So far so good. However, when an item in a row has a different fontsize, the ev.Graphics.DrawString seems to paint the words on the same line according to top, not bottom. Consequently, a line such as:
Two Ten Twenty Thirty


will print with the baseline of Twenty below the baseline of the other items on the same line.

What is the property of ev.?? which carries the text height? Then I can subtract this value from the 'y as Single' value.

Thanks in advance.
 
Font.GetHeight
Instead of calculating 'y' for various parts you can calculate rectangle given a lines max height and use StringFormat to specify LineAlignment.
 
Back
Top