Hi all, I've been poking through the Freetype API docs, and I have a couple of questions about how subpixel rendering is usually done. I'm hoping someone can either confirm or correct my assumptions, and then point me in the right direction for what I'm looking at doing.
My guess at the current way for doing subpixel rendering is: - FT_Render_Glyph(slot, FT_RENDER_MODE_LCD), which gives a greyscale result 3x wider than needed in slot->bitmap. - Map resulting bitmap as an RGB (or BGR) buffer, so that individual buffer array elements turn into sub-pixels when rendered. So, if that's the normal way to do things, my question is: what are people doing to do proper subpixel rendering on "weird" LCD displays, like the PenTile display used in the Nexus One? (http://blog.javia.org/nexus-one-display-and-subpixel-pattern/) My guess would be: - render with FT_RENDER_MODE_LCD. - filter resulting bitmap so that normal (r,g,b) triplets in the bitmap are "converted" to: big_pixel = (old[0] + old[1]) / 2 new[0] = big_pixel new[1] = old[2] new[2] = big_pixel This seems pretty awkward, but I'm unsure of a better approach after a naive first look at it. Can anyone on the list suggest a better approach? Thanks! _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
