PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Using a custom font with MigraDoc
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2433
Page 1 of 1

Author:  benfosterdev [ Wed May 08, 2013 3:13 pm ]
Post subject:  Using a custom font with MigraDoc

Are there any guides/samples on using a custom font with MigraDoc?

Ideally I'd like to register the font and then declare it in my Document.Styles.

Author:  Thomas Hoevel [ Wed May 08, 2013 3:28 pm ]
Post subject:  Re: Using a custom font with MigraDoc

See the Private Fonts sample for PDFsharp. Same technique works when creating PDF files with MigraDoc.

http://www.pdfsharp.net/wiki/PrivateFonts-sample.ashx

Author:  benfosterdev [ Wed May 08, 2013 3:41 pm ]
Post subject:  Re: Using a custom font with MigraDoc

Hi Thomas,

That code sample does not seem very complete. For example,

Code:
this.fontFamilies.Add(key, fontFamily);


What is "this"?

And do we need to add the WPF libraries for this to work?

Author:  Thomas Hoevel [ Wed May 08, 2013 4:03 pm ]
Post subject:  Re: Using a custom font with MigraDoc

Works only with the WPF build (currently).
The source ZIP file contains the complete sample code (the web site shows snippets only).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/