[Pixman] font rendering

Gerd Hoffmann kraxel at redhat.com
Thu Mar 7 06:50:52 PST 2013


  Hi,

Is there documentation somewhere describing what the pixman ops exactly do?

Background:  I'm trying to figure the best way to do font rendering with
pixman.  Use case is the qemu vga text mode emulation.  I have 4 pixman
images involved:

  (1) The (virtual) vga framebuffer, in PIXMAN_x8r8g8b8
  (2) The vgafont glyph, in PIXMAN_a8r8g8b8,
      with 0xffffffff / 0x00000000 for font/background pixels.
  (3) The foreground (font) color, created using
      pixman_image_create_solid_fill()
  (4) The background color, likewise created using
      pixman_image_create_solid_fill()

What I'm trying now is this:

    pixman_image_composite(PIXMAN_OP_SRC, bg, NULL, vgafb, ...);
    pixman_image_composite(PIXMAN_OP_OVER, fg, glyph, vgafb, ...);

So the first op fills with the background color, and the second renders
the character.  Comes close to what I want.  Except that the second
blends the foreground color with the background color instead of
replacing it.

If I try to fix that by using SRC instead of OVER in the second call the
foreground color is correct, but the background gets filled with black.
 Hmm.  Also not what want.

Guess I'm either trying the wrong op or doing something wrong with the
glyph mask.  Hints anyone?

thanks,
  Gerd


More information about the Pixman mailing list