On Mon, 1 Oct 2007, Eeri Kask wrote:

Here are patchsets (against Xorg twm release 1.0.3) completing and
polishing Xft support for twm (and improving the icon manager):

(1) twm-1.0.3-diff1.MyFont_ChangeGC.tgz
to my knowing has not changed from last time: cleans up bitmap font drawing.


(2) twm-1.0.3-diff2.TWM_USE_XFT.tgz
introduces Xft support (replaces bitmap text rendering functions with
xft-font rendering). [Compile with -DTWM_USE_XFT to activate.]

This leaks memory in the form of XftDraw structures that never get released. I've reworked this to fix that problem, and also to re-instate "core" font support even if TWM_USE_XFT is #define'd. If a font cannot be found through libXft, it will be looked for through the older standard mechanism.

(3) twm-1.0.3-diff3.Spacing.tgz
(Vertical) spacing corrections; having scalable fonts one should use
"scalable spacing" as well, otherwise one day having 600x600 dpi screen
vertical spacing of, e.g. 4 pixels, results in text line distance of
zero. Now baseline skip is computed like 1.2 times font height or something.

I would prefer that this be done only for Xft fonts, or, better, be made configurable.

Maybe here some spacing corrections need to be done as some ttf-fonts
may include "bad metrics". I have mostly tested with bitstream vera
fonts.  (E.g. Apple's Lucida Grande looks vertically definitely too tight.)

I don't believe fonts with bad metrics should be dealt with in twm.

(4) twm-1.0.3-diff4.TWM_USE_OPACITY.tgz
If you value transparency in twm menus and icon manger/icons, apply
this. This patchset introduces "MenuOpacity" and "IconOpacity" keywords
having integer values in range 0...255. [Enable with -DTWM_USE_OPACITY]

As stated previously, this will not be integrated as it relies on X.Org-specific functionality.

(5) twm-1.0.3-diff5.Appearance.tgz
Here lies probably the most radical change I have made to twm: the
iconmanager painting DrawIconManagerBorder() is now
DrawIconManagerEntry() and draws the iconmanager entry in full. This
work is not completed yet.

I'm inclined to delay this one until it is complete.

This patchset introduces "DefaultFont"
keyword. The default font was up to now like some orphan parameter not
configurable by the user and in the same time used prominently in
rendering InfoWindow/SizeWindow text. (Letting it be "fixed" as in
bitmap rendering would cause twm become non-usable in whole as
XftFontOpenXlfd() (at least the installed library I have to use) is not
able to load that font, so something needed to be done anyway. Lacking
any better idea now by default DefaultFont is set to "mono-10" if XFT is
compiled in.)

My rework of your second change fixes this.

(6) twm-1.0.3-diff6.Fixes.tgz
Here are bugs I encountered in twm as improving icon manager
functionality; some are serious.

Such as?  Please be more descriptive.

(7) twm-1.0.3-diff7.Improvements.tgz
Here are some improvements to the icon manager. The old behaviour is
kept as long as "WarpCursor" is not defined: actually the meaning of
this variable is broadened in the sense that everywhere where warping
mouse makes sense, this is done:

(*) if some client window has focus and this client opens a transient
window, then mouse is transfered there; like in password prompt and
file-open dialogs (this is a valuable idea from vtwm);

(*) if iconifying some client window and the icon manager is currently
mapped, the mouse is transfered into the corresponding icon manager entry;

(*) if executing f.hideiconmgr transfer mouse into the corresponding
client if some iconmanager entry was "active".

(*) iconmanager navigation functions raise the corresponding client
windows as stepping around entries.

OK, except that, as you currently have it coded, that last one does not depend on "WarpCursor". Is that intentional?

P.P.S. How to put TWM_USE_XFT, TWM_USE_OPACITY into autoconfig or Imake
if you are interested please kindly help as not coming from software
development it is a little complicated. (Few weeks ago I only learned
how to use 'diff'.)  :-)

The "automangle" suite isn't a concern here, and my integration of these changes, as it currently stands, already takes care of imake.


|  Marc Aurele La France           |  work:   1-780-492-9310          |
|  Academic Information and        |  fax:    1-780-492-1729          |
|    Communications Technologies   |  email:  [EMAIL PROTECTED]         |
|  352 General Services Building   +----------------------------------+
|  University of Alberta           |                                  |
|  Edmonton, Alberta               |    Standard disclaimers apply    |
|  T6G 2H1                         |                                  |
|  CANADA                          |                                  |
XFree86 developer and VP.  ATI driver and X server internals.
Devel mailing list

Reply via email to