Hi!
I'm sorry for the late reply, I've pretty busy when you posted the fonts.
Must have forgotten it - so it's good you asked again.
I downloaded the fonts, double-clicked them and then clicked "Install".
Here's my test code (a modified HelloWorld sample):
Code:
// Create a new PDF document
PdfDocument document = new PdfDocument();
document.Info.Title = "Created with PDFsharp";
// Create an empty page
PdfPage page = document.AddPage();
// Get an XGraphics object for drawing
XGraphics gfx = XGraphics.FromPdfPage(page);
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
//XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.WinAnsi, PdfFontEmbedding.None);
// Create a font
//XFont font = new XFont("Verdana", 20, XFontStyle.BoldItalic);
XFont font = new XFont("CHSans-Light", 20, XFontStyle.Regular, options);
// Draw the text
gfx.DrawString("Hello, World! ABCDEFGHIJKLMNOPQRSTUVWXYZ", font, XBrushes.Black,
new XRect(0, 0, page.Width, page.Height / 3),
XStringFormats.Center);
gfx.DrawString("Hello, World! abcdefghijklmnopqrstuvwxyz", font, XBrushes.Black,
new XRect(0, 30, page.Width, page.Height / 3),
XStringFormats.Center);
font = new XFont("CHSans-Regular", 20, XFontStyle.Regular, options);
// Draw the text
gfx.DrawString("Hello, World! ABCDEFGHIJKLMNOPQRSTUVWXYZ", font, XBrushes.Black,
new XRect(0, page.Height / 3, page.Width, page.Height / 3),
XStringFormats.Center);
gfx.DrawString("Hello, World! abcdefghijklmnopqrstuvwxyz", font, XBrushes.Black,
new XRect(0, 30 + page.Height / 3, page.Width, page.Height / 3),
XStringFormats.Center);
font = new XFont("CHSans-Bold", 20, XFontStyle.Regular, options);
// Draw the text
gfx.DrawString("Hello, World! ABCDEFGHIJKLMNOPQRSTUVWXYZ", font, XBrushes.Black,
new XRect(0, 2 * page.Height / 3, page.Width, page.Height / 3),
XStringFormats.Center);
gfx.DrawString("Hello, World! abcdefghijklmnopqrstuvwxyz", font, XBrushes.Black,
new XRect(0, 30 + 2 * page.Height / 3, page.Width, page.Height / 3),
XStringFormats.Center);
// Save the document...
const string filename = "HelloWorld_tempfile.pdf";
document.Save(filename);
// ...and start a viewer.
Process.Start(filename);
I attach the generated PDF file. To me it looks as if the correct fonts are used (looking at Q, j and g). I made the test under Windows 7.
I don't see a problem in your code fragment. The fonts work here, so there is nothing wrong with them either.
Maybe it helps to remove and re-install the fonts.