Hello,
I've enabled Unicode support in PDFSharp as described on your wiki, and applied it to 3 different fonts which we then use with the XGraphics.DrawString method. Set-up code as follows:
Code:
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
this.NormalFont = new XFont("Arial", 8, XFontStyle.Regular, options);
this.BoldFont = new XFont("Arial", 8, XFontStyle.Bold, options);
this.TitleFont = new XFont("Arial", 12, XFontStyle.Bold, options);
However upon loading the resulting document into Acrobat Reader, all fonts are consistently in bold, even the NormalFont. What's more, as an experiment I changed all of the fonts to "Times New Roman" and XFontStyle.Regular - and even then the font consistently displays as Arial Bold! (at least, it's definitely not a serif font) Without setting the font options, the NormalFont displays correctly.
For the code above, the Fonts tab in Acrobat Reader document properties lists the following:
Arial (Embedded Subset). Type: TrueType (CID). Encoding: Identity-H.
Arial,Bold (Embedded Subset). Type: TrueType (CID). Encoding: Identity-H.
Whereas without the font options, it displays the following:
Arial. Type: TrueType. Encoding: Ansi. Actual Font: ArialMT. Actual Font Type: TrueType
Arial,Bold. Type: TrueType. Encoding: Ansi. Actual Font: ArialMT. Actual Font Type: TrueType
I would attach the problematic document but it's a bit commercially sensitive for a public forum... Hope there's enough information here.
Many thanks
Ed