Skip to content

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

@AndreaLabeljoy

Description

@AndreaLabeljoy

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

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

Metadata

Metadata

Labels

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions