使字体斜体和大胆 [英] Make font italic and bold
本文介绍了使字体斜体和大胆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您应用多个字体样式的文字怎么办?
System.Drawing.Font MyFont =新System.Drawing.Font (
thisTempLabel.LabelFont,
((浮点)thisTempLabel.fontSize),
FontStyle.Bold + FontStyle.Italic,// +显然是行不通的,但我是什么意思做?
GraphicsUnit.Pixel
);
感谢您的帮助!
解决方案
System.Drawing.Font MyFont =新System.Drawing.Font(
thisTempLabel.LabelFont,
((浮点)thisTempLabel。 fontSize的),
FontStyle.Bold | FontStyle.Italic,// +显然是行不通的,但我是什么意思做
GraphicsUnit.Pixel
);?
也许你想使用OR运算符( |
)
How do you apply multiple font styles to text?
System.Drawing.Font MyFont = new System.Drawing.Font(
thisTempLabel.LabelFont,
((float)thisTempLabel.fontSize),
FontStyle.Bold + FontStyle.Italic, // + obviously doesn't work, but what am I meant to do?
GraphicsUnit.Pixel
);
Thanks for any help!
解决方案
System.Drawing.Font MyFont = new System.Drawing.Font(
thisTempLabel.LabelFont,
((float)thisTempLabel.fontSize),
FontStyle.Bold | FontStyle.Italic, // + obviously doesn't work, but what am I meant to do?
GraphicsUnit.Pixel
);
Maybe you wanted to use the OR operator (|
)
这篇关于使字体斜体和大胆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文