X
xiaomitao
Hi all,
I am having this error, Font 'Aharoni' does not support style
'Regular'.
In my codes, i try to catch the exception but seems like it is not
catching it. Any idea why?
How can i set my style to no style too?
Appreciate any help
try
{
switch (ss.Style)
{
case 1:
style = FontStyle.Bold;
break;
case 2:
style = FontStyle.Italic;
break;
case 3:
style = FontStyle.Italic |
FontStyle.Bold;
break;
default:
style = FontStyle.Regular;
break;
}
}
catch (Exception ex)
{
Console.Error.WriteLine("No style used for
text.\n{0}", ex.Message);
//style=default; //set to no style
}
I am having this error, Font 'Aharoni' does not support style
'Regular'.
In my codes, i try to catch the exception but seems like it is not
catching it. Any idea why?
How can i set my style to no style too?
Appreciate any help
try
{
switch (ss.Style)
{
case 1:
style = FontStyle.Bold;
break;
case 2:
style = FontStyle.Italic;
break;
case 3:
style = FontStyle.Italic |
FontStyle.Bold;
break;
default:
style = FontStyle.Regular;
break;
}
}
catch (Exception ex)
{
Console.Error.WriteLine("No style used for
text.\n{0}", ex.Message);
//style=default; //set to no style
}