Notifications
Clear all

To all SSC Station occupants

Thank you for the donations over the past year (2024), it is much appreciated. I am still trying to figure out how to migrate the forums to another community software (probably phpbb) but in the meantime I have updated the forum software to the latest version. SSC has been around a while so their is some very long time members here still using the site, thanks for making SSC home and sorry I haven't been as vocal as I should be in the forums I will try to improve my posting frequency.

Thank you again to all of the members that do take the time to donate a little, it helps keep this station functioning on the outer reaches of space.

-D1-

Text rendering improvements

 robn
(@robn)
Noble Member

I've spent the last few days studying the dark art of text rendering and while I still have a lot to do to get to where I want it to be, I've come far enough to share a few screenshots:

4kYpS.png

KEgyO.png

kSbOt.png

895PO.png

7r92z.png

The font itself is Titillium. So far I've added support for kerning and subpixel positioning, and I've turned off the automatic justification, so things are reading much much easier. There's still some work to do on character spacing and vertical hinting.

Quote
Topic starter Posted : May 18, 2011 02:41
(@Anonymous)
New Member

This is excellent - far more easier to read than the current font. πŸ˜€

You are right though, the spacing doesn't seem to be quite right though (I'm spoilt with Mac fonts), and I can't really put my finger on it, except to say that it just isn't right.

ReplyQuote
Posted : May 18, 2011 05:21
 robn
(@robn)
Noble Member
Philbywhizz wrote:
You are right though, the spacing doesn't seem to be quite right though (I'm spoilt with Mac fonts), and I can't really put my finger on it, except to say that it just isn't right.

The conventional wisdom is that Mac fonts look blurry at small sizes but are utterly glorious on large, high DPI displays, while Windows looks fantastic at low DPI but can't scale up worth a damn. Meanwhile, Linux looks like shit because nobody knows how to configure fontconfig πŸ˜†

The problem mostly seems to mostly come from the hinting being done on integer boundaries. What I want to try is transforming the raw glyph to its subpixel position before its hinted, which might give better results.

Fyi, I've studied this a lot to get ideas: http://www.antigrain.com/research/font_rasterization/ . I can't use the algorithms as-is because they're deliberately designed for RGB sub-pixel rendering, which is only going to work on LCD displays. I don't want to limit us to that since I know a couple of people are using an old CRT and there's rumours of iPad ports which RGB sub-pixels aren't going to work. Either way though, take a look at the screenshots - these are unmodified classic TrueType fonts like Arial and Times New Roman rendered with an unmodified FreeType. Linux is capable of this right now, in theory. Its bitterly disappointing that nobody has bothered to do the work.

ReplyQuote
Topic starter Posted : May 18, 2011 12:51
(@s2odan)
Noble Member
Quote:
while Windows looks fantastic at low DPI but can't scale up worth a damn.

I've always found the fonts look pinsharp with win7 on my 2560x1600 display. But thats probably the 'Clear-type' setting which is supposed to make things look nice and pretty.

Pioneer has also always looked rather crisp and sweet at that resolution, and I have never really noticed any problems with the font.

Don't get me wrong I'm not against the changes, In fact I would welcome them with open arms if you think it will actually improve things. πŸ™‚

ReplyQuote
Posted : May 18, 2011 15:06
 robn
(@robn)
Noble Member
s2odan wrote:
Quote:
while Windows looks fantastic at low DPI but can't scale up worth a damn.

I've always found the fonts look pinsharp with win7 on my 2560x1600 display. But thats probably the 'Clear-type' setting which is supposed to make things look nice and pretty.

Its still running at 96 DPI though. Microsoft have spent a lot of time optimising for their specific cases and the fonts they ship, but haven't done as well for the general case, so fonts designed for print generally look lousy whereas they look much better on Mac. That's not a criticism; rather just being aware of the different philosophies at Microsoft and Apple.

Quote:
Pioneer has also always looked rather crisp and sweet at that resolution, and I have never really noticed any problems with the font.

Pioneer (currently) has its fonts at 12 virtual pixels (on the 800x600 virtual display). Appropriate scaling is fed to FreeType to make sure the the fonts aren't bitmap scaled but rather are scaled by the renderer. So they look good at large sizes, but struggle at a native 800x600 (which is where I play so I can still see the debugger on the small laptop screen).

My goal is to make it look decent at any size.

Quote:
Don't get me wrong I'm not against the changes, In fact I would welcome them with open arms if you think it will actually improve things. πŸ™‚

You probably won't notice the difference on your massive screen. I will though πŸ™‚

ReplyQuote
Topic starter Posted : May 18, 2011 15:12
(@s2odan)
Noble Member

That article is pretty interesting and explains it all rather nicely. Your right windows scaling is wrong πŸ™‚ Although it has improved a bit since XP, probably due to other trickery. I remember with XP using this large display, countless programs would have text cut-off and were un-usable when using the built-in scaler @144DPI... So my understanding from that article is that it is down to Microsofts poor scaling technique.... right? Windows 7 seems to be much better with the scaling, not perfect but it at least works this time round πŸ™‚

I don't get what you mean by saying its stuck at 96 DPI..? As I can select some pretty high DPIs using the windows scaler, not that they would look that great over 144 DPI but the option is there...

Surely if the fonts are rasterised then any DPI > 96 would be possible...?

