Finally got back into some UI work today

Finally got back into some UI work today. Here’s the start of support for multiple text sizes. Still fairly hacky and lots to be done, of course. Its nice to do something with a visible result for a change :)

Rob N. - 2012-05-21T20:25:22+1000Font work is fascinating and I learn so much, but its also incredibly hard and frustrating to get the results you want, especially cross-platform. Pioneer still doesn’t look as good as I would like.

Rob N. - 2012-05-22T07:08:02+1000We do that anyway - we use Freetype to generate a glyph atlas at startup. I dunno why things always look different in different places. I had been blaming local differences in Freetype builds, but that myth was recently busted so now I’m not sure. I still have work to do on antialiasing and blending. Right now it looks kinda blurry around the edges. That’s the sort of thing that is hard to get right, or at least I find it that way.

Rob N. - 2012-05-23T10:11:31+1000This screenshot is a hack - I generate several font textures, one for each size. We generate 0x20 to 0x1ff but nothing higher or on demand - I’m pretty sure our font doesn’t currently have glyphs for higher codepoints anyway. Its something we will have to address eventually.

We don’t do any scaling of texture fonts. We do have a vector font for world text where the actual glyph geometry is pulled from Freetype and converted to GL geometry. Its clever but waaaay overkill. The plan is to implement distance fields for world text, but we’re not there yet. I’m not sure if that will be sharp enough for UI text scaling. It will be nice if it is.

Rob N. - 2012-05-23T19:11:29+1000Good to know! My gut feeling said it could do well, but my gut has been off on a few things lately and we’re still learning to trust each other again.

The Valve paper on distance field[1] demonstrates doing it without shaders as well which makes it particularly compelling for Pioneer where we still need a fixed-pipeline option.


Rob N. - 2012-05-23T20:59:45+1000Happy with losing features. Unshadered Pioneer is usable, not pretty :)