N
NeilL
I have a C# application that does something simple like the following
Font newFont = new Font( "Albertus Extra Bold (W1)", 8.5f, FontStyle.Regular);
that throws the following exception:
System.ArgumentException: Font 'Albertus Extra Bold (W1)' does not support
style 'Regular'.
at System.Drawing.Font.CreateNativeFont()
at System.Drawing.Font.Initialize(FontFamily family, Single emSize,
FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize,
FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle
style)
at TastingMaster.TastingInvitationsForm.GetCurrentFontInfo() in
D:\TastingMaster\Source\TastingMaster\TastingMaster\Tastings\TastingInvitationsForm.cs:line 890
I've looked around and all the posts I've seen seem to say that the font is
corrupted. Since I'm able to use the same font and (I think) with the same
settings it would appear as though the font is not corrupted.
Does anyone have a hint as to what might be the issue here. As a workaround,
is there a way, given the font name, to determine if a particular style is
supported or not?
Thanks
Font newFont = new Font( "Albertus Extra Bold (W1)", 8.5f, FontStyle.Regular);
that throws the following exception:
System.ArgumentException: Font 'Albertus Extra Bold (W1)' does not support
style 'Regular'.
at System.Drawing.Font.CreateNativeFont()
at System.Drawing.Font.Initialize(FontFamily family, Single emSize,
FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize,
FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle
style)
at TastingMaster.TastingInvitationsForm.GetCurrentFontInfo() in
D:\TastingMaster\Source\TastingMaster\TastingMaster\Tastings\TastingInvitationsForm.cs:line 890
I've looked around and all the posts I've seen seem to say that the font is
corrupted. Since I'm able to use the same font and (I think) with the same
settings it would appear as though the font is not corrupted.
Does anyone have a hint as to what might be the issue here. As a workaround,
is there a way, given the font name, to determine if a particular style is
supported or not?
Thanks