Hi,
using premultiplied fonts saves time on blitting the glyps to the surface, it will cost you some time rendering the glyphs but this is normally just a minor investment compared to the gain. In principle, premultiplication should be "on" for all formats, but I assume the test has been included since it makes no sense for A8; in effect, it used to be only ARGB until ARGB4444 was added, so I guess the check needs to be extended again. I am not sure why it cannot be premultiplied always, though..

hth
Niels

stas wrote:
Hi all.
  Question is about src/core/fonts.c:100
"if ((font->pixel_format == DSPF_ARGB || font->pixel_format ==
DSPF_ARGB4444) && dfb_config->font_premult)
          font->surface_caps = DSCAPS_PREMULTIPLIED;"
As I see premultiplication is available only with two pixel formats.
What is the main reason for this boundaries? I see no barriers to allow
premultiplication for other formats (with adding support to
IDrirectFont/*).

  I write gfxcard driver for one device. Device supports only RGBA*
pixel formats. So, to allow blit operation with COLORIZE flag (render
some text) I really need fonts to be premultiplicated. Setting
dfb_config->font_format to ARGB4444 solves the problem, but it's a work
around and that is not cool.


--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to