윈도우

cleartype tuning

2019. 10. 22. 22:30

These are found in several places in the Registry:

  • FontSmoothing
  • FontSmoothingGamma
  • FontSmoothingOrientation
  • FontSmoothingType

For example HKEY_CURRENT_USER\Control Panel\Desktop:

For FontSmoothing key

  • Value "0" or "1": disables font smoothing
  • Value "2": enables font smoothing

For FontSmoothingType key

  • Value "0" or "1": switch to gray font smoothing
  • Value "2": switch to colored font smoothing

For FontSmoothingGamma key

  • Value between 0 to 2200 decimal: Intensity of color. 0=dark, 2200=light

For FontSmoothingOrientation key

  • Value "0": CRT (Value "1" and "2" are LCD)
  • Value "1": RGB format (red, green, blue), normal
  • Value "2": BGR format (blue, green, red)

Registry Settings

WPF specifies four registry settings for controlling ClearType features:

SettingDescription

ClearType level Describes the level of ClearType color clarity.
Gamma level Describes the level of the pixel color component for a display device.
Pixel structure Describes the arrangement of pixels for a display device.
Text contrast level Describes the level of contrast for displayed text.

These settings can be accessed by an external configuration utility that knows how to reference the identified WPFClearType registry settings. These settings can also be created or modified by accessing the values directly by using the Windows Registry Editor.

If the WPFClearType registry settings are not set (which is the default state), the WPF application queries the Windows system parameters information for font smoothing settings.

 Note

For information on enumerating display device names, see the SystemParametersInfoWin32 function.

 

ClearType Level

The ClearType level allows you to adjust the rendering of text based on the color sensitivity and perception of an individual. For some individuals, the rendering of text that uses ClearType at its highest level does not produce the best reading experience.

The ClearType level is an integer value that ranges from 0 to 100. The default level is 100, which means ClearType uses the maximum capability of the color stripe elements of the display device. However, a ClearType level of 0 renders text as gray scale. By setting the ClearType level somewhere between 0 and 100, you can create an intermediate level that is suitable to an individual's color sensitivity.

Registry Setting

The registry setting location for the ClearType level is an individual user setting that corresponds to a specific display device name:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\<displayName>

For each display device name for a user, a ClearTypeLevel DWORD value is defined. The following screenshot shows the Registry Editor setting for the ClearType level.

 Note

WPF applications render text in one of either two modes, with and without ClearType. When text is rendered without ClearType, it is referred to as gray scale rendering.

 

Gamma Level

The gamma level refers to the nonlinear relationship between a pixel value and luminance. The gamma level setting should correspond to the physical characteristics of the display device; otherwise, distortions in rendered output may occur. For example, text may appear too wide or too narrow, or color fringes may appear on the edges of vertical stems of glyphs.

The gamma level is an integer value that ranges from 1000 to 2200. The default level is 1900.

Registry Setting

The registry setting location for the gamma level is a local machine setting that corresponds to a specific display device name:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Avalon.Graphics\<displayName>

For each display device name for a user, a GammaLevel DWORD value is defined. The following screenshot shows the Registry Editor setting for the gamma level.

 

Pixel Structure

The pixel structure describes the type of pixels that make up a display device. The pixel structure is defined as one of three types:

TypeValueDescription

Flat 0 The display device has no pixel structure. This means that light sources for each color are spread equally on the pixel area—this is referred to as gray scale rendering. This is how a standard display device works. ClearType is never applied to the rendered text.
RGB 1 The display device has pixels that consist of three stripes in the following order: red, green, and blue. ClearType is applied to the rendered text.
BGR 2 The display device has pixels that consist of three stripes in the following order: blue, green, and red. ClearType is applied to the rendered text. Notice how the order is inverted from the RGB type.

The pixel structure corresponds to an integer value that ranges from 0 to 2. The default level is 0, which represents a flat pixel structure.

 Note

For information on enumerating display device names, see the EnumDisplayDevicesWin32 function.

Registry Setting

The registry setting location for the pixel structure is a local machine setting that corresponds to a specific display device name:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Avalon.Graphics\<displayName>

For each display device name for a user, a PixelStructure DWORD value is defined. The following screenshot shows the Registry Editor setting for the pixel structure.

 

Text Contrast Level

The text contrast level allows you to adjust the rendering of text based on the stem widths of glyphs. The text contrast level is an integer value that ranges from 0 to 6—the larger the integer value, the wider the stem. The default level is 1.

Registry Setting

The registry setting location for the text contrast level is an individual user setting that corresponds to a specific display device name:

HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\<displayName>

For each display device name for a user, a TextContrastLevel DWORD value is defined. The following screenshot shows the Registry Editor setting for the text contrast level.