2014-11-16

Text Rendering Is Hard

The only negative side effect I've noticed from the provider move is text rendering at small sizes. Prior to the move the rendering of text like world names was precise and very legible. Now... some letters are a bit anemic in places. It's only notable for text like world names, when portions of a letter like "E" may be only a single pixel wide. 
Old AntiAliased: note the high quality letter shaping
New AntiAliased: poor letter shaping, poor legibility
ClearType: poor letter shaping, better legibility

Text rendering is hard. Go read http://www.rastertragedy.com for the gruesome details. I rely entirely on the APIs provided by .NET for it, which relies on Windows support. There are plenty of options available for providing hints to the text rendering, and I use "antialias" which basically means rendering character glyphs as vectors and not getting too fancy with reshaping letters to improve legibility of text. That's great for images and lousy for swaths of text (like a web page or ebook), and the text may be a little fuzzy but the size and placement are exact.

Unfortunately, it looks like the "cloud" machines now hosting the site are not doing it the same way as the prior hosts. My guess is that there was GPU rendering on the old provider and without that a fast/dirty CPU fallback is used.

I tried changing hints, and some do improve the legibility of some text but makes other text far worse and pixelated. And even the "improved" text is... well, it doesn't look as elegant. *sigh*



Old AntiAliased: looks the best to me

New AntiAliased: World names are ugly, subsector name looks good



ClearType: note the "jaggies" on the subsector name
The good news is that if you're using a device with a high density ("retina") display, the problem doesn't appear since there are four times as many pixels for the renderer to play with, and that's the way of the future. It also doesn't affect print (PDF) output. 

New AntiAliased: High-DPI Rendering

I'll keep tracking this issue and see if I can improve things. I may be able to selectively tweak the output (e.g. only for world details, if low-DPI, etc). I'll also ping the hosting provider. 




Ω

No comments: