I've been quiet for a while, that's because I needed to add
a string to rendertable converter to LessTif before I could work
on the Xft stuff.

I'll describe my current ideas below, the idea is to collect
feedback so feel free to "shoot".

1. Inspired by the IBM bidi implementation, I've added XmFONT_IS_XFT.

2. My idea is to allow you to specify some attributes through
   render tables. Doing so would trigger the font type to be
   XmFONT_IS_XFT which in turn triggers use of Xft.

3. Keith (Packard) told me that a problem I'd face is that Xft
   requires both the pixel value and the RGB value :

   Keith Packard wrote:
   > > I am also a bit puzzled about what to do with the color
   > > argument to the XftDrawString8 function. Is this an area
   > > that's incomplete in Xft ?
   > 
   > No, but it will be a pain for LessTif -- Xft requires both the RGB and
   > pixel values for each color.  If you look at what xterm does, you'll see
   > it actually requests the RGB values from the X server as the application
   > hasn't bothered to keep them.  An alternative is what xclock does; that
   > application creates a new string to XftColor resource converter which
   > saves both the pixel and RGB values.

   I have yet to start investigating this.

4. Making LessTif draw stuff using Xft seems to be a matter of
   finding all the places where the code currently checks for values
   like XmFONT_IS_FONTSET and adding a case for Xft.

   I imagine that this would be similar for Motif.

5. I've browsed the IBM bidi file for about 5 minutes; this gave me
   the ideas for the above. I'm not touching the OpenMotif source
   files myself, the only tool on my system that touches these
   is the compiler.

   I can design/implement Xft stuff in LessTif as a proof of concept,
   I'll need someone else to make similar patches for OpenMotif.

   I trust that that someone is free to read the LessTif sources
   and the work that I did for adapting it to Xft. If there would
   be a problem with that, I'm willing to create a Xft patch
   (to LessTif) that has more liberal license than the LGPL.

   Unless someone comes up with some kind of magic, I don't see
   what else I can do for OpenMotif without tainting myself.

6. I currently have a couple of quick hacks in the LessTif code
   that allow me to specify a Xft based font, and draw it in
   limited cases. For those who want to have a look (trust me,
   it's not yet worth it), it's test/Xm-2.0/rendition/test4.c
   in combination with changes to lib/Xm/XmString.c and
   lib/Xm/ResConvert.c .

7. I'll need to think about which resources to use to specify
   Xft fonts, and how to convert them.
   The Xft-capable xterm has
        option          resource
        [-fa pattern]   faceName
        [-fs size]      faceSize

   Are these the only two to worry about ?

Combining some of the above, setting a resource like
        *faceName: Verdana
        *faceSize:      14
would get many applications to start using Xft fonts.

By the way, use of Xft would give us anti-aliased font support.
Patches for Qt, Gtk+, Mozilla, Wine, OpenOffice and others exist
to get them to use Xft.

We want this for LessTif and OpenMotif too, don't we ?

As I said above, feedback welcomed.

        Danny

Andrew Josey wrote:
> On Sep 7,  7:33am in "Re: XmFONT_IS_XFT ?", Rick Scott wrote:
> > Danny, I added a extra list to the Cc:. That's the one where most of the action
> > seems to be, I'm not sure how many people are actually on the opengroup.org
> > list. I know it seems confusing, but the whole situation is confusing, why
> > should the mailing lists be any different :)
> 
> Agreed, It would be good to get them to feed into each other and vice versa...
> Open to suggestions on how to make that happen..
> regards
> Andrew

-- 
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page :     http://users.skynet.be/danny.backx
Projects:       LessTif (http://lesstif.sourceforge.net)
                Xbae    (http://xbae.sourceforge.net)
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif

Reply via email to