dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.83k stars 1.67k forks source link

FontImage not support woff2 format #23217

Open CodingOctocat opened 1 week ago

CodingOctocat commented 1 week ago

Description

I want to use Google Material Symbols/github

But the font icon shows up as a tofu box character image

Steps to Reproduce

  1. Download Google Material Symbols/github
  2. Copy MaterialSymbolsRounded.woff2(renamed) to /Resources/Fonts
  3. ConfigureFonts fonts.AddFont("MaterialSymbolsRounded.woff2", "MaterialSymbols");
  4. Use it anywhere
<ShellContent>
    <ShellContent.Icon>
        <FontImageSource FontFamily="MaterialSymbols"
                         Glyph="&#xe8b6;"/>
    </ShellContent.Icon>
</ShellContent>

Link to public reproduction project repository

CodingOctocat/MauiIssue_23217

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android API 34

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 1 week ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

hansmbakker commented 1 week ago

Is it possible that this is related to https://github.com/dotnet/maui/issues/16604?