dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
433 stars 81 forks source link

Pango and Freetype2 backends force FT_PIXEL_MODE_GRAY #21

Open towolf opened 12 years ago

towolf commented 12 years ago

label: bikeshed

It would be cool it I weren’t forced to use gray antialias. My fontconfig sets rgba rendering and LCD filter. Is it wrong to assume that Pango can handle this automatically unless forced? Elsewhere I always get LCD filtered text with Pango.

Otherwise, I would prefer the built-in bitmap font. So either RGBA antialias or black and white.

dvdhrm commented 12 years ago

Hmm, pango should do it automatically, I think. I also cannot find anything about it in: http://developer.gnome.org/pango/stable/index.html

However, in the freetype2 backend I can simply use FT_LOAD_TARGET_LIGHT or FT_RENDER_MODE_LCD(_V) for improved hinting.

But all of this means that I have to add more blitting/blending functions to uterm. For LCD subpixel AA I need one alpha channel per color value, that is, 3 alpha channels. And for MONO I need another buffer format with one bit per pixel. It currently does not have high priority, though. I am sorry, but I will leave this open as enhanced control over AA-modes is definitely required at some time in the future.

Btw. how to you store this configuration? Is this part of "fontconfig"? I have never worked much with this so I have actually no idea how fontconfig loads these configuration files.

towolf commented 12 years ago

The three RGB decimated alpha channels are only needed when there’s compositing. Is that the case in kmscon?

But you need to handle the 3 times wider bitmaps that freetypes generates, as far as I remember. Not sure if libpango handles this for you.