PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Embed Font (again) https://forum.pdfsharp.net/viewtopic.php?f=2&t=2389 |
Page 1 of 1 |
Author: | mweser [ Wed Mar 27, 2013 11:00 am ] |
Post subject: | Embed Font (again) |
Hey there, as usual, there are a lot of posts on this in the web and in this forum, but none of this helped... I use Windows and Migradoc Version = "1.32.3885.0" To generate a pdf i create a document. Code: var doc = new MigraDoc.DocumentObjectModel.Document(); then i define the style for the document with a font Code: var style = doc.Styles["Normal"]; style.Font.Name = "Adobe Fan Heiti Std B"; then i add my sections, paragraphs, etc. and print the pdf as follows Code: var printer = new PdfDocumentRenderer {Document = doc}; printer.RenderDocument(); printer.Save(filePath); This works fine. However, from the designer i got another font, which was not installed on my pc. I installed the .otf files (it is HelveticaNeueLTStd-Cn.otf and two other versions of HelveticaNeueLT). I can use the new installed fonts in all programs (e.g. MSWord) but i cannot use them in my document. I get the Error Cannot get a matching glyph typeface for font 'HelveticaNeueLT Std Cn'. I can load the font directly from c# (not the installed one, but the source) Code: var tf = new GlyphTypeface(new Uri(@"C:\temp\HelveticaNeueLTStd-Cn.otf", UriKind.Absolute)); but i don't know how to embed it to my Migradoc Document... So the question is: How to use an .otf font in a MigraDoc Document to generate a pdf (on a Windows maschine)? Thanks. PS: also posted on http://stackoverflow.com/questions/15657083/embedding-font-in-migradoc |
Author: | Thomas Hoevel [ Wed Mar 27, 2013 12:26 pm ] |
Post subject: | Re: Embed Font (again) |
Answered on http://stackoverflow.com/a/15657546/162529 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |