Skip to content

[BUG] font.ContainsGlyphs(text) return false but it has a glyphs on Android #3265

Open
@JoacimWall

Description

@JoacimWall

Description

use font outfit. and text is "hand om mig hela kvällen ❤️"

print the first part with "hand om mig hela kvällen " with the OutFit font.

then I try to find fallback font for the heart

Image

get this

Image

then run this on the falpbackfont and get this
Image
font.ContainsGlyphs(text)
false

but font.ContainsGlyphs(text.substring(0,1)) returns true.
but font.ContainsGlyphs(text.substring(1,1)) returns false.

the emoji is two or more chars in the string so this result in not emoji get printed on Android. On iOS all work and the fallbackfont is appleEmoji but on android you just get #91Fallback.

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

Other (Please indicate in the description)

Platform / Operating System

macOS, Android

Platform / Operating System Version

-all Android versions

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

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions