Here is some C# OnPaint code that will show you how to use FontFamily to
get a list of fonts:
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
int i, nCount;
SolidBrush b = new SolidBrush( Color.Black );
int x = 0, y = 0;
nCount = FontFamily.Families.Length;
for(i=0;i<nCount;i++)
{
FontStyle fs = FontStyle.Regular;
Font f;
String StylesDesc = "";
if (FontFamily.Families[i].IsStyleAvailable(FontStyle.Regular))
StylesDesc += "Regular ";
else fs = FontStyle.Italic;
if (FontFamily.Families[i].IsStyleAvailable(FontStyle.Italic))
StylesDesc += "Italic ";
else fs = FontStyle.Bold;
if (FontFamily.Families[i].IsStyleAvailable(FontStyle.Bold))
StylesDesc += "Bold ";
if (FontFamily.Families[i].IsStyleAvailable(FontStyle.Underline))
StylesDesc += "Underline ";
if (FontFamily.Families[i].IsStyleAvailable(FontStyle.Strikeout))
StylesDesc += "Strikeout ";
if (StylesDesc.Length > 0)
StylesDesc = StylesDesc.Substring(0,StylesDesc.Length-1);
f = new Font( FontFamily.Families[i].Name, 12, fs);
String s = FontFamily.Families[i].Name + " " + StylesDesc;
e.Graphics.DrawString( s, f, b, x, y );
y += f.Height;
}
}
--
Tamir Khason
You want dot.NET? Just ask:
"Please,
www.dotnet.us "
"Sachin" <sa*****@softbridge-s.com> wrote in message
news:9B**********************************@microsof t.com...
How to get the list of installed fonts corresponding to any perticular
charactor set? eg. if I want to get Japanese supporting font list
(corresponding to char set Shift_JIS), how to do it? please guide
--
sachin