PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Oct 31, 2024 11:14 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Oct 23, 2023 11:29 am 
Offline

Joined: Mon Aug 07, 2023 9:07 pm
Posts: 10
ASP.NET MVC application has fonts in ots wwwroot/fonts subfolder.

How to force NewFontResolver to use fors from this directory in both Linux and windows?

In Linux NewFontResolver searches also directory sptecified in FONTCONFIG_PATH environment variable

https://github.com/empira/PDFsharp/blob ... 41-L195C41

but this requires setting environment externally and does not work in windows.

How to add additional font directory from application so so that this or only this directory is also searched ?


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 23, 2023 11:53 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3111
Location: Cologne, Germany
Implement your own IFontResolver.

Maybe copy NewFontResolver and make all the changes you need.
Might be better to write your own IFontResolver that reads font files from app folder. Or from assembly resources.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


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 post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group