Declined
Last Updated: 08 May 2023 12:51 by ADMIN
Stephen
Created on: 13 Apr 2023 00:25
Category: UI for .NET MAUI
Type: Bug Report
0
Errors are being thrown - Unable to load font 'TelerikFont'.

I don't have definitive proof on when it started but I did update my Telerik.UI.for.Maui NuGet package from Trial to an official licensed version and that is when I started to see bizarre behavior for the ButtonToolbarItem control. Suddenly, NO FONT ICONS show! Also, in my log file, I see this:

Unable to load font 'TelerikFont'.

I don't have this font installed in my Maui Resources\Fonts folder nor do I load it in my MauiProgram ConfigureFonts extension method for the MauiApp builder. It was working until two days ago.

I turned on BLAST mode in my debugger where I was seeing exceptions being thrown all over the place with regard to loading fonts. I am up against a crucial investor funding demo so I do not have the time to dig down to the core of this issue at the moment. This issue I am logging is there for you to ask me questions on things I can verify so we can work on this together.

What are some of the things you need me to do or look at to report back... The fact that NONE of my FontImageSource icons are being displayed in my RadToolBar ButtonToolbarItems is suspect. The reporting of the TelerikFont is even more suspect. I wasted a TON of valuable time today trying to find a workaround, but none could be found. GitHub Copilot and ChatGPT kept giving me bogus answers for properties on your controls that don't exist which only exacerbated my frustration. I tried to use PNG files as the icon, but your ButtonToolbarItem image source only allows font image sources which I think is a very bad design decision on your behalf. What if a font does not provide the correct image I wish to display? You really should allow png images to be used on these buttons!!!

Like I said, it was working up until several days ago...

Thanks, Steve

8 comments
ADMIN
Lance | Manager Technical Support
Posted on: 08 May 2023 12:51

Hello Stephen,

That's great news!

As a post-fix investigation suggestion, try comparing the two project's csproj files to see if there is any noticeable difference.  For example, the file itself may be getting excluded by an ItemGroup that set the file to None. The only ItemGroup that should be interacting with that file is this one:

To wrap things up here, I'll mark this Feedback Portal item as Declined, because it's not a Telerik UI for MAUI bug.  If you do have any further issues and would like assistance, I recommend using one of these items (instead of Feedback Portal Bug Report/Feature Request):

This will allow us to better help you and have a faster turnaround time. This Feedback Portal is primarily used to track items, rather than provide 1:1 technical help.

Regards,
Lance | Manager Technical Support
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Stephen
Posted on: 07 May 2023 15:06

Greetings,

Thank you for your patience!

I really do not know what caused the issue in the first place, but I decided to create an entirely new solution and one-by-one, I added one file from the old solution into the new so I could isolate where the problem started. Unfortunately, I was not able to zero in on what happened - something in my old solution got corrupted or something.

In any event, in my new solution, you'll probably never guess, but the ICONS STARTED TO DISPLAY!!! Yea!!!

So, unless this happens again, and if it does, I will hunt the cause down with even more vigor. Until then, please close this issue and chalk it up to a very experienced software engineer, not doing what we always do not do and that is read the f'n manual!!!!

Thanks, Steve

ADMIN
Didi
Posted on: 27 Apr 2023 05:46

Hi Stephen,

The status of this item is Need More Info. Please take your time and when you have more details on this case, send them to this public item for further research on my side. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Stephen
Posted on: 26 Apr 2023 16:45

Hi Didi,

Thank you for your last response. I apologize for not responding to you earlier... And, this isn't much of a response as all I am saying at this point is the errors still persist in my application. I created an entirely new MAUI project and get the same errors and icon-less buttons. I am under a severe time crunch at the moment trying to get out an alpha demo of our product so I am pushing to get that done regardless of how crappy the buttons look with the square icon placeholder. I plan on enabling traps in debug by trapping the various exceptions in the Exception Settings window. Hopefully, I can get to it this weekend. If you could just indulge me and keep this issue open for a little while longer, I'd appreciate it!!

Thanks,

Steve

ADMIN
Didi
Posted on: 19 Apr 2023 12:30

Hi Stephen, 

Thank you for your feedback about Telerik .NET MAUI controls, really appreciated. All of your feedback is shared with our management and development teams. 

Let me get straight to the points:

1) Images in toolbar item: I am glad to hear you have solved the behavior and the image is displayed correclty.

2) Telerik Font still crashes: Did you test the project I have attached? Can you reproduce the crash with the Telerik font in it? I am not sure why the behavior occurs on your side and how can I reproduce the crash on my side. If you can reproduce the behavior in the sample, send me the exact steps, or update the project so the issue can be reproduced, then send it back to me for further research.  

3) Scheduler: We have this control in our plans. Currently we are working on Calendar control for .NET MAUI: https://feedback.telerik.com/maui/1577297-add-calendar-control You can review the Telerik .NET MAUI RoadMap for what is coming in 2023: https://www.telerik.com/support/whats-new/maui-ui/roadmap 

4) Could you please share mode details on the feedback about Telerik controls usage and exposed properties? Whether the getting started experience of the control is not explained with details? What are the properties you want to use and are not exposed in the controls? Your additional feedback on this will be really appreciated. Customers feedback is important for us as it helps us improve our product and services. 

Thank you in advance.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Stephen
Posted on: 13 Apr 2023 16:43

Hi Didi,

Well, I figured out how to do what I want to do, but it still isn't pretty.

 
1) In my application .csproj file, I added the next line. I had to do this as I think this is the only to limit the size of the image to 16x16:
 
<MauiImage Update="Resources\Images\btn_inbox_in.svg" BaseSize="16,16" />
 
