TWM: truetype support
Eeri Kask
Eeri.Kask at inf.tu-dresden.de
Tue Sep 18 10:27:01 PDT 2007
Jens Stroebel wrote:
> This is probably a nice idea; however, could you please, please make
> this optional (keep the ability to build twm w.o. freetype font support
> alive)?
Hello guys,
Finally I have completed the truetype font support for twm in extracting
the following out of the last week patches:
(1) Font rendering interface cleanup in current twm:
* MyFont_ChangeGC() functionality downshifted into
MyFont_DrawString(), MyFont_DrawImageString()
and this function as it is is removed.
* Couple of "Pixel fore, back;" replaced by "ColorPair col;"
structure as this is for what it was probably meant.
So if applying *.diff1 patches in twm-1.0.3-MyFont_ChangeGC.tgz against
a clean twm-1.0.3 source distribution nothing should change in twm
functionality, neither in appearance nor in speed. That is the intention.
(2) Patchset in twm-1.0.3-TWM_USE_XFT.tgz applied onto (1) introduces
truetype fonts into twm, cleanly enclosed in "#ifdef TWM_USE_XFT".
(So compile with -DTWM_USE_XFT -I/usr/include/freetype2 -lXft)
Hopefully all bugs I have introduced come in with (1) so anyone eagerly
wanting to test please try to screw twm having only applied (1).:-)
In applying (2) one essentially replaces XmbDrawString() by
XftDrawString8() for text rendering in util.c and basically that's it.
This means, any performance degrading or huge memory footprint you are
going to observe from now on will hopefully reveal problems only in the
xft-subsystem and not in twm.
As next I'll try to finish the menuwindow and icon manager text
rendering cleanups and opacity patches (as a mere joke) in coming days.
Then as a serious work the function execution framework needs to be
overlooked, for instance it is confusing as long as
Function "RaiseNextWindow" {
f.showiconmgr
f.raise
f.downiconmgr
}
and
Function "RaiseNextWindow" {
f.showiconmgr
f.downiconmgr
f.raise
}
show identical behaviour, and one wonders if it is some bug, or expected
twm behaviour.
> TWM is not a WM which gets used by a broad userbase and I don't think
> that will change, whatever the look of the fonts is like. It's very
> simplistic and not exactly suited for todays world of
> WM-has-to-integrate-with-desktop; correct me if I'm wrong, but I don't
> think these wmhints thingies are all present there...?
>
> It is, however, the WM which is present on a host which has a basic
> installation of xorg. It allows to test minimum requirements (does X
> start, does keyboard work.. etc.) without too many things interfering.
Yes I do agree mostly. Though it appears some (me included) rely and
depend on something "simple" like twm in their everyday work, which
usually has to go beyond, i.e. being unrelated to, testing X11
installation integrity. (The latter case would be pitiful, as twm is
unjustifiably obviously undervalued in that position.) So if twm --
besides having truetype font support -- only had a modern, comfortable
keyboard-driven UI (which only means some icon manager and focus
tweaks), then it would be for those a perfect "window manager" (windows
in the sense of the X11 wire protocol).
I am confident the above goals can be reached with very few strokes into
the current twm codebase.
Greetings,
Eeri Kask
P.S. As a side note, the above patches applied I easily turned a
pentium-2 based weather tracker into a quite decent-looking scientific
workstation. :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twm-1.0.3-MyFont_ChangeGC.tgz
Type: application/x-compressed-tar
Size: 5724 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070918/2c7582cd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twm-1.0.3-TWM_USE_XFT.tgz
Type: application/x-compressed-tar
Size: 5899 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070918/2c7582cd/attachment-0001.bin>
More information about the xorg
mailing list