ARTICLE

Attribute or Styles in GDI+

Posted by Dinesh Beniwal Articles | GDI+ in VB.NET February 04, 2010
In this article I will explain about Attribute or Styles in GDI+.
 
Reader Level:

In typography, the combination of a typeface name (sometimes referred to as a face name) and a point size (sometimes referred to as the em size) represents a font. A typeface name is a combination of font family and the font style (also referred to as font attributes). Each typeface belongs to a font family such as Times News Roman, Arial, or Courier .The Courier family, for example, includes the typeface Courier New, Courier New Bold, and Courier New Italic.

Generally, when we talk about a font, we are referring to more than just one component. A typical font is combination of three components: font family, font style and font size. Figure 5.9 shows components of a typical font.

A complete example of font is "Times New Roman, size 10, Bold/Italic". Here the font family is Times New Roman, the size is 10-point, and the style is both bold and italic.

Font Height and Line Spacing

The size of a font is expressed in points, where a point is usually 1/72(0.013888) inch .The measurement of the size of a font is a little confusing because characters have different heights. If all alphabetic characters had the same height, it would be easier to calculate the size of font. For example, consider the characters b and q. Technically they have the same height (or size), but they are situated in different locations along a straight line. In other words, the character's size may not be the same as point size, also called em size. The font size is related to the line spacing. We will discuss line spacing in more detail in section 5.3.4.

Figure 5.9.gif

FIGURE 5.9: Font Components

Conclusion

Hope the article would have helped you in understanding Attribute or Styles in GDI+. Read other articles on GDI+ on the website.

Login to add your contents and source code to this article
share this article :
post comment
 
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Team Foundation Server Hosting
Become a Sponsor