2) In the xaml file, I defined the toolbar as follows:
 

    <telerik:RadToolbar
        x:Name="Toolbar"
        BackgroundColor="Lime"
        BorderThickness="0"
        HeightRequest="52"
        ItemSpacing="{OnPlatform Default=4, Android=0}"
        Padding="2"
        VerticalOptions="Start">
        <telerik:ButtonToolbarItem
            x:Name="InboxInBtn"
            ImageSource="btn_inbox_in.png"
            Text="Click me!" />
    </telerik:RadToolbar>

The thing that frustrated me was the sizing of the image which was solved by the line above. Since I have close to 100 images I need to use, this will be a pain in the you know what, but I'll cope!! It works for me now! ðŸ˜Š

With all of this said, there is still the mystery as to why I am seeing the failure to load the Telerik font which we still need to solve. More on that after I get this darned demo done!!!
 
Thanks for all your help!!
Steve
 
BTW: I really LOVE this control set!! I used Telerik WPF controls 10 years ago and the programming paradigm was totally different from how I implemented Infragistics controls and I really didn't like your approach then. And, again, your approach to the MAUI controls is completely different from how Syncfusion does its MAUI controls. The Syncfusion approach is easier to use and more properties are exposed that do more than what I get with your controls, but the quality of the Syncfusion product is HORRIBLE!!! So, now I'm a happy Telerik user! Now, if you guys would hurry up and release your Scheduler control and I'll be even happier!!! ðŸ˜€
Stephen
Posted on: 13 Apr 2023 13:22

Hi Didi!

Thank you for getting back to me. I'll go through the steps you outlined above, but I wanted to provide some additional information.

I generated a very simple application to test using Font Awesome font icons. The icon does not show up there, either.

I just went into VS2022 (v17.5.3) and merely added a toolbar with one button that included a FontImageSource. I have attached a screenshot of the results.

This is my MauiProgram.cs:

using Microsoft.Extensions.Logging;

using Telerik.Maui.Controls.Compatibility;

namespace MauiApp1;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        _ = builder
            .UseMauiApp<App>()
            .UseTelerik()
            .ConfigureFonts(fonts =>
            {
                _ = fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                _ = fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
                _ = fonts.AddFont("FontAwesome6Pro-Light-300.otf", "FaLight");
            });

#if DEBUG
        builder.Logging.AddDebug();
#endif

        return builder.Build();
    }
}

 

Nothing special about that... Here is my MainPage.xaml:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:fonts="clr-namespace:MobyClient.Infrastructure"
    xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
    x:Class="MauiApp1.MainPage">
    <telerik:RadToolbar
        Grid.Column="2"
        BorderThickness="0"
        ItemSpacing="{OnPlatform Default=4, Android=0}"
        Margin="-1,-1,-1,0"
        OverflowMode="Scroll"
        ScrollButtonsVisibility="{OnIdiom Desktop=Auto, Default=Hidden}">
        <!-- Find Contact -->
        <telerik:ButtonToolbarItem
            x:Name="tempbtn"
            Text="Click me!">
            <telerik:ButtonToolbarItem.ImageSource>
                <FontImageSource
                    FontFamily="FaLight"
                    Glyph="{x:Static fonts:FontAwesomeLight.UserPlus}"
                    Size="16" />
            </telerik:ButtonToolbarItem.ImageSource>
        </telerik:ButtonToolbarItem>
    </telerik:RadToolbar>
</ContentPage>

Even doing this simple app shows the bug.

Like I have stated, this just started the other day.......

I'm excited to try your suggestions and I will get back in a moment!

Steve

ADMIN
Didi
Posted on: 13 Apr 2023 08:13

Hi Stephen,

Thank you for the provided details. I am sorry to hear about the behavior with the Toolbar and Telerik font. We have not been reported such an issue before. 

Trial / Dev package

I can assure you that the behavior is not from the usage of dev package. The difference between the trial and dev packages is when you have a trial version installed a trial message is displayed.

Demo project:

I have created a sample to test the behavior with the font and I cannot reproduce the issue. Sample project is attached. Could you please download and test on your side? 

Our Toolbar examples in the SDK Browser use the TelerikFont. The TelerikFont is a font we use internally in our controls. So we do not provide this font as a separate ttf file. In the SDK app, the font is accessed though:

<telerik:NavigationButtonToolbarItem.ImageSource>
                    <FontImageSource Glyph="{x:Static telerik:TelerikFont.IconSearch}"
                                     FontFamily="{x:Static telerik:TelerikFont.Name}"
                                     Size="16" />
                </telerik:NavigationButtonToolbarItem.ImageSource>

For the Controls Samples we use the TelerikFontExmaples: https://github.com/telerik/maui-samples/blob/5ec1ec15a8d44b93a41811256921104f2432a3bd/Samples/ControlsSamples/Examples/ToolbarControl/FirstLookExample/FirstLookView.xaml#L75  The TelerikFontExmaples is added inside the Resources/Fonts folder of the application https://github.com/telerik/maui-samples/tree/main/Samples/ControlsSamples/Resources/Fonts 

There isn't a requirement to use the TelerikFont as a font for the Toolbar. You can use any other font you want.

Additional info: 

Could you please share what is the .NET Maui version you use? I am asking as you have mentioned "Like I said, it was working up until several days ago... - did you update the .NET Maui version, Visual Studio version, etc.? 

Next Steps:

Download and test the sample I provided. Modify it to match the exact setup you have and send the project back to me for further research. 

Images in Toolbar:

The ImageSource property of the LabelToolbarItem is of type Microsoft.Maui.Controls.ImageSource, so you can use a .png file. The demo I attached uses a .png for one ButtonToolbarItem. I am not sure what is the setup on your side and why the .png file is not displayed. 

Looking forward to your reply. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files: