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

[BUG] x86 fonts are corrupted #3122

Open
1 task done
maiad opened this issue Dec 18, 2024 · 2 comments
Open
1 task done

[BUG] x86 fonts are corrupted #3122

maiad opened this issue Dec 18, 2024 · 2 comments
Labels

Comments

@maiad
Copy link

maiad commented Dec 18, 2024

Description

After update to 3.116.1 My application works perfectly in Any CPU and x64 profile, but rendering fonts crashes after few seconst in x86 profile. Older nuget version worked perfectly.

Code

The best way to share code for larger projects is a link to a GitHub repository: https://github.com/user/repo/tree/bug-123

But, you can also share a short block of code here:

// some C# code here

You can also share some XAML:

<!-- xaml code here -->

Expected Behavior

No response

Actual Behavior

No response

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

2.88.9 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

No response

Devices

No response

Relevant Screenshots

x64 screen
x32 screen

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mattleibow
Copy link
Contributor

Are you using CPU or GPU rendering? Can you attach a repro sample with the code and the font? This issue does not enough information to start testing.

@maiad
Copy link
Author

maiad commented Jan 4, 2025

Failed with GL and without GL
I encountered an issue where the font disappears in both GL and non-GL modes. Below, I provide a sample project and a video demonstrating the problem.

skiaerror.mp4

appSkiaSharpTest.zip

Steps to reproduce:

Use the x86 profile.
Then switch to Any CPU or x64 – the issue occurs only with the x86 profile.

Description:
When moving the cursor, I refresh the Skia control and paint using the following code:

    private void SK_PaintSurface(object sender, SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e)
    {
        var c = e.Surface.Canvas;
        using (SKPaint p = new SKPaint())
        {
            p.Color = SKColors.Red;
            e.Surface.Canvas.DrawRect(10, 10, 400, 400, p);
            p.Color = SKColors.Black;
            e.Surface.Canvas.DrawText("Hallo from skia !", 100, 100, font, p);
            p.Color = SKColors.Yellow.WithAlpha(128);
            e.Surface.Canvas.DrawRect(x - 10, y - 10, 200, 20, p);
        }
    }

Issue:
After a few invalidations, the text is no longer drawn correctly.

@maiad maiad changed the title [BUG] x86 fonts are corruptet [BUG] x86 fonts are corrupted Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

No branches or pull requests

2 participants