Make font italic and bold

后端 未结 5 715
借酒劲吻你
借酒劲吻你 2020-12-05 22:59

How do you apply multiple font styles to text?

System.Drawing.Font MyFont = new System.Drawing.Font(
    thisTempLabel.LabelFont,
    ((float)thisTempLabel.f         


        
5条回答
  •  执念已碎
    2020-12-05 23:51

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

提交回复
热议问题