Hello,
I have perhaps a seemingly useless feature request at first, but I
think it is really useful for those people (like me;) who like to have
pixmap backgrounds in a terminal. I have it more or less working in
urxvt now with an ugly hack:
Line 2370 in screen.C, instead of drawing the font once, i do it three
times, like this:
font->draw (*drawable, xpixel, ypixel,
text, count, fore, Color_transparent);
font->draw (*drawable, xpixel + 1, ypixel + 1,
text, count, Color_Black, Color_none);
font->draw (*drawable, xpixel, ypixel, text,
count, fore, Color_none);
- The first drawing action makes sure that the entire character space
is overdrawn (if i omit this one, I can get lines due to the previous
locations of the cursor). This call should very well be a draw command
for whitespaces only, or a background redraw only.
- The 2nd one redraws the character, but always in black and displaced
one pixel to the right and one pixel below. The background pixels aren't
drawn (Color_none)
- The 3rd one draws the original character over it
I would call this effect "font shading" and it should only be active
on font glyphs rendered on a transparent (be it pixmap or some
pseudo transparency) background, not when fonts are rendered with a
solid color background.
The difference between the original urxvt and an altered one is
demonstrated here: http://www.chromis.nl/vanalles/demo.png ; note
that I have used a very bright and colorful pixmap for solely
demonstration purposes.
My ugly hack doesn't work 100% well, because the shade won't be drawn
for font pixels at the right and lower bound of the character, but most
characters seem to work in practice and the readability is improved.
I also may have introduced an overflow when drawing takes place in
offscreen pixmaps where double buffering is concerned. Oops!..but the
concept for demonstration purposes works.
I assume that there is a better way to implement this. I did
this hack very quickly, but I suppose that altering the font rendering
system (rxvtfont.C?) may have been a better solution. A wild guess is
that this technique may pose some minor problems with anti aliased
fonts. Perhaps another nice feature would be to render the shade in a
transparent way (ie. with an alpha channel), instead of black.
This is not a new idea, however. Some other terminals already support
it. I haven't seen support for it in (u)rxvt, unless I really missed
some configuration option and unless I missed it in the code. I hope
that isn't the case or else this effort will surely be in vain :)
Is this perhaps an idea/feature that would be usefull in a future
release?
I think so ;)
Thanks for your time,
Greetings,
Raymond Dresens.
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode