1

I followed this answer for my project, but failed to start because of the file not found error.

A first chance exception of type 'System.IO.FileNotFoundException' occurred in System.Drawing.dll

Additional information: File not found.

Here is my code:

PrivateFontCollection modernFont = new PrivateFontCollection();
            modernFont.AddFontFile("digital.ttf");
            label5.Font = new Font(modernFont.Families[0], 40);

The font file is located right in the namespace directory, is there something wrong with the the file path or else?

0 Answers0