Skip to content

[Android] FontIcon Doesn't Render Symbol Font #2766

Closed

Description

@SkyeHoefling

Current behavior

Using the Segoe MDL2 Assets fonts built into UWP doesn't work on Android FontIcons. Depending on the use-case the app will crash or show invalid icons.

Screenshot on UWP

image

Screenshot on Android

image

Expected behavior

I expect the Segoe MDL2 Assets to be loaded in Uno Projects by default so you can use the same assets in UWP right out of the box.

This is related to other issues reported to Symbol Icons not working, but the asset file is different:

This problem is different from the related items as it uses the official Segoe MDL2 Assets where the other GitHub issues use the related font winjs-symbols.ttf#Symbols.

How to reproduce it (as minimally and precisely as possible)

Uno_Bug_FontIcon.zip

Workaround

If you install the font manually to the android project you can specify the platform path to the font and everything will work correctly

<FontIcon android:FontFamily="ms-appx:///Assets/Fonts/SegMDL2.ttf" win:FontFamily="Segoe MDL2 Assets" Glyph="&#xEB51;" Width="50" Height="50" />

Environment

Nuget Package: Uno.UI

Package Version(s): 2.0.532

Affected platform(s):

  • iOS (untested)
  • Android
  • WebAssembly (untested)
  • WebAssembly renderers for Xamarin.Forms (untested)
  • macOS (untested)
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: 16.2.5)
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: N/A)

Anything else we need to know?

I was able to provide a workaround by downloading the font from the official microsoft docs and adding it to the android project.

Activity

  1. added
    kind/bug
    triage/untriaged
    on Mar 9, 2020
  2. jeromelaban commented on Apr 17, 2020

    @jeromelaban
    Member

    Thanks for your report, I'll close this issue in favor of #3011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions