empira / PDFsharp

PDFsharp and MigraDoc Foundation for .NET 6 and .NET Framework
https://docs.pdfsharp.net/
Other
492 stars 114 forks source link

Unicode "Estimates" not printing #65

Closed tkolb-recom closed 9 months ago

tkolb-recom commented 9 months ago

I tried the recent PDFsharp lib to evaluate whether a serious problem with v1.5 was addressed meanwhile. Some issued characters are now not resulting in exceptions anymore but I stumbled upon the following.

Expected Behavior

Unicode ≙ (U+2259) should be printed

That code is explicitly supported with Arial Unicode and Cambria Math

Actual Behavior

Displayed Unicodes are U+2259 (Estimates), U+221E (Infinity), and U+2211 (Sum)

image

Steps to Reproduce the Behavior

run that IssueSubmission program:

https://github.com/tkolb-recom/PDFsharp.IssueSubmissionTemplate/commit/0caa601e21a7bc8737585a7d75b6c2faa2737beb https://github.com/tkolb-recom/PDFsharp.IssueSubmissionTemplate/releases/tag/tagEstimates -- ZIP-Download

ThomasHoevel commented 9 months ago

Cambria Math is a True Type Font Collection and not yet supported by PDFsharp.

Arial Unicode MS works as expected when the correct font files are used (I tried the WPF build under Windows 10).

image

tkolb-recom commented 9 months ago

Cambria Math is a True Type Font Collection and not yet supported by PDFsharp.

Arial Unicode MS works as expected when the correct font files are used (I tried the WPF build under Windows 10).

Sorry for being late on this, there were some holidays/vacation in between. What are the "correct font files"? I did not change any fonts in windows. What's the different in the example project?

I think it should not matter: We do not use WPF. We are sadly somehow still bound to WinForms.

Edit: I see now, when using the GDI/WPF assemblies the resolved font actually is not what was requested. However when using the plain project it printed the font name like it was requested but actually is not the right font.