S
Sudip_inn
Guest
I used font converter to parse my fonts details from string but failed
i try this way where i used FontConverter but still no luck
here is my code
FontDialog fontDlg = new FontDialog();
if (fontDlg.ShowDialog() == DialogResult.OK)
{
string strfont = fontDlg.Font.FontFamily.Name + ":" + fontDlg.Font.Size + ":" + (int)fontDlg.Font.Style;
var fC = new FontConverter();
Font ff = fC.ConvertFromString(strfont) as Font;
label1.Font = ff;
}
i saw font dialog return right info but when i pass those font detail as string to font converted then it always return "Microsoft Sans Serif" Size=8.25
not clear why font converted could not parse my font properly but give no error. font converted always return same font details which is "Microsoft Sans Serif" Size=8.25
where is the wrong in my code ?
please help. thanks
Continue reading...
i try this way where i used FontConverter but still no luck
here is my code
FontDialog fontDlg = new FontDialog();
if (fontDlg.ShowDialog() == DialogResult.OK)
{
string strfont = fontDlg.Font.FontFamily.Name + ":" + fontDlg.Font.Size + ":" + (int)fontDlg.Font.Style;
var fC = new FontConverter();
Font ff = fC.ConvertFromString(strfont) as Font;
label1.Font = ff;
}
i saw font dialog return right info but when i pass those font detail as string to font converted then it always return "Microsoft Sans Serif" Size=8.25
not clear why font converted could not parse my font properly but give no error. font converted always return same font details which is "Microsoft Sans Serif" Size=8.25
where is the wrong in my code ?
please help. thanks
Continue reading...