TWM: truetype support
Eeri.Kask at inf.tu-dresden.de
Wed Sep 12 05:07:21 PDT 2007
Here is probably the right place to ask all twm users what do you think
about freetype font support in twm window manager in order to give it a
contemporary look? :-)
Enclosed is a small patchset (against official 1.0.3 release) as a
prototypical proof of concept regarding this idea; how it would look
like one can see at
What I basically did, is
(1) shifted MyFont_ChangeGC() down into MyFont_DrawString() and
MyFont_DrawImageString() respectively (generally no problem,
PaintEntry() in menus.c needed closer attention);
(2) changed slightly menuitem color data in "struct MenuItem" and
"struct MenuRoot" for the sake of MyFont_DrawString() and
MyFont_DrawImageString() forwards/backwards interface compatibility in
regard to the current bitmapped font rendering.
(3) minor one-liner corrections here and there.
The heavy work is enclosed in "#ifdef XFT_SUPPORT" so if undefining you
can return to bitmapped rendering anytime (though, using the modified
MinuItem color interface).
The compiler needs CFLAGS to include
and the linker -lXft.
There is an extra bonus hidden for the curious, -DOPACITY_SUPPORT
activates twm-menu opacity feature if 'xcompmgr' is running in the
background (having X11-composite extension enabled). :-)
into .twmrc and ... enjoy!
P.S. I am aware this work is not finished/polished, so please help
complete designing MyFont_DrawString(), MyFont_DrawImageString()
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9116 bytes
Desc: not available
More information about the xorg