 |
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
View previous topic :: View next topic |
Author |
Message |
sklett
Joined: 20 Jul 2007 Posts: 5
|
Posted: Thu Jul 26, 2007 12:04 am Post subject: Problem using 'Monotype Corsiva' font |
|
|
This code:
Code: |
Paragraph p = row.Cells[1].AddParagraph(signee);
p.Format.Font.Name = "Monotype Corsiva";
|
Throws the following exception when rendered:
Quote: |
"Font 'Monotype Corsiva' does not support style 'Regular'."
|
And the stacktrace:
Quote: |
at System.Drawing.Font.CreateNativeFont()
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
at PdfSharp.Drawing.XFont.Initialize()
at PdfSharp.Drawing.XFont..ctor(String familyName, Double emSize, XFontStyle style, XPdfFontOptions pdfOptions)
at MigraDoc.Rendering.FontHandler.FontToXFont(Font font, PdfFontEncoding encoding, PdfFontEmbedding fontEmbedding)
at MigraDoc.Rendering.ParagraphRenderer.get_CurrentFont()
at MigraDoc.Rendering.ParagraphRenderer.CalcCurrentVerticalInfo()
at MigraDoc.Rendering.ParagraphRenderer.InitFormat(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.ParagraphRenderer.Format(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.TopDownFormatter.FormatOnAreas(XGraphics gfx, Boolean topLevel)
at MigraDoc.Rendering.FormattedCell.Format(XGraphics gfx)
at MigraDoc.Rendering.TableRenderer.FormatCells()
at MigraDoc.Rendering.TableRenderer.InitFormat(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.TableRenderer.Format(Area area, FormatInfo previousFormatInfo)
at MigraDoc.Rendering.TopDownFormatter.FormatOnAreas(XGraphics gfx, Boolean topLevel)
at MigraDoc.Rendering.FormattedDocument.Format(XGraphics gfx)
at MigraDoc.Rendering.DocumentRenderer.PrepareDocument()
at MigraDoc.Rendering.PdfDocumentRenderer.PrepareDocumentRenderer(Boolean prepareCompletely)
at MigraDoc.Rendering.PdfDocumentRenderer.PrepareRenderPages()
at MigraDoc.Rendering.PdfDocumentRenderer.RenderDocument()
at PMD.ManufacturingStudio.ProductionBuildModule.MSDocumentBase.RenderAndSaveDocument(String filename)
at PMD.ManufacturingStudio.ProductionBuildModule.BuildOrderDocument.CreateDocument(String filename)
at PMD.ManufacturingStudio.ProductionBuildModule.BuildOrdersViewPresenter.PrintOrder(BuildOrder buildOrder)
|
Anyone have any ideas for me? Am I doing this wrong? |
|
Back to top |
|
 |
Thomas Hoevel

Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Thu Jul 26, 2007 8:03 am Post subject: |
|
|
I had no problem when I chose that font in our application today.
I selected the font in our GUI - and there really is no regular style available, so I could only choose "italic" or "bold italic".
It should work if you set "Italic = true".
I think the exception is a bug that needs to be fixed; use "Italic = true" as a workaround. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
 |
sklett
Joined: 20 Jul 2007 Posts: 5
|
Posted: Fri Jul 27, 2007 3:25 pm Post subject: |
|
|
Thomas,
Thank you for the reply. You are correct, changing Italic = true solved the problem. Looking back now it makes sense, it Word the only option was Italic.
Thanks for the hlp,
Steve |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|