Im trying to write text in C# so that it spans the required width (approximately).
To write text you need to specify the height. So I need to know what height would make it write to the desired length.
Font myFont = new Font(FontFamily.GenericSansSerif, unknown);
gc.DrawString(LabelText, myFont, gBrush, 0, 0);
gc.MeasureString(LabelText, new Font(FontFamily.GenericSansSerif, 12), length);
There is an example on the site switchonthecode (note - archived version). They provide a method that takes a minimum and maximum font size along with the size of your area. It tries the minimum size and from there determines the ratio of the font and then determines the best size for you.