PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Mixed Fontss in same line??????????? https://forum.pdfsharp.net/viewtopic.php?f=2&t=623 |
Page 1 of 1 |
Author: | bsbeck [ 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 |
Author: | Thomas Hoevel [ 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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |