I am developing a WPF application, but I noticed that with certain font sizes, the text does not display as well as the samples that you see in the control panel β Fonts. I use large Segoe UI fonts ( FontSize="36" ), and the effect is more noticeable on vertical lines, for example. the letter "U" may be slightly thicker on one side than the other. )
Font quality improves with certain font sizes, for example. FontSize="48" (which, in my opinion, is equivalent to 36pt), but using a limited number of fonts is not always practical.
I can improve the quality of the font by applying the following properties to the TextBlock: -
TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType"
Given the improvement in quality, I am curious to know why WPF does not do this for all text, or does it come to performance? I was thinking of creating a global style to apply this to all controls, or would this cause a problem?
(I tried to download the screenshot, but SO should keep the images in poor quality, and you could not deal with the font problem).
fonts wpf font-size
Andrew Stephens
source share