bsbeck
Joined: 29 Jan 2009 Posts: 1
|
Posted: Thu Jan 29, 2009 5:52 pm Post subject: Mixed Fontss in same line??????????? |
|
|
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 |
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Feb 02, 2009 9:25 am Post subject: |
|
|
I'd use MigraDoc.
I don't know how MigraDoc does it. If you don't want to use MigraDoc, then check the MigraDoc source how it does it. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|