Icon font doesn't show.

Eduardo Gomez 3,591 Reputation points
2023-12-20T20:26:56.8266667+00:00

In mobile, I don't see my label with my icons, that is a material icon font.

In windows I can see everything

  1. What I am trying to achieve, is to use Icon Font in my app
  2. The expected behavior is to be able to see my icons on mobile.

this is Windows

User's image

This is Android

User's image

What I did to use Icon font

     builder
         .UseMauiApp<App>()
         .UseSkiaSharp()
         .UseMauiCommunityToolkit()
         .ConfigureSyncfusionCore()
         .ConfigureFonts(fonts => {
             fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
             fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
             fonts.AddFont("MaterialIconsRound-Regular.otf", "Mat");
         })
         .ConfigureEssentials(essentials => {
             essentials.UseMapServiceToken(Constants.MAPKEY);
         });

     var firebaseAuthClient = new FirebaseAuthClient(firebaseAuthConfig);


 xmlns:helpers="clr-namespace:DemyAI.Helpers"
 xmlns:inputLayout="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
 xmlns:sfPopup="clr-namespace:Syncfusion.Maui.Popup;assembly=Syncfusion.Maui.Popup"
 xmlns:vm="clr-namespace:DemyAI.ViewModels"
 x:DataType="vm:LoginPageViewModel">

 <Grid
     Margin="20"
     RowDefinitions="100,80,80,50,20"
     RowSpacing="40"
     WidthRequest="{OnIdiom Desktop=500,
                            Phone=300}">
     <ActivityIndicator
         Grid.RowSpan="5"
         HeightRequest="100"
         HorizontalOptions="Center"
         IsRunning="{Binding IsBusy}"
         VerticalOptions="Center"
         WidthRequest="100"
         Color="#422777" />

     <Label
         FontFamily="Mat"
         FontSize="94"
         HorizontalTextAlignment="Center"
         IsVisible="{Binding isNotBusy}"
         Text="{Static helpers:IconFont.Cloud_queue}"
         VerticalTextAlignment="Center" />

https://github.com/eduardoagr/DemyAI

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,067 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.