This is a migrated thread and some comments may be shown as answers.

RadGlyph Custom Font Designer Error

2 Answers 192 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Richard asked on 06 Nov 2020, 09:52 AM

I'm using RadGlyph with the FontAwesome library and it works great. I register the font in my App.xaml - OnStartup  and when I run my application the icons load correctly and look crisp and clear. 

The issue is in the Visual Studio designer RadGlyph complains constantly that the 'Font family FontAwsome is not registered'. This breaks parts of the UI designer and add these errors to the Error List make it look a lot worse than it is and makes finding real errors harder. 

My question is, how do I register the custom font in away that RadGlyph can detect it in the designer or can I turn off the detection of this error altogether? I don't need to see the icon in the designer I just want to clean up the error messages. 

 

Thanks,

Richard

2 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 09 Nov 2020, 12:05 PM

Hello Richard,

Thank you for the shared pictures. 

Please, allow me to start by saying that changing the way the font is registered will not be sufficient. There is a known limitation regarding the usage of external fonts during design-time. According to this article, under the Automatic font embedding section: "During design time, there is no support for searching an application's use of fonts and automatically embedding the fonts in the application's resources.".

With this in mind, in order to avoid the designer errors, you have to install the font on your machine, if it is not already installed.

 

Additionally,  you can register the font in the static constructor of your window. Please, find a sample project, where I have setup the Font Awesome 5 Free Regular font. Note, that on my end I had to run the project and rebuild the solution several times for the Visual Studio designer to refresh properly and display the glyph in the designer(removing the errors).

I hope you find this information helpful. 

Regards,
Vladimir Stoyanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 09 Nov 2020, 01:05 PM

Thanks Vladimir , fantastic support as always. After registering the font and lots of rebuilds VS finally picked up the font and the designer errors went away. 

Richard

Tags
General Discussions
Asked by
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Vladimir Stoyanov
Telerik team
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or