[forum] some XFree86 5.0 questions...

Owen Taylor forum@XFree86.Org
20 Mar 2003 17:40:42 -0500


On Thu, 2003-03-20 at 16:48, Martijn Sipkema wrote:
> [...]
> > Well, speaking for GTK+ as a project, I think it's highly unlikely
> > that GTK+ will ever support STSF... not just because Xft and
> > fontconfig are working well for us, but also because STSF's basic
> > architecture seems to be unsuitable for using with Pango.
> > You could probably use STSF as a backend for Pango, but it's always
> > going to be a really, really, slow backend for Pango. (*)
> 
> [...]
> > (*) Pango needs it's backend to be able to lay out short strings
> >     as fast as possible. But every separate string you pass to
> >     STSF could be a round trip to the STSF server. And if 
> >     you dropped the client-server nature of STSF, well, then
> >     I can't really see the point of STSF at all.
> 
> To be honest, this really is not my area of expertise, but I felt
> a font server was the better approach. It seems this may have
> performance issues. Are there any papers you know of on this issue?

Some of Keith Packard's Xft papers discuss why, when you are
doing layout on the client side, you want the fonts on the
client side; they are usually available from http://keithp.com,
but seem to be temporarily unavailable.

I don't know of any public write ups of why you want the
*layout* of the client side. Very simplistically:

 - Round trips are bad; things perform much better if
   the client only sends stuff to the server and never
   has to wait for anything. This is rule #1 of networked
   computer graphics.

 - Starting with the text on the client side, we need
   to get two results:

    - The text rendered on the server
    - Detailed information about where all the characters
      ended up, so you can display cursors, do hit
      testing, and so forth.

 - If you do the layout on the server side then you 
   have to send the text to the server, wait for the
   server to lay it out and send it back. One round
   trip for every chunk of text.

Also, it should be noted that display is pretty much
irrelevant for text layout performance ... what is 
hard are things like computing the wrapped height of a 200k
text buffer. So, if you can make the network only a 
factor for display, and not for layout, you are much
better off.

Regards,
                               Owen