Hello, can someone confirm whether or not the current GDI build of Migradoc & PDFSharp available on Nuget (v1.50.4589.0) supports the use of private fonts and if so which mechanism should be used to load them? (i.e. IFontResolver or XPrivateFontCollection).

I have tried both approaches and have had more success with the XPrivateFontCollection approach but still have rendering issues with this so i was hoping to confirm the recommended approach before trying to progress this further.

I am attempting to load the 'font awesome' font from an embedded resource (.ttf file) and although both of the above approaches appear to load the font successfully the IFontResolver scenario renders the text characters as rectangles.

In the XPrivateFontCollection scenario the text renders ok in certain areas but fails (i.e. renders as rectangles) when used in paragraphs embedded in text frames. I am sure this is down to my lack of understanding of how all of this hangs together (i am new to this library) but i have seen a few posts that suggest i shouldn't be using the XPrivateFontCollection approach.

The background to this is that ultimately I need to render pdf documents in both Debain and Windows environments and be able to support Cyrillic (and others) unicode characters so, as a proof of concept, i am attempting to get the generation running with Cyrillic characters under a windows environment before trying it out on Debian. It seemed like a sensible approach to use a common embedded private font as opposed to attempting to deduce a suitable font under each host environment.

IFontResolver is new with PDFsharp 1.50.It cannot be used with the GDI build of PDFsharp.It cannot be used with the WPF build of PDFsharp if you want to use the DocumentPreview - fonts used with IFontResolver are not available in the preview.

I think the core build without GDI+ is ultimately what I need but i appreciate that this may be a while off. I will have a go with system fonts and the GDI build for now under windows and then look at the Debian scenario once i have the basics needs covered.

Who is online

Users browsing this forum: No registered users and 7 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum