Install new font and need to restart the server

5 posts, 1 answers
  1. Chris
    Chris avatar
    6 posts
    Member since:
    Jul 2008

    Posted 05 Apr 2012 Link to this post

    Hi!

    Whenever we install a new font, which we want to use with Telerik Reporting, we have to restart the machine. It works fine after the restart.
    We use Telerik Reporting for rendering (ReportProcessor) PDFs in an ASP.NET Web Website (.Net Framework 4). We also tried to restart IIS, but it didnt help. We use the current version of Telerik Reporting. It's a Windows Server 2008. It also doesn't work on my Windows 7 machine.

    We need to install new fonts nearly every week, so it would be handy for us not having to restart the server each time. Is there a way or do we miss something?

    Thanks for any suggestions,
    Chris
  2. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Apr 2012 Link to this post

    Hi Chris,

    By default, when you install a new font, only the current session is notified of the change. So if you're logging in to the server in a terminal services session (which seems likely) then the ASP.NET application (which will be running in a different session) will not see the change. When you reboot, the system automatically scans the font directory and "registers" all of the fonts in there into the current session. To "manually" register a new font, you need to call AddFontResource and pass in the path to the font. To make it slightly easier, you could make it so that your app scans the Fonts folder and calls AddFontResource on each file it finds there in it's Application_Start event. That way, when you install a new font, you can just recycle the site (e.g. edit the web.config file) and it'll re-scan all of the files.

    Regards,
    Steve
    the Telerik team
    NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
  3. Chris
    Chris avatar
    6 posts
    Member since:
    Jul 2008

    Posted 09 Apr 2012 Link to this post

    Hi Steve

    Thanks for your answer. It's very helpful for me!

    Best regards,
    Chris
  4. Ronald
    Ronald avatar
    6 posts
    Member since:
    Feb 2013

    Posted 18 Dec 2014 Link to this post

    Dear Steve,
    can i have the code how to use AddFontResource ini C# Asp.net..  Coz i dont know how to use it.. Should I add a library to use this function?

    Regards,
    Ronald 
  5. KS
    KS avatar
    165 posts
    Member since:
    Oct 2012

    Posted 22 Dec 2014 in reply to Ronald Link to this post

    Hi,

    On ApplicationStart install the font - C# AddFontResource not working despite even after Windows restart  (the whole app will be recycled and all sessions will be lost, but after that the fonts will be in use).

    -KS
Back to Top