Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Libgdi+][System.Drawings]Upgrade to Net 8 cause a BUG using PrivateFontCollection #21739

Open
dcaponetti opened this issue Jan 25, 2024 · 1 comment

Comments

@dcaponetti
Copy link

I upgraded my solution to Net 8, upgrading from System.Drawings 6.0 to 8.0.

The libgdiplus i use on a Kubernetees cluster is:
libgdiplus/now 6.1+dfsg-1+b1 amd64 [installed,local]
interface library for System.Drawing of Mono

Downloaded from org.debian.org

When using PrivateFontCollection i get this Exception:

> ===> 25-01-2024 09:10:29 [Error] [] [f8e90bfa-258b-48be-9d47-c8e9247723e6] Unhandled Exception: The type initializer for 'Gdip' threw an exception.
> ===> 25-01-2024 09:10:29 [Warning] [] [f8e90bfa-258b-48be-9d47-c8e9247723e6] Stacktrace:    at System.Drawing.SafeNativeMethods.Gdip.GdipNewPrivateFontCollection(IntPtr& fontCollection)
>    at System.Drawing.Text.PrivateFontCollection..ctor()

I revert the System.Drawings to 6.0 and it worked again.

Will you upgrade libgdi+ to framework 8?
And if so, when will it be available for Debian?

Thank,
Daniel.

@lextm
Copy link
Contributor

lextm commented Jan 25, 2024

You should post to https://github.com/mono/libgdiplus/issues and also refer to https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only#reason-for-change

In short, there isn't likely to be some changes as you wished. You should check out the alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants