By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,663 Members | 1,455 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,663 IT Pros & Developers. It's quick & easy.

Font 'Arial' doesn't support style 'Regular'.

P: n/a
Hi, hope someone can help me

I'm getting this exception:

[ArgumentException: Font 'Arial' doesn't support style 'Regular'.]
System.Drawing.Font.Initialize(FontFamily family, Single emSize,
FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean
gdiVerticalFont) +584
System.Drawing.Font.Initialize(String familyName, Single emSize,
FontStyle style, GraphicsUnit unit) +58
System.Drawing.Font..ctor(String familyName, Single emSize) +35
ASP.pruebaFuente_aspx.OnLoad(EventArgs e) in
C:\Inetpub\wwwroot\webiberopuebla\pruebaFuente.asp x:8
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
The aspx file contains nothing more than:

protected override void OnLoad(EventArgs e)
Line 7: {
Line 8: Response.Write(new System.Drawing.Font("Arial",10).ToString());
Line 9: base.OnLoad(e);
Line 10: }
I've tried the same "new System.Drawing.Font("Arial",10).ToString()" on a
console application and it works well... if I delete Arial font from windows
font folder the error raises also in the console application, but if I
reinstall it, it works again

This happens with bold style, and some other fonts, like Times, but other
ones like verdana works...
I've tried deleting and installing Arial font, installing service pack to
framework 1.1, setting file permissions, but still doesn't work...

Anyone's help?

Nabani

Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.