-
Only TrueType Fonts
hi @ all!
I use a FontDialog to select fonts...but when I select a font (that is not true-type) then my program brakes with this error message:
An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll
Additional information: Only TrueType fonts are supported, and this is not a TrueType font.
please help me!
-
I think you are going to either find a True Type version of the font or use a different font.
-
yes, but I need it for program configurations.
the user who uses my program can select a font, but what if he select a font who isn't TrueType!?
and my question is: how can I display only the "TrueType"-fonts in the FontDialog
...or is there any other way to fix this error?
-
Sorry I think I misunderstood the question. I guess you must be selecting an OpenType Font which are also allowed in .NEt (but I guess not for your drawing operation). The easiest is to just catch the error and have them pick another font or cancel. Just use a Try..Catch where you use the font.