RadGlyph Custom Font Designer Error

3 posts, 1 answers
  1. Richard
    Richard avatar
    122 posts
    Member since:
    Feb 2009

    Posted 06 Nov 2020 Link to this post

    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. Answer
    Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    764 posts

    Posted 09 Nov 2020 Link to this post

    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/.

  3. Richard
    Richard avatar
    122 posts
    Member since:
    Feb 2009

    Posted 09 Nov 2020 Link to this post

    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

Back to Top