none
Fonts render differently on different computers RRS feed

  • Question

  • I wrote a small app in C# that renders text using TextRenderer.  On some computers here (mine included), it works fine.  On some computers, the resulting fonts look significantly worse - especially at smaller sizes.  In both cases, the exact same exe and dll files were used.  What could cause this?  Where do I begin to try to find the underlying component that causes this difference?

    Thanks

    Jordon Hofer
    Tuesday, July 15, 2008 4:11 PM

Answers

  • Anti-aliasing has a big effect.  On XP: Control Panel + Display, Appearance tab, Effects, "Use the following method to smooth edges of screen fonts".  Selecting ClearType on a non-LCD display is bad news too.
    Hans Passant.
    • Marked as answer by jhofer Tuesday, July 15, 2008 7:51 PM
    Tuesday, July 15, 2008 7:23 PM
    Moderator

All replies

  • You may have tried this, but still, did you look at the resolution of the screen and color depth?
    Tech Lead, Lightbulb Tech Partners
    Tuesday, July 15, 2008 5:24 PM
  • I am doing a TextRenderer.DrawText() to a Graphics.FromImage() that gets passed a new Bitmap object.  I honestly didn't think that a system's screen resolution would affect this but I will look into it.

    Thanks for the reply.

    Jordon
    Tuesday, July 15, 2008 6:15 PM
  • Have you verified that the font exists on the computer? If the font you want is missing, Windows will just pick a different font.

    Jonathan
    Tuesday, July 15, 2008 6:37 PM
  • Yes.  It is pulled from a drop down menu that is populated by a call to System.Drawing.Text.InstalledFontCollection().Families.

    Thanks

    Jordon
    Tuesday, July 15, 2008 6:50 PM
  • Anti-aliasing has a big effect.  On XP: Control Panel + Display, Appearance tab, Effects, "Use the following method to smooth edges of screen fonts".  Selecting ClearType on a non-LCD display is bad news too.
    Hans Passant.
    • Marked as answer by jhofer Tuesday, July 15, 2008 7:51 PM
    Tuesday, July 15, 2008 7:23 PM
    Moderator
  • That was it!  Clear Type rendering (combined with my code that manually converted it to 1 bit per pixel) was killing the quality!  I set the right property in the Graphics object to force AntiAlias instead of SystemDefault and all is well!

    Thanks a ton!  This issue has been bugging me for a while!

    Jordon
    Tuesday, July 15, 2008 7:51 PM