I need to mix different fonts in the same line and hold spacing correctly.
Example,
"I, Joe Blow, have been...."
I need Joe Blow in bold, but I need to hold the spacing correct after the name, no matter what name I have in there. Joe Blow will be populated from a variable, so the size of the name will vary.
Here's my code...
font = New XFont("Arial Narrow", 16, XFontStyle.Regular)
gfx.DrawString("I, ", font, XBrushes.Black, 50, 140)
font = New XFont("Arial Narrow", 16, XFontStyle.Bold)
gfx.DrawString(SQLdr("FirstName") & " " & SQLdr("MI") & ". " & SQLdr("LastName"), font, XBrushes.Black, 65, 140)
font = New XFont("Arial Narrow", 16, XFontStyle.Regular)
gfx.DrawString(" have been...", font, XBrushes.Black, 190, 140)
Please advise.
Thanks,
bsbeck
|