ClearType 概觀ClearType Overview

本主題提供在中Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)找到的 Microsoft ClearType 技術總覽。This topic provides an overview of the Microsoft ClearType technology found in the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF).

技術概觀Technology Overview

ClearType 是由 Microsoft 開發的軟體技術, 可改善現有 Lcd (液晶顯示器) 的文字可讀性, 例如膝上型電腦螢幕、Pocket PC 螢幕和平面監視器。ClearType is a software technology developed by Microsoft that improves the readability of text on existing LCDs (Liquid Crystal Displays), such as laptop screens, Pocket PC screens and flat panel monitors. ClearType 的運作方式是存取 LCD 螢幕每個圖元內的個別垂直色彩 stripe 元素。ClearType works by accessing the individual vertical color stripe elements in every pixel of an LCD screen. 在 ClearType 之前, 電腦可以顯示的最小詳細資料層級是單一圖元, 但在 LCD 監視器上執行 ClearType 時, 我們現在可以將文字的功能顯示為寬度圖元的小部分。Before ClearType, the smallest level of detail that a computer could display was a single pixel, but with ClearType running on an LCD monitor, we can now display features of text as small as a fraction of a pixel in width. 額外的解析度可提高文字顯示細節的解析度,即使經過長時間也很容易閱讀。The extra resolution increases the sharpness of the tiny details in text display, making it much easier to read over long durations.

Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)提供的 cleartype 是最新一代的 cleartype, 對 Microsoft Windows 圖形裝置介面 (GDI) 中找到的版本有數項改善。The ClearType available in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) is the latest generation of ClearType which has several improvements over version found in Microsoft Windows Graphics Device Interface (GDI).

子像素定位Sub-pixel Positioning

先前版本的 ClearType 有一項顯著的改進, 就是使用子圖元定位。A significant improvement over the previous version of ClearType is the use of sub-pixel positioning. 不同于 GDI 中找到的 cleartype 實作為, 中Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)找到的 cleartype 允許在圖元內啟動圖像, 而不只是圖元的開始界限。Unlike the ClearType implementation found in GDI, the ClearType found in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) allows glyphs to start within the pixel and not just the beginning boundary of the pixel. 因為定位字符有此額外的解析度,所以字符的間距和比例更精確且一致。Because of this extra resolution in positioning glyphs, the spacing and proportions of the glyphs is more precise and consistent.

下列兩例示範使用子像素定位時,字符如何能在任何子像素界限上開始。The following two examples show how glyphs may begin on any sub-pixel boundary when sub-pixel positioning is used. 左側的範例是使用較早版本的 ClearType 轉譯器來轉譯, 而此轉譯器不會採用子圖元定位。The example on the left is rendered using the earlier version of the ClearType renderer, which did not employ sub-pixel positioning. 右側的範例是使用新版本的 ClearType 轉譯器 (使用子圖元定位) 來呈現。The example on the right is rendered using the new version of the ClearType renderer, using sub-pixel positioning. 請注意右側映像中每個 el 的轉譯方式都略有不同,因為它們每一個都在不同的子像素上開始。Note how each e and l in the right-hand image is rendered slightly differently because each starts on a different sub-pixel. 在螢幕上檢視正常大小的文字時,因為字符映像的高對比,所以這項差異不是很明顯。When viewing the text at its normal size on the screen, this difference is not noticeable because of the high contrast of the glyph image. 這只有在 ClearType 中納入複雜的色彩篩選時才可行。This is only possible because of sophisticated color filtering that is incorporated in ClearType.

以兩個 ClearType 版本顯示的文字Text displayed with two versions of ClearType
以新舊版 ClearType 顯示的文字Text displayed with earlier and later versions of ClearType

下列兩個範例會比較舊版 ClearType 轉譯器與新版本的 ClearType 轉譯器的輸出。The following two examples compare output from the earlier ClearType renderer with the new version of the ClearType renderer. 顯示在右側的子像素定位,可大幅提升畫面中的類型間距,尤其是子像素和完整像素在字符寬度有明顯比例差異的小尺寸狀況。The subpixel positioning, shown on the right, greatly improves the spacing of type on screen, especially at small sizes where the difference between a sub-pixel and a whole pixel represents a significant proportion of glyph width. 請注意,第二個映像中的字母間距更勻稱。Note that spacing between the letters is more even in the second image. 文字螢幕整體外觀的子圖元定位的累計優點會大幅增加, 並代表 ClearType 技術的重大進化。The cumulative benefit of sub-pixel positioning to the overall appearance of a screen of text is greatly increased, and represents a significant evolution in ClearType technology.

