使字体斜体和粗体 [英] Make font italic and bold
本文介绍了使字体斜体和粗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将多种字体样式应用于文本?
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
);
感谢您的帮助!
推荐答案
System.Drawing.Font MyFont = new System.Drawing.Font(
thisTempLabel.LabelFont,
((float)thisTempLabel.fontSize),
FontStyle.Bold | FontStyle.Italic,
GraphicsUnit.Pixel
);
也许您想使用 OR 运算符 (|
)
Maybe you wanted to use the OR operator (|
)
这篇关于使字体斜体和粗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文