TextRenderingHint enumeration

Applies to: desktop apps only

The TextRenderingHint enumeration specifies the process used to render text. The process affects the quality of the text.

Syntax

typedef enum  {
  TextRenderingHintSystemDefault              = 0,
  TextRenderingHintSingleBitPerPixelGridFit   = 1,
  TextRenderingHintSingleBitPerPixel          = 2,
  TextRenderingHintAntiAliasGridFit           = 3,
  TextRenderingHintAntiAlias                  = 4,
  TextRenderingHintClearTypeGridFit           = 5 
} TextRenderingHint;

Constants

TextRenderingHintSystemDefault

Specifies that a character is drawn using the currently selected system font smoothing mode (also called a rendering hint).

TextRenderingHintSingleBitPerPixelGridFit

Specifies that a character is drawn using its glyph bitmap and hinting to improve character appearance on stems and curvature.

TextRenderingHintSingleBitPerPixel

Specifies that a character is drawn using its glyph bitmap and no hinting. This results in better performance at the expense of quality.

TextRenderingHintAntiAliasGridFit

Specifies that a character is drawn using its antialiased glyph bitmap and hinting. This results in much better quality due to antialiasing at a higher performance cost.

TextRenderingHintAntiAlias

Specifies that a character is drawn using its antialiased glyph bitmap and no hinting. Stem width differences may be noticeable because hinting is turned off.

TextRenderingHintClearTypeGridFit

Specifies that a character is drawn using its glyph ClearType bitmap and hinting. This type of text rendering cannot be used along with CompositingModeSourceCopy.

Windows XP and Windows Server 2003 only: ClearType rendering is supported only on Windows XP and Windows Server 2003. Therefore, TextRenderingHintClearTypeGridFit is ignored on other operating systems even though GDI+ is supported on those operating systems.

Remarks

The quality associated with each process varies according to the circumstances. TextRenderingHintClearTypeGridFit provides the best quality for most LCD monitors and relatively small font sizes. TextRenderingHintAntiAlias provides the best quality for rotated text. Generally, a process that produces higher quality text is slower than a process that produces lower quality text.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusenums.h (include Gdiplus.h)

See also

CompositingMode
DrawString Methods
Graphics::GetTextRenderingHint
Graphics::SetTextRenderingHint
Antialiasing with Text

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show: