Re: Xft

  • From: Tor Andersson <tor.andersson@xxxxxxxxxxx>
  • To: wilyfans@xxxxxxxxxxxxx
  • Date: Fri, 19 Jul 2002 21:36:58 +0200

ozan s yigit <oz@xxxxxxxxxxx> wrote:

> > I am considering rewriting the graphics so that it draws
> > subpixel positioned, unhinted, anti-aliased text, with kerning.
> > Oh, and add support for colors and get rid of the flickering
> > when scrolling while I'm at it.
> sounds like wordprocessor-grade text handling. hmm.

"Hmm"? All I want is a good editor that works as well as Acme/Wily and
doesn't hurt my eyes with crude bitmap fonts. I will not settle for less...

> i'm not sure what kind of graphics API changes you have in mind, but
> my sincere wish would be to make them more compatible (including careful
> supersetting) with plan9, not less (see the current plan9 4e), so that
> wily is more like acme in its graphics (with color), and the libraries are

To render text the way I want requires using floats or fixed-point ints.
The important thing is to not snap the character to pixel coordinates
before rasterizing the outline. I don't see how that can be done without
deviating from the apis plan9 use.

charwidth, strwidth, and string for example would need to use floats
instead of integers. a kernchars would have to be added. clients of these
functions would need to be fixed. Subfont would need to contain extra data
for kerning. Cachesubf/Subfont would need to cache the rendered bitmaps
for a selection of subpixel positions (4 or 8 versions of the same char,
rendered with varying offsets [0..1] from the integer coordinates).

In fact, it might be worthwhile to approach the plan9 developers
about incorporating any changes into plan9 as well.

The current libg doesn't use porter duff alpha compositing, which would
need to be added in order to support anti-aliasing (faked or not).

> still usable by sam, 9term and any other program that presently use 9libs
> [there could be some we don't know about - 9libs has been around for a long
> time and is included in some bsd ports collections) or we wish to bring

I was under the impression that most of these programs used libframe and
didn't draw text directly. Of course, I could be mistaken. Then again,
my main concern is with Wily. 

> over from plan9. you should also get in touch with Mark Wilkinson
> <mhw+wily@xxxxxxxxxxx> who had been keeping an eye on 9libs for
> enhancements...

I'm relatively new to this list; is here here?


  • Follow-Ups:
  • References:

Other related posts: