I get a "c:\windows\fonts\arial.ttf not found as file or resource" error when executing the following from the development environment:
bfArial = BaseFont.CreateFont("c:\windows\fonts\arial.ttf", BaseFont.CP1252, BaseFont.EMBEDDED)
This only happens on my office computer and not on my home computer (where it works perfectly).
I have checked the obvious and made sure that the font is indeed in the c:\windows\fonts\ folder. Any ideas?
Thanks.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
To fix this problem I did two things (not sure what the actual cause was or which on fixed it)...
1) I rebuilt the source code and added the debug dll as a reference in the solution
2) I moved the website location out of my "My Documents" folder (i.e. the default location that Visual Studio wants to put all of your files) and put it in a C:\Development folder. I did this because on the PC that I use at work "My Documents" folder Synchronises with a network location and as far as .NET was concerned my solution & website were running from a Network location rather than from my PC hard drive. This caused security problems and .NET didn't let the application 'see' the windows\fonts folder.
Best of luck !