<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>WPF Text Blog : text rendering</title><link>http://blogs.msdn.com/text/archive/tags/text+rendering/default.aspx</link><description>Tags: text rendering</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>WPF Text Measurement Units</title><link>http://blogs.msdn.com/text/archive/2009/12/11/wpf-text-measurement-units.aspx</link><pubDate>Fri, 11 Dec 2009 23:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9935956</guid><dc:creator>text</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/text/comments/9935956.aspx</comments><wfw:commentRss>http://blogs.msdn.com/text/commentrss.aspx?PostID=9935956</wfw:commentRss><description>&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;FONT size=3&gt;The WPF text team has seen some people get confused about what units WPF uses when measuring text. Samer, a developer on the WPF text team, and I have created this post to try and shed some light on this subject. The first part of this post is very straight forward, whereas the end will only be useful for those of you who are extensively using WPF text APIs.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;FONT size=3&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;General Units&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;EM&gt;WPF &lt;/EM&gt;supports multiple units for text measurement. The units that can be used are “px” (device independent pixels),&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;“in" (inches), "cm" (centimeters), "pt" (points). If you do not specify the unit of measurement, WPF defaults to px.&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 10pt"&gt;TextBlock&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 10pt"&gt; FontSize&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;="24"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 10pt"&gt;Hello World&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 10pt"&gt;TextBlock&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24px_2.png" mce_href="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24px_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=24px border=0 alt=24px src="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24px_thumb.png" width=182 height=33 mce_src="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24px_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;To force WPF to use a different unit of measurement, just append the unit abbreviation to the FontSize.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 10pt"&gt;TextBlock&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 10pt"&gt; FontSize&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;="24pt"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 10pt"&gt;Hello World&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 10pt"&gt;TextBlock&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24pt_2.png" mce_href="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24pt_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=24pt border=0 alt=24pt src="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24pt_thumb.png" width=218 height=39 mce_src="http://blogs.msdn.com/blogfiles/text/WindowsLiveWriter/WPFTextMeasurementUnits_DE1F/24pt_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;Device Independent Pixels &amp;amp; Physical Pixels&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;In accordance with WPF’s resolution independence, the framework measures objects in d&lt;SPAN style="mso-bidi-font-style: italic"&gt;evice independent pixels. These device independent pixels can have different sizes than physical pixels&lt;/SPAN&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;1 &lt;SPAN style="mso-bidi-font-style: italic"&gt;device independent pixel&lt;/SPAN&gt; = 1/96 inch.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;1 physical pixel = 1/DPI (dependent on the &lt;/FONT&gt;&lt;A href="http://windows.microsoft.com/en-us/windows7/Make-the-text-on-your-screen-larger-or-smaller"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;system DPI&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-style: italic"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-style: italic"&gt;Default system settings usually choose a DPI of 96 so these two types of pixels come out to be the same size.&lt;/SPAN&gt; If this is not the case, it is easy to convert between the two types of pixels. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;physical pixels = DPI/96 * device independent pixels&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;device independent pixels = 96/DPI * physical pixels &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Notice that as the DPI increases, so does the number of physical pixels which compose one device independent pixel. Hence, objects that have their sizes specified in device independent pixels get larger as the system DPI increases.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;Points&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;A point (pt) is also a common unit of measurement for fonts. &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;1pt = 1/72 inches&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Converting between points and device independent pixels is also easy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;pt = 72/96 device independent pixels &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;device independent pixels = 96/72 pt&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Remember objects which are measured in device independent pixels get larger as system DPI increases? This is true for text. Since there is a constant ratio between point sizes/device independent pixels, if the point size of text is held constant while the system DPI is increased, the size of the rendered text will grow.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;Uses For Font Units&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Aside from knowing how to correctly set FontSize, the above knowledge could be helpful in understanding the values that WPF text APIs, such as &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.windows.media.formattedtext.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;FormattedText&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; or &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.windows.media.textformatting.textformatter.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;TextFormatter&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;, use and return for the different text measurements. The metrics returned from these APIs are in &lt;SPAN style="mso-bidi-font-style: italic"&gt;device independent pixel (eg. some properties of &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.windows.media.glyphtypeface.aspx"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;GlyphTypeface&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; including Baseline, CapsHeight, XHeight). When interacting with these APIs make sure that you convert to device independent pixels from whatever unit your font is measured in, or visa versa.&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;- Samer and Chipalo&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9935956" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/text/archive/tags/text+rendering/default.aspx">text rendering</category><category domain="http://blogs.msdn.com/text/archive/tags/wpf/default.aspx">wpf</category><category domain="http://blogs.msdn.com/text/archive/tags/WPF+3.5/default.aspx">WPF 3.5</category><category domain="http://blogs.msdn.com/text/archive/tags/WPF+4.0/default.aspx">WPF 4.0</category><category domain="http://blogs.msdn.com/text/archive/tags/WPF+4.0+text+stack/default.aspx">WPF 4.0 text stack</category><category domain="http://blogs.msdn.com/text/archive/tags/text+formatting/default.aspx">text formatting</category></item><item><title>New WPF 4.0 Features</title><link>http://blogs.msdn.com/text/archive/2009/06/24/new-wpf-4-0-features.aspx</link><pubDate>Wed, 24 Jun 2009 20:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9801823</guid><dc:creator>text</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/text/comments/9801823.aspx</comments><wfw:commentRss>http://blogs.msdn.com/text/commentrss.aspx?PostID=9801823</wfw:commentRss><description>&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;WPF 4.0 Beta1 was released last month. While many exciting features were included in Beat1, there was no work targeting text, flow, or layout. This will all be reversed with WPF Beat2. Below is a brief overview for each of the features included in Beta2 which target text, flow, or layout. I will make subsequent posts giving more detail about each feature, including API details. For now, I just want to let everyone know that great features are coming!&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;Text clarity improvements&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;In previous versions of WPF, all text is formatted without specifically accounting for pixel boundaries. This approach provides uniform scalability and ensures that glyph outlines adhere to font specifications. Unfortunately, small text appears blurry when it is rendered across pixel boundaries, and this has affected our customers.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In the past, we have only been able to say “we are working on a fix.”&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Now I can tell you that this is solved in WPF4.0!&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;As of Beta2, WPF provides developers with the ability to control how text is both formatted and rendered. Text can now be formatted to either strictly adhere to font specifications or fall on pixel boundaries. This new option allows text to be rendered more clearly at the slight expense of glyph shape and position.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;The option to set the rendering mode for text (eg, aliased, grayscale, ClearType) is also conveniently exposed. In most situations ClearType is an obvious win; however ClearType can degrade the user experience on CRTs and for people whose eyes are color sensitive. In the past, WPF forced all apps to use ClearType. Now, developers can choose between two additional rendering modes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;A Bindable Run&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;The inability to bind Run.Text has forced many people to create home brew solutions. In WPF4.0, Run.Text has been converted to a Dependency Property. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Run.Text now enjoys most of the benefits that come with this change, such as the ability to be bound, styled, and templated. &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;One-way binding is fully supported. Unfortunately, we did not have time to implement full support for two-way binding. This scenario is supported if a run is only modified through the property system, but not when the run is modified via a RichTextBox or the text object model.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;LayoutRounding&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-language: HE"&gt;&lt;FONT size=3&gt;WPF’s layout engine frequently causes&amp;nbsp;subpixel rendering along element boundaries&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN class=MsoCommentReference&gt;&lt;SPAN style="FONT-SIZE: 8pt"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-bidi-language: HE"&gt;&lt;FONT size=3&gt; This can lead to both rendering artifacts and blurry rendering, as antialiasing causes subpixel rendered elements to be displayed over multiple actual pixels. A classic example of this problem is small icons which get blurred because the icon images are placed on subpixel boundaries. Enabling LayoutRounding forces the WPF layout engine to place elements on whole pixel boundaries, thus removing most of the rendering artifacts caused by this problem. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;FONT face=Calibri&gt;Caret and Selection Brush&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;The default visual appearance of most objects in WPF can be easily tweaked or completely changed.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This provides developers far greater power over the visual look of an application than ever before. Facilitating the creation of highly customized apps has become a major adoption point for WPF. Despite WPF’s extensibility, the color of text selection and carets in text boxes and document viewers remains baked i&lt;/FONT&gt;&lt;FONT size=3 face=Calibri&gt;nto the framework. WPF now exposes properties to control the brushes used to paint text selection and carets.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNoSpacing&gt;&lt;FONT size=3 face=Calibri&gt;-Chipalo&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9801823" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/text/archive/tags/text+rendering/default.aspx">text rendering</category><category domain="http://blogs.msdn.com/text/archive/tags/pixel+snapping/default.aspx">pixel snapping</category><category domain="http://blogs.msdn.com/text/archive/tags/WPF+4.0/default.aspx">WPF 4.0</category></item><item><title>DirectWrite Questions and Answers</title><link>http://blogs.msdn.com/text/archive/2009/04/13/directwrite-questions-and-answers.aspx</link><pubDate>Tue, 14 Apr 2009 00:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9547344</guid><dc:creator>text</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/text/comments/9547344.aspx</comments><wfw:commentRss>http://blogs.msdn.com/text/commentrss.aspx?PostID=9547344</wfw:commentRss><description>&lt;P&gt;Hi, my name is Mikhail Leonov, and I’m a Senior Software Development Engineer on the DirectWrite team at Microsoft. I would like to address common user feedback on DirectWrite in a relatively informal ‘simple question – simple answer’ format. Feedback themes were gathered mostly from the user comments on various DirectWrite related blogs. Please feel free to post additional questions in the comments section right after this blog post. Throughout this post, I will assume the reader is familiar with DirectWrite basics. This link provides a good starting point: &lt;A href="http://channel9.msdn.com/pdc2008/PC18/" mce_href="http://channel9.msdn.com/pdc2008/PC18/"&gt;http://channel9.msdn.com/pdc2008/PC18/&lt;/A&gt;.&lt;/P&gt;
&lt;H5&gt;DirectWrite from the programmer’s point of view&lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;I want to experiment with DirectWrite in my application. How do I start using it?&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DirectWrite can be used from native C++ code by including DWrite.h header file and linking to the DWrite.lib library. At the runtime, the application will automatically load DWrite.dll.&lt;/P&gt;
&lt;P&gt;To start with, the application needs to call &lt;CODE&gt;DWriteCreateFactory&lt;/CODE&gt;. The factory pointer returned by &lt;CODE&gt;DWriteCreateFactory&lt;/CODE&gt; implements &lt;CODE&gt;IDWriteFactory&lt;/CODE&gt; interface, which can be used to perform actions such as creating DirectWrite font and layout objects.&lt;/P&gt;
&lt;P&gt;For more information, please refer to the introductory DirectWrite materials linked in the beginning of this post.&lt;/P&gt;
&lt;H5&gt;DirectWrite on pre-Windows 7 operating systems&lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;My application needs to work on Vista and XP. Is using DirectWrite an option for me?&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DirectWrite technology will ship first with Windows 7. After Windows 7 ships, DirectWrite will be made available for Windows Vista as well. There are no plans today to make DirectWrite available on Windows XP.&lt;/P&gt;
&lt;H5&gt;Microsoft platforms and applications using DirectWrite &lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;Does Microsoft use DirectWrite in its own products? I installed Windows 7, and I don’t see natural ClearType anywhere on the screen.&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DirectWrite is used by the Windows 7 ClearType Text Tuner control panel applet and by the XPS Viewer application. It is worth noting that DirectWrite is a new technology, and it takes time for customers to evaluate their existing text functionality and determine how to take advantage of DirectWrite.&lt;/P&gt;
&lt;H5&gt;Supported font formats&lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;Does DirectWrite only support TrueType fonts? How about Type 1 fonts or bitmap fonts?&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DirectWrite supports font files conformant to the OpenType specification version 1.5, which can be accessed here: &lt;A href="http://www.microsoft.com/typography/otspec/default.htm" mce_href="http://www.microsoft.com/typography/otspec/default.htm"&gt;http://www.microsoft.com/typography/otspec/default.htm&lt;/A&gt;. This support includes OpenType fonts with both TrueType and CFF outlines, and TrueType fonts with embedded bitmaps. Simply speaking, if your font has a TTF, OTF or TTC extension, DirectWrite should support it well.&lt;/P&gt;
&lt;P&gt;DirectWrite does not support bitmap or vector .FON font files, and DirectWrite does not support Adobe Type 1 .PFM/.PFB font files.&lt;/P&gt;
&lt;H5&gt;Installed fonts, local fonts, embedded fonts, per user fonts&lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;My application uses a custom font for certain user interface elements. Do I have to install it on the system in order for DirectWrite to be able to use it?&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, one doesn’t have to install a font in order for DirectWrite to be able to use it. DirectWrite provides full support for font files that are local to an application.&lt;/P&gt;
&lt;P&gt;The application that uses DirectWrite needs to register its own &lt;CODE&gt;IDWriteFontFileLoader&lt;/CODE&gt; interface implementation that manages the association between the font file location and contents. To support local font file enumeration functionality, the application needs to register its own &lt;CODE&gt;IDWriteFontCollectionLoader&lt;/CODE&gt; interface.&lt;/P&gt;
&lt;H5&gt;Rendering technologies to use DirectWrite with&lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;Can I use DirectWrite in my GDI+ application? How about using DirectWrite with Direct3D or GDI?&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DirectWrite font stack is designed to be independent from any rendering technology, so clients have flexibility to use any existing rendering mechanism in their &lt;CODE&gt;IDWriteTextRenderer&lt;/CODE&gt; implementation. In addition, DirectWrite is designed to work well with Direct2D rendering components, and Direct2D provides convenient wrappers such as &lt;CODE&gt;ID2D1RenderTarget::DrawText()&lt;/CODE&gt; for drawing text on D2D surfaces.&lt;/P&gt;
&lt;P&gt;DirectWrite itself provides GDI interoperability helpers via &lt;CODE&gt;IDWriteGdiInterop&lt;/CODE&gt; interface. One can create a DirectWrite font face object that corresponds to a font selected in a GDI &lt;CODE&gt;HDC&lt;/CODE&gt; and easily replace &lt;CODE&gt;ExtTextOut(…, ETO_GLYPH_INDEX, …)&lt;/CODE&gt; calls with DirectWrite based glyph run drawing calls without requiring significant changes to the rest of the application code. One can also create a &lt;CODE&gt;LOGFONT&lt;/CODE&gt; description for a DirectWrite font face object to re-use existing GDI based controls from a DirectWrite based text processing component. On top of that, one can create GDI surfaces that satisfy DirectWrite rendering requirements through &lt;CODE&gt;IDWriteGdiInterop::CreateBitmapRenderTarget()&lt;/CODE&gt; method, and draw DirectWrite glyph runs on that surface using &lt;CODE&gt;IDWriteBitmapRenderTarget::DrawGlyphRun()&lt;/CODE&gt; method.&lt;/P&gt;
&lt;P&gt;Interoperability with GDI+ can be achieved via &lt;CODE&gt;GetHdc()&lt;/CODE&gt; and &lt;CODE&gt;FromHdc()&lt;/CODE&gt; methods provided by the GDI+ &lt;CODE&gt;Graphics&lt;/CODE&gt; object. The client has a choice of starting with a &lt;CODE&gt;Graphics&lt;/CODE&gt; object and only switching to &lt;CODE&gt;HDC&lt;/CODE&gt; methods for DirectWrite interoperability calls, or starting with an &lt;CODE&gt;HDC&lt;/CODE&gt; obtained from &lt;CODE&gt;IDWriteBitmapRenderTarget::GetMemoryDC()&lt;/CODE&gt; and switching to &lt;CODE&gt;Graphics&lt;/CODE&gt; object derived from it. Which of these two approached is the best depends on the application needs.&lt;/P&gt;
&lt;P&gt;Applications that render using Direct3D usually need to obtain text in either bitmap or outline form. To get the former, the client can ask DirectWrite to produce alpha textures containing text using &lt;CODE&gt;IDWriteGlyphRunAnalysis&lt;/CODE&gt; interface. To get the latter, the client can use &lt;CODE&gt;IDirectWriteFontFace::GetGlyphRunOutline()&lt;/CODE&gt; method to produce a geometry containing text.&lt;/P&gt;
&lt;H5&gt;Rendering quality&lt;/H5&gt;
&lt;BLOCKQUOTE&gt;&lt;EM&gt;How do I specify text rendering options in DirectWrite? I want to use the new natural ClearType for text paragraphs, while having text in my menus and buttons look like the rest of the operating system.&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In your case, two different measuring modes should be used—&lt;CODE&gt;DWRITE_MEASURING_MODE_NATURAL&lt;/CODE&gt; for text paragraphs, and &lt;CODE&gt;DWRITE_MEASURING_MODE_GDI_CLASSIC&lt;/CODE&gt; for menu and button text. The measuring mode then gets passed to drawing calls such as &lt;CODE&gt;ID2D1RenderTarget::DrawText()&lt;/CODE&gt; and &lt;CODE&gt;DrawGlyphRun()&lt;/CODE&gt; as an input parameter. For clients who create &lt;CODE&gt;IDWriteTextLayout&lt;/CODE&gt; themselves, &lt;CODE&gt;DWRITE_MEASURING_MODE_NATURAL&lt;/CODE&gt; corresponds to calling &lt;CODE&gt;IDWriteFactory::CreateTextLayout()&lt;/CODE&gt;, and &lt;CODE&gt;DWRITE_MEASURING_MODE_GDI_CLASSIC&lt;/CODE&gt; corresponds to calling &lt;CODE&gt;IDWriteFactory::CreateGdiCompatibleTextLayout()&lt;/CODE&gt; with &lt;CODE&gt;useGdiNatural&lt;/CODE&gt; set to &lt;CODE&gt;FALSE&lt;/CODE&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9547344" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/text/archive/tags/text+rendering/default.aspx">text rendering</category><category domain="http://blogs.msdn.com/text/archive/tags/ClearType/default.aspx">ClearType</category><category domain="http://blogs.msdn.com/text/archive/tags/vista/default.aspx">vista</category><category domain="http://blogs.msdn.com/text/archive/tags/DirectWrite/default.aspx">DirectWrite</category></item><item><title>Tips for improving your WPF text rendering experience</title><link>http://blogs.msdn.com/text/archive/2006/10/18/tips-for-improving-your-wpf-text-rendering-experience.aspx</link><pubDate>Thu, 19 Oct 2006 00:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:840267</guid><dc:creator>text</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/text/comments/840267.aspx</comments><wfw:commentRss>http://blogs.msdn.com/text/commentrss.aspx?PostID=840267</wfw:commentRss><description>&lt;SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;WPF uses the latest version of &lt;A href="http://www.microsoft.com/typography/WhatIsClearType.mspx" mce_href="http://www.microsoft.com/typography/WhatIsClearType.mspx"&gt;ClearType&lt;/A&gt; to render text. This version of ClearType has a few new features over the standard ClearType used in GDI and WinForms. You can read more about these features &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms749295.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms749295.aspx"&gt;here&lt;/A&gt;. &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;STRONG&gt;We’ve found that a couple simple tips can improve your reading experience: &lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;-Make sure your monitor is set to its native resolution, typically the maximum resolution possible. This can be adjusted through Control Panel--&amp;gt;Display Properties on XP or Control Panel--&amp;gt; Adjust screen resolution on &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Vista&lt;/st1:place&gt;.&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;-Use the ClearType tuner &lt;A href="http://www.microsoft.com/typography/ClearTypePowerToy.mspx" mce_href="http://www.microsoft.com/typography/ClearTypePowerToy.mspx"&gt;PowerToy&lt;/A&gt;. This adjusts the system's ClearType settings including pixel orientation and Gamma. Though WPF's ClearType engine is separate from GDI and WinForms, WPF still picks up these system wide settings. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;-For advanced users who are comfortable playing with regedit, there is one additional WPF ClearType setting that may help improve your experience: you can adjust the color level that WPF ClearType uses for sub-pixel anti-aliasing. At the moment this can only be tuned via registry keys, but we do have future plans to update the ClearType tuner to include this setting in a UI. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;To adjust this you will need to create this new reg key:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\&amp;lt;displayName&amp;gt;\&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;With &amp;lt;displayName&amp;gt; typically being 'DISPLAY1'. You can adjust things independently if you have multiple monitors. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;Then create the following DWORD with any value between 0 and 100 (base 10):&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;ClearTypeLevel &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;The default value of 100 is the maximum amount of color and provides the greatest utilization of sub-pixels. On LCD panels this is the most optimal setting for the majority of users. If you perceive color fringes or halos around your text at a normal reading distance tune the value lower (You will need to restart any WPF application to see the effects of the change). The value of 0 uses only grayscale anti-aliasing and no color. Note if 'font smoothing' is turned off or set to ‘anti-alias’ on the system level, WPF will automatically render using grayscale anti-aliasing. Due to our pixel independent architecture we cannot render aliased text even if ‘font smoothing’ is turned off completely. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;-Chris Han&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=840267" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/text/archive/tags/text+rendering/default.aspx">text rendering</category><category domain="http://blogs.msdn.com/text/archive/tags/ClearType/default.aspx">ClearType</category></item></channel></rss>