GDI+ and font sizes

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hi

asp.net 3.5

I'm playing arround with GDI+ and DrawString.

One thing that I feel is strange is how small the fontsizes are.
I'm using ths font:
Font drawFont = new Font("Verdana", 4);

When when displayed on the image shows like a fontsize 10...

Why are the fontsize so small?, why cannot I just set it to 10? (If I set it
to 10 now the text will be to large)

any ideas?
 
Hi

asp.net 3.5

I'm playing arround with GDI+ and DrawString.

One thing that I feel is strange is how small the fontsizes are.
I'm using ths font:
Font drawFont = new Font("Verdana", 4);

When when displayed on the image shows like a fontsize 10...

Why are the fontsize so small?, why cannot I just set it to 10? (If I setit
to 10 now the text will be to large)

any ideas?

--------------------------------------------------------------------------- --
Less Spam Better enjoyable experience
Visit : news://spacesst.com

The font size used "points", but not pixels.
http://msdn.microsoft.com/en-us/library/164w6x6z.aspx

The Font class has another constructor where you may specify units
try to call

Font drawFont = new Font("Verdana", 10, GraphicsUnit.Pixels);

to see if it helps

More at: http://msdn.microsoft.com/en-us/library/ms141986.aspx
 
Back
Top