Bugzilla – Bug 4400
Add support for kerning TrueType fonts
Last modified: 2010-09-14 12:16:33 UTC
Although SlimServer supports Unicode TrueType fonts, kerning is not used (as far as I can tell). Kerning would improve the legibility of text. The included Code2000.ttf TrueType font (and ArialUni.ttf if used) and the GD library used by Slim/Display/Lib/Fonts.pm already support kerning. The StringFT() function used Fonts.pm to render the font can take an optional argument to enable or disable kerning. Since StringFT() enables kerning by default, and the argument isn't specified, fonts are rendered with kerning. The problem (I think) is that Fonts.pm iterates through the text string, and renders each character individually. Since kerning is the changing of spacing between particular characters, StringFT() can't kern since it never 'sees' more than one character. IMHO, this enhancement (along with bug 936), would greatly improve the perceived 'slickness' of the player UI. It'd look good without the user quite knowing why. Thanks.
I'm going to be redoing the TTF handling in 7.6 (dropping the GD module and using Font::FreeType instead), so I thought I'd update this bug. I'm not sure kerning makes a lot of sense since we use our bitmap font for all text except Unicode chars. So kerning would only work on some characters, not all of them.
You know the code better than I do (I just tried to understand it back them). I did think that all text used the TTF if it was installed. I submitted the bug back then because, as a user, I though that the text spacing looked at a little uneven. It may just be a limitation of the limited resolution, but I guessed that kerning may make it better. Thanks.
Unfortunately this isn't possible, as fonts displayed on screen are a mix of bitmap and TrueType fonts.