Hello,
I've been using your Nuclex fonts libraries in a game I've been developing in XNA. It has worked great for me so far. Thanks for all your hard work.
A problem came up when I distributed my game to some people who are doing testing for me. 2 (of 7) of the testers have problems displaying the fonts. They see garbled text, unrecognizable characters, or sometimes yellow blocks where they should see simple letters (I'm using an Arial font). I thought it was maybe how I was using Nuclex Fonts, but I gave one of them the Nuclex font demo exe (which I built) to try as well. It displayed similar, garbled looking fonts (see link). So I'm not sure what's wrong.
Are you aware of this problem, or have you seen it from anyone else? Please let me know. Thanks again.
(http://skelman.com/images/freds_nuclex_results.jpg)
Screenshot:
Never seen this before...
Thanks for the screenshot, at least I can make some guesses.
In the past, I've observed some ATI drivers not handling texture subregion locking correctly (nVidia returned the address of the upper left pixel in the locked subregion, ATI instead always returned the address of the upper left pixel in the entire texture, leaving the math for finding the subregion to the programmer).
Maybe this is what's hapenning here, too?
If all letters were copied to the upper left corner of the cache texture, I'd presume the outcome would be exactly like in your screenshot. The first letter showing and everything else showing uninitialized texture bits.
One thing you could try
If the texture subregion locking actually is what causes the problem, you should be able to make it go away by using the alternative locking method. Try this:
1. Open the Nuclex.Fonts project (found in the
Sources\Nuclex.Fontsfolder of the downloaded archive.2. Locate and open the file
GlyphCache.csin the project.3. Put a
#define XBOX360in this file's header, eg.using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Nuclex.Fonts.Content;
namespace Nuclex.Fonts {
That will make Nuclex.Fonts use the XBox 360 locking method, which always updates the entire texture instead of using subregion locking.
I'll give it a try...
The tester who gave me that screenshot has an NVidia GeForce FX 5200. I will still give the code change a try and see if that helps. I'll let you know. Thanks.
update video drivers...
One of my test users updated their graphics card drivers and things were suddenly working. I'm assuming it will be the same solution for the other tester. Sorry for the worries!
Thanks again,
-skelman
XBOX locking fixed the problem...
FYI:
In regards to my post, http://www.nuclex.org/news/2007/01/15/nuclex-fonts-1-2-0#comment-417,
I've fixed the problem by following the above recommended solution of defining as XBOX.
Thanks
Post new comment