I know I may sound like it, but I am not a windows fan... its just a necesary evil in my world and if I could I would have jumped shop to Linux many years ago πŸ˜‰

ReplyQuote
Posted : May 18, 2011 15:56
 robn
(@robn)
Noble Member

I'm not really saying anything - I just barely understand this myself. And you don't have to justify to me why you use the software you do - whatever works for you πŸ™‚ I don't use Linux for any philosophical reason. The first PC I owned was a 486 but I didn't get it until 1998, and it couldn't run any semi-modern Windows very well, so I shopped for alternatives and found Linux. As a result I've spent the last decade learning Linux without much significant exposure to Windows. Sometimes the chips just fall that way πŸ™‚

ReplyQuote
Topic starter Posted : May 18, 2011 17:14
(@ollobrain)
Honorable Member

if u want to go a bit further how about 3 or 4 fonts and allow the player to choose which one they want

ReplyQuote
Posted : May 18, 2011 17:42
 robn
(@robn)
Noble Member

My intention is that you fonts won't be selectable in-game, but you will be able to replace them with whatever you want. There will be font configuration files that will let you tweak the renderer without requiring a recompile, so you can drop in the font of your choice without being tied to the specific adjustments made for the stock fonts.

ReplyQuote
Topic starter Posted : May 18, 2011 17:50
(@ollobrain)
Honorable Member

oh ok so a moddible font selection , without a ingame option choice i guess its a good fallback

ReplyQuote
Posted : May 18, 2011 19:08
 robn
(@robn)
Noble Member

Almost there:

qfK6M.png

Mlah5.png

That's a bruteforced -1px character spacing adjustment, and demonstrates why I want a per-font config file - I don't want to hardcode it because it feels like its more to do with the font itself than the renderer. This way you get lots of control to make your font appear just the way you like it.

ReplyQuote
Topic starter Posted : May 18, 2011 23:40
(@ollobrain)
Honorable Member

i like the new font better than the existing one

ReplyQuote
Posted : May 19, 2011 00:00
(@cavefish)
Eminent Member
robn wrote:
Almost there:

That's a bruteforced -1px character spacing adjustment, and demonstrates why I want a per-font config file

Maybe rather a "style sheet" for the entire gui, so you can define the font, text spacing, gui tint and such

ReplyQuote
Posted : May 19, 2011 02:50
(@Anonymous)
New Member

Nice font, will it be included in the next nightly build?

ReplyQuote
Posted : May 19, 2011 02:52
 robn
(@robn)
Noble Member
Cavefish wrote:
Maybe rather a "style sheet" for the entire gui, so you can define the font, text spacing, gui tint and such

I'd like to do something like that, but we're not there yet. There is a theming engine inside Pioneer but its very rudimentary and not used consistently yet. So its coming πŸ™‚

ReplyQuote
Topic starter Posted : May 19, 2011 02:54
 robn
(@robn)
Noble Member
Gudadantza wrote:
Nice font, will it be included in the next nightly build?

Not yet. Early next week I hope. If you're able to do your own builds though you're welcome to try my text-rendering branch.

ReplyQuote
Topic starter Posted : May 19, 2011 02:54
(@s2odan)
Noble Member
Quote:
The first PC I owned was a 486 but I didn't get it until 1998, and it couldn't run any semi-modern Windows very well, so I shopped for alternatives and found Linux. As a result I've spent the last decade learning Linux without much significant exposure to Windows. Sometimes the chips just fall that way πŸ™‚

98!! You newb hehe. You've come a long way in a pretty short time....

I *barely* remember having a 286 back in the late 80s with windows 2.0... I was probably all of 6 years old then hehe. Started(Attempted) building/modding them around at around 10, I still remember breaking my PC on my first attempt to install a CD drive πŸ˜€

ReplyQuote
Posted : May 19, 2011 08:17
 robn
(@robn)
Noble Member

Fyi, this mess just hit the master branch and so will be in tonight's dev build.

The very simple font config looks like this: GuiFont.ini

ReplyQuote
Topic starter Posted : May 20, 2011 21:00
(@coolhand)
Estimable Member

I find this typeface really suits the game well, but the spacing adjustment i think is making the letters a little close together.

http://www.fontsquirrel.com/fonts/Orbitron

ReplyQuote
Posted : May 26, 2011 10:44
 robn
(@robn)
Noble Member
Coolhand wrote:
I find this typeface really suits the game well, but the spacing adjustment i think is making the letters a little close together.

http://www.fontsquirrel.com/fonts/Orbitron

And that's exactly what the font config is for. Adjust the AdvanceXAdjustment parameter and you should be able to get it looking good.

ReplyQuote
Topic starter Posted : May 26, 2011 11:46
Geraldine
(@geraldine)
Famed Member

I noticed that there are two El Cancri stars in the system map in your picture robn. How did I miss that! 😳

As for the fonts, yes a nice improvement and easier to read than the old ones πŸ™‚

ReplyQuote
Posted : May 26, 2011 12:26
 robn
(@robn)
Noble Member
Geraldine wrote:
I noticed that there are two El Cancri stars in the system map in your picture robn. How did I miss that! 😳

Yes, so did I, and it amused me that I hadn't seen it sooner. Its already fixed in dev.

ReplyQuote
Topic starter Posted : May 26, 2011 12:29