none
Font rendering issue in WPF - no text displayed in some cases

    Question

  • We are currently experiencing an issue with font rendering in our WPF browser application.

    Initially we never had any issues with this during development or testing, but now that the application is rolled out some users complaining about missing fonts within the UI.

    The problem currently only occurs on computer with the following configuration
    • Windows XP SP3 (both x86 and 64 Bit editions)
    • Access to our WPF browser application using Firefox (until now we haven't had this issue with IE)


    Another problem we have is that the problem seems to occur entirely random.
    Restarting the application often fixes the issue.

    Sometimes the font disappears entirely and nothing is displayed at all:


    Sometimes only special characters like 'ä, ö, ü or ß' seem to disappear.
    Once again -on the same machine- everything seems to be fine upon restarting the app.


    I would be thankful for any ideas on what could be causing this.
    Friday, June 04, 2010 4:23 PM

Answers

  • Hi,

       This is a known bug that fixed in .NET 4.0.  Additionally, since the bug occurs in a module that is shared between 4.0 and 3.X, there is an update for simply the Shared Components part of .NET 3.5 SP1 that should address the problem but I cannot find it at this moment...  I have contacted WPF's release program manager for more information, but to workaround temporarily (and to ensure this is the problem) please try installing .NET 4.0 on a machine to see if it corrects the problem.  Uninstalling .NET 4.0 should leave behind the shared components as well... so the problem will stay fixed.

    Update: Shared Components update isn't available yet BUT this patch (or 4.0 RTM) includes it: http://support.microsoft.com/kb/980251

     

    Hope this helps,

    Matt


    SDET : Deployment/Hosting
    Tuesday, June 08, 2010 4:35 PM
    Moderator

All replies

  • I have a client running Citrix, Windows Server 2003 and XP SP3 machines. One of the servers and a handful of PCs had an issue like this that we couldn't pin down. The client insisted that all the machines where identical but in the end it turned out to be missing Windows and .Net updates. We were using VS 2008 and the 3.5 framework at the time.   

    My suggestion would be to make them run all their updates before you spend too much time on it.

    Good luck

    Sunday, June 06, 2010 5:51 AM
  • Thanks for your suggestion!

    So first thing I did this morning was checking for available updates on the machines this problem occured on.

    Windows Updates are set to 'automatic' by group policy within the domain and manual search through www.windowsupdate.com doesn't bring up any missing updates.

     

    Might there by any hotfixes (not available through Windows Update) we could try?

    Monday, June 07, 2010 8:33 AM
  • I don't know of any hotfixes off thetop of my head.

    Normally Windows just picks the font it thinks is the best match if the font is missing but you might want to verify they have the font you are using installed.   

    Monday, June 07, 2010 7:55 PM
  • Hi Kalvis,

    The WPF plug-in for FireFox is installed along with .NET Framework 3.5 SP1. My suggestion is that you firstly check if WPF plug-in has been installed on Windows XP using the method mentioned in the below KB article: http://msdn.microsoft.com/en-us/library/bb909867.aspx

    Then, you could try to start the server  Windows Presentation Foundation Font Cache 3.0.0.0 for .Net 3.0+ or WPFFontCache_v0400 for .Net 4 and run your application again.

    If it can not help you, could you please try to add some try{}catch{} or trace your application and log the message?

    Hope this helps.

    Sincerely,

    Bob Bao


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, June 08, 2010 5:55 AM
    Moderator
  • Hi Bob,

    your post has been pretty helpful in getting closer to the actual issue!

     

    The WPF plugin for Firefox is installed correctly.

     

    But when checking the Font Cache service we are now able to reproduce this issue:

    If the font cache service is stopped & disabled, our WPF application does not render any fonts using the Firefox plugin, no matter how many times we try.
    It also seems that the problem we had on client computers only occurs on the first start of our application (after a computer reboot), when the font cache service is initially started (flagged as 'manual' startup in the Services management console).

    On the other hand this is definitely an issue with the Firefox plugin, even with the font cache service stopped and disabled Internet Explorer always renders all fonts correctly.

     

    I will go on to check for tracing messages or exceptions during the inital initialization of the WPF application (when using Firefox) to see if there's a way to avoid this issue!

     

    Best regards

    Thomas

    Tuesday, June 08, 2010 9:19 AM
  • Hi,

       This is a known bug that fixed in .NET 4.0.  Additionally, since the bug occurs in a module that is shared between 4.0 and 3.X, there is an update for simply the Shared Components part of .NET 3.5 SP1 that should address the problem but I cannot find it at this moment...  I have contacted WPF's release program manager for more information, but to workaround temporarily (and to ensure this is the problem) please try installing .NET 4.0 on a machine to see if it corrects the problem.  Uninstalling .NET 4.0 should leave behind the shared components as well... so the problem will stay fixed.

    Update: Shared Components update isn't available yet BUT this patch (or 4.0 RTM) includes it: http://support.microsoft.com/kb/980251

     

    Hope this helps,

    Matt


    SDET : Deployment/Hosting
    Tuesday, June 08, 2010 4:35 PM
    Moderator
  • Thanks Matt!

    The problem really seems to be fixed with installing .NET 4.0.

     

    Couldn't try out the hotfix yet, but as we are in the process of planning to upgrade to .NET 4.0 anyway it's great to know this issue won't happen again.

    Until then people know that reloading will fix the issue they have.

    Wednesday, June 09, 2010 8:42 AM
  • Hello, I have this problem on a Windows7 VM (that I have discovered so far) using IE8. I upgraded to .Net v4.0.30319_X86 but that did not fix the problem.  I have fonts included as resources for certain text items and that text does not display either.   Turning the font cache on or off does not seem to help.  Any further ideas or info?

     

    Thanks,

    Ken

    Tuesday, August 10, 2010 7:52 PM
  • We experienced the same problem. Solution:

    - Use Player 3.1

    - Update VM Ware Tools

     

    Wednesday, August 18, 2010 12:26 PM
  • That worked, player 3.1 is our friend.  

    Thanks for the post.

    Wednesday, August 18, 2010 3:12 PM