SkiaSharp icon indicating copy to clipboard operation
SkiaSharp copied to clipboard

[BUG] SKFont.GetTextPath returns an empty path for emojis

Open AndreaLabeljoy opened this issue 5 months ago • 1 comments

Description

I've been using SKFont.GetTextPath for a while now to render text into a path to be later processed and rendered. All works as expected, except for emoji characters. I'm on SkiaSharp/HurfBuzz 3.119.0.

Code

string text = "😊";
string fontFamily = "Segoe UI Emoji"; // Use a font that supports emoji
float fontSize = 48;

// Create typeface and font
using var typeface = SKTypeface.FromFamilyName(fontFamily);
using var fontTest = new SKFont(typeface, fontSize);

// Get SKPath for the text
using var path = fontTest.GetTextPath(text, new SKPoint(0, 0));
Debug.Print(path.Bounds.ToString()); // The SKRect returned here shows as 0 width and 0 height.

Expected Behavior

No response

Actual Behavior

No response

Version of SkiaSharp

Other (Please indicate in the description)

Last Known Good Version of SkiaSharp

2.88.9 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Windows 11

Devices

No response

Relevant Screenshots

No response

Relevant Log Output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

AndreaLabeljoy avatar Aug 04 '25 16:08 AndreaLabeljoy

We've found some similar issues:

  • #3244 , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

similar-issues-ai[bot] avatar Aug 04 '25 16:08 similar-issues-ai[bot]