GDI+ and font sizes

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?
 
G

Guest

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?

--------------------------------------------------------------------------- --
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top