Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
Font kerning is wrong causing unreadable text...
posted

Using the UltraFormattedLinkLabel, I'm getting display issues where the font kerning (space between each character) is causing the text to look trashy and "glumped" together.

The image above shows this in the words "drop lists".  We have seen this in Vista 32/64, XP, Win2003, etc.  We have no Style File.  I can reproduce it in the simplest of applications.  It is more noticeable with Bolding as compared to not.  Either way, the text is not "smooth" and easily readable.

Below is an example showing the same thing with an UltraExpandableGroupBox:

Any idea on what default setting is set such that it would look crudy "out of the box"?

  • 37774
    Suggested Answer
    posted

    This issue is due to the limitation of using GDI+ to render text, since the characters are not precisely aligned to fit a grid; assuming the same font and appearance settings, you'll generally see the same issue simply using a .NET Label by setting the UseCompatibleTextRendering to True.  One way to work around this is to simply set the TextRenderingMode of the offending controls to GDI instead of Default or GDIPlus.  The other solution is to tweak the font size until it seems to match closer to a grid fitting, but this is the less preferable approach.

    There is an article that explains this issue in more detail here.  If you scroll about 2/3 of the way down the page, you will see an example of drawing 9 "l";s next to each other, and how in GDIPlus the appear to touch.

    -Matt