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

Install new font and need to restart the server

4 Answers 1039 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 05 Apr 2012, 08:16 AM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 05 Apr 2012, 09:52 AM
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.
0
Chris
Top achievements
Rank 1
answered on 09 Apr 2012, 08:02 AM
Hi Steve

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

Best regards,
Chris
0
Ronald
Top achievements
Rank 1
answered on 19 Dec 2014, 03:05 AM
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 
0
KS
Top achievements
Rank 1
answered on 22 Dec 2014, 04:26 PM
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
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Steve
Telerik team
Chris
Top achievements
Rank 1
Ronald
Top achievements
Rank 1
KS
Top achievements
Rank 1
Share this question
or