T
Tony Johansson
Hello!
Here I have a piece of code where code marked with 1 and 2 give identical
text but code marked with 3
doesn't give the same size of the text. Even if I change code marked with 3
from 12pt to 33pt the same size of text is displayed.
Have I missed something here.
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = this.CreateGraphics();
// 1 Font f = new Font("Arial", 12, FontStyle.Bold);
// 2 FontFamily ff = new FontFamily("Arial");
// 2 Font f = new Font(ff, 12, FontStyle.Bold);
// 3 FontConverter converter = new FontConverter();
// 3 Font f = (Font)converter.ConvertFromString("Arial, 12pt,
FontStyle.Bold");
g.DrawString("Hello, World!", f, Brushes.Blue, 10, 10);
}
//Tony
Here I have a piece of code where code marked with 1 and 2 give identical
text but code marked with 3
doesn't give the same size of the text. Even if I change code marked with 3
from 12pt to 33pt the same size of text is displayed.
Have I missed something here.
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = this.CreateGraphics();
// 1 Font f = new Font("Arial", 12, FontStyle.Bold);
// 2 FontFamily ff = new FontFamily("Arial");
// 2 Font f = new Font(ff, 12, FontStyle.Bold);
// 3 FontConverter converter = new FontConverter();
// 3 Font f = (Font)converter.ConvertFromString("Arial, 12pt,
FontStyle.Bold");
g.DrawString("Hello, World!", f, Brushes.Blue, 10, 10);
}
//Tony