Font Wars: Episode XXI

If you’ve been following my blogs on this topic for awhile, you know how I feel about the way DirectX 9 handles TrueType fonts. Terribly.

If we had to do it over again, we would have just hand made each character.  But we didn’t. And the battles to make fonts look good has made use choose font styles that we might not otherwise have used.

Luckily, we may have a solution – thanks to the ingenuity of the lead developer of WindowBlinds and Start8. He also wrote the overlay code and gave me a DLL this morning that may solve a lot of our problems.

The first thing to understand about the magic of Stardock’s non-games business is that they know how to get into other people’s processes and add features without source code.  That’s how WindowBlinds works – it takes over the drawing of every window on the OS to one that is better, faster, and cooler.

So seeing our font issues in Fallen Enchantress, he wrote a DLL that redirects the DirectX calls to one of his own making.

So here’s what a typical screen looks like in the current build. It helps to load this up and zoom in.  If you’re in the beta, you are familiar with the limitations of D3DXFont calls.

Quest-original

And below is the result after his fix:

 

Quest-pass1

Zoom in on the various parts.

This opens the door to us being able to eventually be able to do a lot more interesting things with fonts since they’ll not be blocky, artifacty messes.

It’s still being tweaked but it’ll be interesting to see how many people notice when Beta 5 hits (which is why I’m not posting this in the journals section, fewer viewers).

Now, before someone comments, please remember, the fonts we chose for the game were based on what fonts looked best on D3DXFont which tended to be Arial and that kind of thing.

I can’t promise that we’ll be changing the fonts this late in the game. But what I can say is that the existing fonts will look a lot better and it opens things up for future updates to have interesting fonts that look good.

78,750 views 38 replies
Reply #1 Top

It looks ever so slightly AA-ed. Really, I can hardly notice when I look at the side-to-side as it is.

But then, I have poor eyesight and play without glasses so that's like my own layer of blur right there.

Reply #2 Top

This looks better, and the part that looks much better is lower on the screen. Look at "Equip Explore Guard" in the lower left. Much, much better looking IMO. It really looks much crisper and cleaner. Almost like I'm looking at a modern monitor ;)

 

Reply #3 Top

Wow, that 'W' in the first picture (in the word 'Weak') looks horrible. The second picture looks much better. I like it.

Reply #4 Top

The higher the resolution you play at, the better it looks too.  Makes a huge difference on eye strain.

Also, look real closely. Kerning works.

http://en.wikipedia.org/wiki/Kerning

That means hand written font support.

Reply #5 Top

I swear that if you paid me $1,000.00 in a blind study, I wouldn't be able to tell the difference.  But if you say it's better, then it must be.

Reply #6 Top

You'll notice it. Big time. When you are playing it. It's like going from a non-anti alised Windows 3.1 fonts to clear type Windows 7 fonts.

 

 

What I said to Neil:

What you are doing here breaks the laws of god and science. 

 

Just to compare, here is how it looks in the current build:

You may not notice the difference in a single screenshot but you'll notice it as a general smoothness and crispness to the game.

 

 

Reply #7 Top
Nice little bit of polish, this! I remember seeing a thread where people were complaining about the fonts, but I didn't seriously expect any effort in improving them. It's good that beta 5 will be a bit easier on the eyes. Any idea when we'll be seeing beta 5?
Reply #8 Top

I prefer the old one, it gets me nostalgic for playing Ultima IV on my Apple II.

I kid, I kid!  The new one looks much better.

 

Reply #9 Top

Before: http://screencast.com/t/oSXQ44VbN

After: http://screencast.com/t/AjcCJu9KhTrb

Look at the word "Quantity:" at the top. 

Now, imagine the difference when viewing this in real time over many hours of playing.

 

Reply #10 Top

Quoting Cauldyth, reply 9
I prefer the old one, it gets me nostalgic for playing Ultima IV on my Apple II.

I kid, I kid!  The new one looks much better.

 

Yea, when people hoped for a Master of Magic type game, I don't think they intended it to be about the font rendering. ;)

Reply #11 Top

Here's one you can relate to.  The books that have text on them:

NEW: http://screencast.com/t/haANxktoxk

 

Reply #12 Top

It does look better!

Reply #13 Top

