PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem using 'Monotype Corsiva' font

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
sklett



Joined: 20 Jul 2007
Posts: 5

PostPosted: Thu Jul 26, 2007 12:04 am    Post subject: Problem using 'Monotype Corsiva' font Reply with quote

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
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Jul 26, 2007 8:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sklett



Joined: 20 Jul 2007
Posts: 5

PostPosted: Fri Jul 27, 2007 3:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com