FS#7683 - fast anti alias and subpixel hinting

Attached to Project: Rockbox
Opened by Hendrik Siedelmann (Hellworm) - Friday, 31 August 2007, 14:47 GMT
Last edited by Marc Guay (Marc_Guay) - Friday, 12 December 2008, 15:24 GMT
Task Type Feature Requests
Category Font/charset
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No


I know this has been closed before, but the arguments were simply wrong:
- Vector fonts are required for anti alias as much as for bw fonts: not at all! The only reason to use vectors is for variable size fonts, which I agree are overkill.
- Translucency is not required, only drawing one key color transparent is needed, which is supported.

The speed difference is propably not that big, I think (but I don't quite understand the rockbox source code) that the speed change would be from using lcd_bitmap_transparent_part instead of lcd_mono_bitmap_part inf lcd_putsxyofs, which means drawing a native bitmap instead of bw. The real rendering would happen when caching the font: Then the bitmap font file would be loaded and the font would be rendered in the foreground color against a background in the background color. Only pixels which are completely transparent will then be set to the transparent key color.
On plain backgrounds, like they are used in many wps the appearance will be identical to real anti-alias. On background which have not much colors (which are used in most wps) the difference to real anti alias will propably be invisible.

The main drawback for this approach is the memory usage. It will increase 16 times for most targets. Which means its propably not applicable for large fonts. But since anti alias and especially subpixel hinting increase readability mainly for very small fonts this shouldn't be a problem either.

Attached is a picture illustrating the differences between real and fast anti-alias on a variable backgound.
Note: To really see the difference you should copy the image to your player and examine it there.

Btw I don't require rockbox to have anti alias, Its great without. And doesn't necessarily need it. But it's technical possible and the appropriate task shouldn't have been closed. No problem if no one picks it up. Heck, I might at some time even try it myself when I finally understand the rockbox architecture (but that might take some years).
   alias.png (13.5 KiB)
This task depends upon

Closed by  Björn Stenberg (zagor)
Friday, 12 December 2008, 15:24 GMT
Reason for closing:  Invalid
Additional comments about closing:  Closing all feature requests.
Comment by Bryan Childs (GodEater) - Monday, 10 September 2007, 14:29 GMT
I can't actually see any difference there at all.
Comment by Jack Suter (chrisjs169) - Monday, 10 September 2007, 15:26 GMT
You need to zoom in...a lot:
Comment by Bryan Childs (GodEater) - Tuesday, 11 September 2007, 12:25 GMT
Yes, I see that. But the point I'm making is that your original image is much closer to the original size of a DAP screen. So unless you're whipping a magnifying glass out whilst on the bus, or holding the display an inch from your eyes - what would this change actually buy you in real world usage ?
Comment by Hendrik Siedelmann (Hellworm) - Tuesday, 11 September 2007, 16:33 GMT
That's the old discussion about font rendering. Look at it on your DAP, I normally look at my h300 from half to third the distance than at my screen. I can see a clear difference, the letters are less jerky. But if you can't see the difference or find it negligible then you don't need AA.
Comment by Thomas Martitz (kugel.) - Sunday, 14 October 2007, 16:37 GMT
I saw the difference on the non-zoomed pic on the first look.
I highly support anti-aliased fonts.
Comment by Jonathan Gordon (jdgordon) - Monday, 15 October 2007, 05:41 GMT
im inclined to close this because as you say its been rejected in the past...
BUT.. seen as you say its technically feasible, and should be fast, ill leave this open in the hope a patch is attached... shouldn't take more than 5 minutes right?
Comment by Archit Tamarapu (Crash91) - Saturday, 10 November 2007, 14:41 GMT
I want AA too, it will let one use more fonts that look better, as the majority of font on computers use AA.
Comment by Alain Trinh (Soaa) - Tuesday, 04 December 2007, 20:53 GMT
I think this would be a great feature, especially for players with bigger screens. Small fonts on small screens look better without antialiasing, but bigger fonts on bigger screens definitely look better with AA.

A way to limit memory usage would be to use grayscale rendering (no subpixel rendering) with less gray levels. 8 levels should be fine, so 3 bits per pixel? That's only 3 times more memory.

Looking forward to this.
Comment by Paul Bransford (draeath) - Tuesday, 12 August 2008, 22:39 GMT
Definitely agree with this idea. Additionally, I agree that vector fonts would not be required and would be overkill.