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?
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.
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.
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.
I recycle the application pool that use the fonts and it fixed.
Restart IIS. that should do the trick. rub iisreset from command line or use IIS manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With