Fonts AddFontFile

  • Thread starter Thread starter daveL
  • Start date Start date
D

daveL

Im Trying to Add a Font to PrivateFontCollection

it keeps crashing on File Not Found Exception

ive Tried full path and without full path

File.Exists returns true.... I dont understand this

sample below

Tia

dave

PrivateFontCollection MyFonts = new PrivateFontCollection();

MyFonts.AddFontFile("vt100.fon"); //Hvtermw.ttf");

aFamilies = MyFonts.Families;

for (int x = 0; x < aFamilies.GetLength(0); x++)

{

Console.WriteLine(aFamilies[x]);

Console.ReadKey();







}
 
Im Trying to Add a Font to PrivateFontCollection

it keeps crashing on File Not Found Exception

ive Tried full path and without full path

File.Exists returns true.... I dont understand this

The docs state that FileNotFoundException can also occur if your font
file exists, but its format is not supported - maybe that is the
problem?

Regards,
Gilles.
 
Back
Top