If you have a reference to System.Windows.Forms, try using the TextRenderer class. There is a static method (MeasureText) which takes the string and font and returns the size. MSDN Link
More Related Contents:
- Graphics.DrawString vs TextRenderer.DrawText?Which can Deliver Better Quality
- Drawing a Long String on to a Bitmap results in Drawing Issues
- Image.Save(..) throws a GDI+ exception because the memory stream is closed
- Get last 10 lines of very large text file > 10GB
- How to generate an image from text on fly at runtime
- How can I Convert HTML to Text in C#?
- Properly draw text using GraphicsPath
- How to include external font in WPF application without installing it
- A Generic error occurred in GDI+ in Bitmap.Save method
- Double Buffering when not drawing in OnPaint(): why doesn’t it work?
- How to find reason for Generic GDI+ error when saving an image?
- Creating Custom Picturebox with Draggable and Resizable Selection Window
- How to find the actual printable area? (PrintDocument)
- Get supported characters of a font – in C#
- Show Transparent Loading Spinner above other Controls
- Flip the GraphicsPath that draws the text/string
- How to highlight wrapped text in a control using the graphics?
- How do I embed my own fonts in a WinForms app?
- ReadAllLines for a Stream object?
- SetPixel is too slow. Is there a faster way to draw to bitmap?
- JPEG 2000 support in C#.NET
- GDI+ / C#: How to save an image as EMF?
- Extracting text from PDFs in C# [closed]
- What quality level does Image.Save() use for jpeg files?
- Resize text size of a label when the text gets longer than the label size?
- How do I rotate a label in C#? [duplicate]
- How to eliminate flicker in Windows.Forms custom control when scrolling?
- Winforms: SuspendLayout/ResumeLayout is not enough?
- Region.IsVisible(PointF) has very slow performance for large floating point values
- How do I Embed a font with my C# application? (using Visual Studio 2005)