Mobile app version of vmapp.org
Login or Join
Eichhorn212

: How to set font smoothing (WPF)? In my WPF application often used small size text (12-13 px). As a result I see a bad display of it (imho, for me). ClearType used (but does not help). Example

@Eichhorn212

Posted in: #Fonts #Wpf

In my WPF application often used small size text (12-13 px). As a result I see a bad display of it (imho, for me). ClearType used (but does not help).

Example (from above is a desired result):



How you thinks, what must be helpful for me?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn212

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ann6370331

The bottom image looks like it is using greyscale subpixel rendering. This is normal behavior in WPF for certain circumstances. The following randomly selected link summarizes better than I can:


This is not a bug actually, rather it's a known limitation, there are
some of situations in which font antialiasing algorithm will fallback
to grayscale, they are:


Text content rendered into software render target using RenderTargetBitmap.
Text content hosted inside layered windows (aka ContextMenus, ToolTips etc).
Text content rasterized into VisualBrush.
Text content rendered into a CompostionTarget whose Background property is set to Colors.Transparent to support areo glass frame
extension.



Note: this is definitely a stack overflow question.

10% popularity Vote Up Vote Down


 

@Holmes874

Use a bitmap font just in the wanted size. Get one that is designed for small size. Prevent any scaling and smoothing.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme