Skip to content

Try to implement DefaultGraphicEngine with SkiaSharp #2470

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

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

stefannikolei
Copy link

No description provided.

@stefannikolei
Copy link
Author

@jahav I tried to port the GraphicEngine to SkiaSharp. I think it will be really hard to get all tests green. The results of width and height are just of by a small number..

But my main problem is, that I am on a Mac and the tests from dev are not passing there. so its hard to know what's the real problem..

@stefannikolei
Copy link
Author

@jahav I would still be willing to get this PR into an mergeable state. But I am having problems with the development environment. I am using an MAC and on that some tests fail. This makes it hard to get this one right.

How can we go forward on that? I am stuck on older ImageSharp versions because of #2171

I would also contribute some time into setting up Github actions build for multiple platforms (#2346
). But I just need an ok of you before I invest the time for nothing.

@jahav
Copy link
Member

jahav commented Apr 6, 2025

@stefannikolei If you need it, set the static property LoadOptions.DefaultGraphicEngine to the engine (see docs).

You can also still use SixLabors.Fonts version 1.0.1 (nuget), it is still available under Apache license. Just explicitly set dependency in the project.

As for the PR, probably don't invest time. AdjustToContent doesn't work properly for several things and if I have to invest time into checking all test files because of minor font size changes, I want to be benefit of some fixes so I don't need to do check files over again and again.

Situation is going to require change sooner or later, but Skia doesn't work on WebAssembly (=client Blazor) so I am postponing it.

AdjustToContent is a terrible mess (to be more clear Excel functionality is a mess) and each library calculates slightly differently, see Cell-Dimensions for some stuff of how I think it works.

@stefannikolei
Copy link
Author

Hm have not tested blazor with skis yet. But from what I can see e.g this PR mono/SkiaSharp#1811

It should work.

Copy link

@terenzif terenzif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

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

Successfully merging this pull request may close these issues.

3 participants