derekthornton
asked on
Random fonts?
Alright. I'm generating Test Data for this OCR Thing, I have a program that writes random numbers and characters to a specified number of images in a sequential order. I'd like to add a bit more to it, anyone know how I can make something do Random Fonts?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can get all the fonts asociated with a specified graphics from the static member 'Families' of the FontFamily class
A.
A.
foreach (FontFamily ff in FontFamily.Families)
{
Console.WriteLine(ff.Name) ;
}
HTH
Smg.
{
Console.WriteLine(ff.Name)
}
HTH
Smg.
oops, sorry, hadn't seen your post when I submitted.
I think you can load all system fonts into array this way
private void button1_Click(object sender, System.EventArgs e)
{
string[] ArrFont;
InstalledFontCollection ifc = new InstalledFontCollection();
FontFamily[] ffs = ifc.Families;
//Font f;
foreach(FontFamily ff in ffs)
{
ArrFont[ff.ToString()];
}
}
private void button1_Click(object sender, System.EventArgs e)
{
string[] ArrFont;
InstalledFontCollection ifc = new InstalledFontCollection();
FontFamily[] ffs = ifc.Families;
//Font f;
foreach(FontFamily ff in ffs)
{
ArrFont[ff.ToString()];
}
}
ASKER
Wow.That worked very well too, TransBind.
Go Here
https://www.experts-exchange.com/questions/20823173/For-Advanced-Help-with-Number-Q-20823057.html
for some more Points, Trans.
Go Here
https://www.experts-exchange.com/questions/20823173/For-Advanced-Help-with-Number-Q-20823057.html
for some more Points, Trans.
ASKER