empira / PDFsharp-1.5

A .NET library for processing PDF
MIT License
1.28k stars 589 forks source link

Under PdfSharp/Fonts/FontFactory.cs -> if i want to use both private font & platform specific font , my platform specific font wont get resolved #180

Closed Adithya-K-Shetty closed 5 months ago

Adithya-K-Shetty commented 5 months ago

If you think there is a bug in PDFsharp then please use the IssueSubmissionTemplate to make the issue replicable.
http://www.pdfsharp.net/wiki/IssueSubmissions.ashx

Thanks.

Resources

The official project web site:
http://pdfsharp.net/

The official peer-to-peer support forum:
http://forum.pdfsharp.net/

Reporting an Issue Here

image in the above Screen Shot, check only happens for private font and suppose if i try to use a platform specific font i get throw new InvalidOperationException("No appropriate font found.");

which should not happen

Expected Behavior

Should Be Able To Resolve Both Platform Specific Font & Private Font

Actual Behavior

throw new InvalidOperationException("No appropriate font found.");

Steps to Reproduce the Behavior

Use Any System Specific Font Along With Private Font We strongly recommend using the IssueSubmissionTemplate to make sure we can replicate the issue.
http://www.pdfsharp.net/wiki/IssueSubmissions.ashx

Pls Assign This Issue To Me 🙏

ThomasHoevel commented 5 months ago

It's a feature, not a bug: A FontResolver, if set, is responsible for all fonts. FontResolvers can call the PlatformFontResolver to handle system fonts not handled by the FontResolver.