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

  • Thread starter Thread starter Nabani Silva
  • Start date Start date
N

Nabani Silva

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.aspx: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
 
Back
Top