2011-12-06 36 views
1

使用下面的代碼,雙引號內部和之後的文本重疊。它似乎與字體選擇有關,但我可能無法改變這一點。MigraDoc斜體文本重疊

是否有方法或屬性可用來增加字符之間的寬度?或者一些解決方法?

Document document = new Document(); 
Section section = document.AddSection(); 
Paragraph paragraph = section.AddParagraph(); 
Font _fontTimes14Italic = new Font("Times New Roman", "14pt") { Italic = true }; 
paragraph.AddFormattedText("This is a test \"The Broken\" should display incorrectly", _fontTimes14Italic); 

PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, 
PdfSharp.Pdf.PdfFontEmbedding.Always); 

renderer.Document = document; 
renderer.RenderDocument(); 
renderer.PdfDocument.Save(filePath); 

回答

1

這是PDFsharp的WPF構建的一個bug。
切換到GDI +版本(也可用於WPF應用程序),文本將正確呈現。
這個錯誤將在下一個版本的PDFsharp(這是很久以前,但我不能說它什麼時候會來)上修復。