Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows fonts not immediately useable in application after installing?

Whenever I install a new font on a Windows 2003 server, I can't use it immediately in my asp.net web application. The application gets the font through the CreateFontIndirect gdi32.dll win api, and then use this font to create a dynamic text image in my asp.net application. It seems like fonts get cached somewhere, because I will just get the default font returned.

The font cache gets updated after a reboot, and then I get the correct font, but obviously I wouldn't like to do a reboot on a production server just for getting a new font to work.

Is there a way to flush the font cache?

like image 231
Carvellis Avatar asked Jun 03 '10 07:06

Carvellis


People also ask

Why is my newly installed font not showing up?

To resolve this issue: Click Start, point to Settings, and then click Control Panel. Double-click Fonts. On the File menu, click Fonts to place a check mark.

Why is my installed font not working?

Easiest fix: Download and reinstall the correct version of the file, making sure the font is compatible with your operating system. Locate the font files on your system and remove any duplicates. If that doesn't work, use the font in a different app to see if the font works at all.

How do I activate Windows font?

To activate a font on any version of Windows, navigate to Computer ▸ Local Disk (C:) ▸ Windows ▸ Fonts. Locate the folder you've expanded from the downloaded . zip file, and drag the font files into the Fonts folder.


2 Answers

I recycle the application pool that use the fonts and it fixed.

like image 82
Mahdi Jannati Avatar answered Sep 23 '22 11:09

Mahdi Jannati


Restart IIS. that should do the trick. rub iisreset from command line or use IIS manager.

like image 34
user1923248 Avatar answered Sep 22 '22 11:09

user1923248