Table of Contents

Enum TextAntialiasMode

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll

Describes the antialiasing mode used for drawing text.

public enum TextAntialiasMode

Fields

Aliased = 3

Do not use antialiasing.

Cleartype = 1

Use ClearType antialiasing.

Default = 0

Use the system default. See Remarks.

Grayscale = 2

Use grayscale antialiasing.

Remarks

This enumeration is used with the SetTextAntialiasMode of an RenderTarget to specify how text and glyphs are antialiased.

By default, Direct2D renders text in ClearType mode. Factors that can downgrade the default quality to grayscale or aliased:

  • If the RenderingMode value is DWRITE_RENDERING_MODE_ALIASED , then the default text antialiasing mode is aliased. To change the DirectWrite rendering mode of an RenderTarget, use the ID2D1RenderTarget::SetTextRenderingParams method.
  • If the RenderingMode value is DWRITE_RENDERING_MODE_OUTLINE, then the default text antialiasing mode is grayscale.
  • If the render target has an alpha channel and is not set to D2D1_ALPHA_MODE_IGNORE, then the default text antialiasing mode is grayscale.
  • If ID2D1RenderTarget::PushLayer is called without D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE (and the corresponding PopLayer has not been called yet), then the default text antialiasing mode is grayscale.