以舊版 ClearType 顯示的文字Text displayed with earlier version of ClearType
以新舊版 ClearType 顯示的文字Text with earlier and later versions of ClearType

Y 方向消除鋸齒Y-Direction Antialiasing

Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ClearType 的另一項改進是 y 方向消除鋸齒。Another improvement of ClearType in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) is y-direction anti-aliasing. GDI 中沒有 y 方向消除鋸齒的 ClearType 會在 X 軸上提供更好的解析度, 而不是 y 軸。The ClearType in GDI without y-direction anti-aliasing provides better resolution on the x-axis but not the y-axis. 微曲部分頂端和底端的鋸齒狀邊緣會降低其可讀性。On the tops and bottoms of shallow curves, the jagged edges detract from its readability.

下例顯示不使用 Y 方向消除鋸齒的效果。The following example shows the effect of having no y-direction antialiasing. 在此情況下,字母上方與下方的鋸齒狀邊緣很明顯。In this case, the jagged edges on the top and bottom of the letter are apparent.

在淺層曲線上具有不規則邊緣的文字Text with jagged edges on shallow curves
微曲部分產生鋸齒狀邊緣的文字Text with jagged edges on shallow curves

Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)的 ClearType 提供 y 方向層級的消除鋸齒功能, 以平滑所有不規則邊緣。ClearType in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) provides antialiasing on the y-direction level to smooth out any jagged edges. 這對改善東亞語言的可讀性特別重要,因為表意字元的水平和垂直微曲部分比重幾乎相同。This is particularly important for improving the readability of East Asian languages where ideographs have an almost equal amount of horizontal and vertical shallow curves.

下例顯示使用 Y 方向消除鋸齒的效果。The following example shows the effect of y-direction antialiasing. 在此情況下,字母的上方與下方會顯示平滑的曲線。In this case, the top and bottom of the letter show a smooth curve.

以 ClearType y-方向消除-鋸齒的文字Text with ClearType y-direction anti-aliasing
以 ClearType Y 方向消除鋸齒功能顯示的文字Text with ClearType y-direction antialiasing

硬體加速Hardware Acceleration

Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)的 ClearType 可以利用硬體加速以獲得更好的效能, 並減少 CPU 負載和系統記憶體需求。ClearType in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) can take advantage of hardware acceleration for better performance and to reduce CPU load and system memory requirements. 透過使用圖形配接器的圖元著色器和視訊記憶體, ClearType 可提供更快速的文字呈現, 特別是使用動畫時。By using the pixel shaders and video memory of a graphics card, ClearType provides faster rendering of text, particularly when animation is used.

Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)的 cleartype 不會修改全系統的 ClearType 設定。ClearType in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) does not modify the system-wide ClearType settings. 在 Windows 中停用Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ClearType 會將消除鋸齒設定為灰階模式。Disabling ClearType in Windows sets Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) antialiasing to grayscale mode. 此外, 中Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)的 cleartype 不會修改cleartype 調諧器 PowerToy的設定。In addition, ClearType in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) does not modify the settings of the ClearType Tuner PowerToy.

Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 架構設計決策之一,就是解析度獨立的版面配置能更有效地支援日益普及的高解析度 DPI 監視器。One of the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) architectural design decisions is to have resolution independent layout better support higher resolution DPI monitors, which are becoming more widespread. 這樣做的後果是 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 不支援別名文字轉譯或某些東亞文字字型的點陣圖,因為它們兩個都是解析度相依。This has the consequence of Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) not supporting aliased text rendering or the bitmaps in some East Asian fonts because they are both resolution dependent.

詳細資訊Further Information

ClearType 資訊ClearType Information

ClearType Tuner PowerToyClearType Tuner PowerToy

另請參閱See also