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!
To bold the text in HTML, use either the strong tag or the b (bold) tag. Browsers will bold the text inside both of these tags the same, but the strong tag indicates that the text is of particular importance or urgency. You can also bold text with the CSS font-weight property set to “bold.”
</i> tag or <em>… </em> tag. Both the tags have the same functioning, but <em> tag is a phrase tag, which renders as emphasized text.
System.Drawing.Font MyFont = new System.Drawing.Font( thisTempLabel.LabelFont, ((float)thisTempLabel.fontSize), FontStyle.Bold | FontStyle.Italic, GraphicsUnit.Pixel );
Maybe you wanted to use the OR operator (|
)
FontStyle
is a flag enum and therefore you can set multiple styles by:
FontStyle.Bold | FontStyle.Italic
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With