tags:

views:

88

answers:

0

There is font file in Windows folder (Font name is Lucida Sans). I try to load that font using following code but I can't create the font object

        PrivateFontCollection c = new PrivateFontCollection();
        c.AddFontFile("c:\\windows\\LSANSDI.TTF");
        FontFamily fa = c.Families[0]; //This line succeeds
        Font fn = new Font(fa, 10);  //I get Exception here and it says that it does not support Regular style

Even if u check all styles using fa.IsStyleAvailable function, I get no style available. What is the use of creating such ttf file which cannot be loaded. How can I use that font? But I can see that font has all styles available when I use in MS Word Can anyone provide the solution?