Ow, my eyes!

Ow, my eyes!

 

Reply #14 Top

Or you could have done what smart people do and just use freetype.

Man o man, this amazing Stardock technology is AMAZING!

Snarkiness aside, the terrible 90'sesque font rendering is something I've always noticed with the various Elemental screenshots.

Reply #15 Top

Quoting NoobFukaire, reply 15
Or you could have done what smart people do and just use freetype.

Man o man, this amazing Stardock technology is AMAZING!

Do you know...what Freetype is right? It would not have solved the issue.  You do know that we were using TrueType before via DirectX and we are still using TrueType now.

Looking at your other comments around here, http://forums.littletinyfrogs.com/replies/3459900 I think you need to decide whether you want to remain part of our community. The snark, post after post, gets old.

I'm sure someone could argue we should have used OpenGL instead of DirectX too and gotten A/B/C benefit.  The point was to discuss an improvement to THIS particular game that we're excited about.

 

Reply #16 Top

Freetype is library that generates font glyph bitmaps that you copy into a texture. When you render a character, it's rendered as a quad with that texture.

If you were using Freetype and you weren't getting antialiased glyph bitmaps, that's hilarious. RTFM Stardock developers.

If anyone is making jackass comments, it's you. You're trumpeting "advanced" tech that is 10 years old.

Newbie graphics programmers can do this stuff, frogboy. 

Reply #17 Top

Screenshots and a resume, please.  Or stop being a terrible poster and GTFO.

Reply #18 Top

There is definitely an improvement in the overall looks of the game by changing font rendering. I remember reading a forum post of someone complaining about it and I indeed noticed fonts were poorly rendered but I honestly never expected anything to change so I guess I got over it. But it really looks a lot better and it does make a difference. It's something we usually take for granted but it does make a noticeable difference and will add to the overall feel of the game.

I also suggest using more medieval-looking fonts for books (spell book, and that screen you get at the beginning) and quests. But they only look good on a paper background so that might not work for the quest window.

I'm happy to see you're taking interest in such details Brad, this can only lead to good things for FE.

Reply #19 Top

As a developer we have same issues with DirectX and truetype fonts - they are a pain and it was difficult to work out which fonts at which sizes were suitable. Sometime we ended up using fonts rendered to a texture but that buggered up many of our formatting routines that were using. 

 

Anyway, I appreciate the change - the result looks more polished and readable.

 

It is a shame that some people go out of their way to post pointless crap (NoobFukaire)

Reply #20 Top

I'm sorry if I offended you with my posts today, Bradley.

FreeType does indeed support font kerning and has done so since the inception of the project. Kerning is a critical part of type layout. For Freetype, the overview here: http://www.freetype.org/freetype2/docs/glyphs/glyphs-4.html although it appears your developer has already found it and the associated API documentation. I see you've eliminated that from your post, so perhaps your developer has already informed you.

With regard to OpenGL vs Direct3d, it's not an interesting argument. Both APIs are just means to get your draw calls executed on the GPU hardware, in a high level fashion. They both work identically and do the same things, on the same hardware. The interesting part is what you do *with* them.

Congrats on your new font rendering system, Fallen Enchantress will look much better than the previous release due to this small change.

Ciao,
NoobFukaire

Reply #21 Top

FreeType is not used by Elemental and never has been.

Elemental uses the ID3DXFont system provided by the DirectX9 SDK which has some limitations with regards to antialiasing.  Many newer fonts require cleartype to look acceptable and this simply wasn't possible.

The new rendering system uses DirectWrite which is a great deal more advanced.

Reply #22 Top

I apologize, I misread Frogboy's "we used TrueType" mention as "we used FreeType" because TrueType is a font definition format and is not directly related to font rendering in any way.

I noticed that you haven't implemented Subpixel AA, but that may not be a requirement in this case. It's fun to implement in a shader though. :)

Reply #23 Top

The screenshots look great Frogboy and I did notice the improvements from the original screens. I think that this is a great improvement that people may not notice, but will think this game is well polished. Great job guys!

Reply #24 Top

The more zoomed-in screenshots show off the changes quite nicely.  A definite improvement.

 

Reply #25 Top

No hard feelings Noobfakaire.  You're welcome here any time.

+1 Loading…