O'Reilly logo

Windows Forms 2.0 Programming by Michael Weinhardt, Chris Sells

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Drawing Text

PROBABLY THE MOST USEFUL THING to draw in any application is text. Sometimes, you draw text yourself and, sometimes, text is drawn for you by the controls you're using. No matter who does the drawing, you can often specify the font, and that's what the first part of this chapter is about. The second part deals with drawing text yourself into a Graphics object, into a GraphicsPath object, or via the TextRenderer.

Fonts

A font is an instance of the System.Drawing.Font class, which for each font includes a family, a style, and a size. And, as you might expect, a font family is an instance of the FontFamily class, which encapsulates a group of typefaces that differ only in style. A typeface is a named collection of drawing strokes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required