2011-11-24 67 views
1

我正在使用Graphics.DrawString在框中绘制一个单词。这些盒子有一个预先定义的最小宽度,足以容纳这个词。Can Graphics.DrawString可以在不同的计算机上给出不同的宽度结果吗?

代码:

   RectangleF behaviorRect = new RectangleF(bodyRect.Left + bodyRect.Width/8, 
             bodyRect.Top + bodyRect.Height/8, 
             bodyRect.Width * 3/4, 
             bodyRect.Height * 3/4); 
       g.DrawRectangle(bluePen, bodyRect.Left + bodyRect.Width/8, 
             bodyRect.Top + bodyRect.Height/8, 
             bodyRect.Width * 3/4, 
             bodyRect.Height * 3/4); 
       g.DrawString("Behavior", textFont, blueBrush, behaviorRect, centerFormat); 

在每个Windows系统该应用已经尝试了,它工作正常。但一个人的Win 7笔记本电脑正在包装文本。有关为什么会这样做的任何想法?字体是Verdana,它似乎在图像中使用了正确的字体。

Word is wrapping on one guy's computer

回答

1

明白了。有问题的人在控制面板中将字体设置为+ 25%的大小。所以我的问题的简短答案是,“是”。

相关问题