试图在C#中书写文字,以便它跨越必要的宽度(约合)。
撰写文稿时,需要具体说明高点。 因此,我需要知道,什么高点会使它写上所期望的篇幅。
Font myFont = new Font(FontFamily.GenericSansSerif, unknown);
gc.DrawString(LabelText, myFont, gBrush, 0, 0);
Ive found the following, but it requires FONT, which requires height. Which defeats the whole point?
gc.MeasureString(LabelText, new Font(FontFamily.GenericSansSerif, 12), length);
How would I determine the required height to make for example "I am a String" stretch 50px.