Donnerstag, 12. Juni 2008

subpixel antialiased text:

1. Thanks to Phil Race I was able to get subpixel-antialiased text mostly woring:

1. Subpixel antialiased - Reference Implementation
2. Subpixel antialiased - XRender
3. Grayscale antialiased - XRender
4. No antialiasing - XRender

When you compare the RI (first line) and XRender (second one) you'll notice XRender looks a bit more bold, this is missing gamma correction which is done by the software-loops to match MSWindows's behaviour, but I am unsure wether XRender does support this feature.
If it does not support it I hope quality will be good enough this way to enable it by default (at least, its good enough for all other X-based apps), with accalerating drivers performance for sure is >500% better than with the software-based approach.

Thanks again Phil for beeing that helpful :)

2. Another thing I did today was making my glyphcache play nice with other JDK-internal classes.
I chose a array-based approach compared to the linked-list one when I implemented it, however I use realloc and GlyphInfo holds a direct pointer to its cache-entry which is the dangling arround.
The array-based approach also has its benefits (e.g. better cache locality), so I now simply update the pointer to it after doing realloc (which should almost never happen).

Whats missing for text-accaleration:
  1. Well for text its support for absolute positioning, which should not be too much work because most of the existing code is prepared to support it.
  2. Allocation-checks to not fail if memory-allocation fails.
  3. Gamma correction, although I am unsure if this can be implemented on top of XRender at all.

Keine Kommentare: