I am trying to use the OTF font installed on my system, but I failed:
FontFamily family = new FontFamily(name_for_my_font);
I tried to list all my fonts in the system, and indeed, I did not see the required font:
foreach (FontFamily font in System.Drawing.FontFamily.Families) { Console.WriteLine(font); }
But I can see my font in the Fonts folder. It has an OTF extension. Maybe this is a problem? I see only TTF fonts. But why? How can I access the OTF font from my program?
UPDATE: sorry, the problem is related to OTF , but not TTF ! I have amended my answer
c # fonts true-type-fonts
Michael z
source share