Draining the font swamp
Phillip Susi
psusi at cfl.rr.com
Mon May 21 19:09:12 UTC 2007
Matthew Garrett wrote:
> On Mon, May 21, 2007 at 10:52:46AM -0400, Phillip Susi wrote:
>
>> 3) Performance suffers. The X server is in the best position to render
>> fonts using any hardware acceleration provided by the video card, and
>> allows for those fonts to be shared by all applications, reducing
>> duplication and waste. Also for remote X sessions, you want the fonts
>> rendered on the server so much less data needs exchanged between the
>> client and server.
>
> Measurements have shown that over pretty much any sort of common
> network, latency is more of a problem than bandwidth. Server-side fonts
> require multiple round-trips between the server and the client for
> rendering, whereas client-side fonts only require the initial display.
> Performance-wise, we have the XRender extension for precisely this sort
> of situation.
How does server side fonts require more round trips? It should amount
to a single message that specifies what font to use, what text to
render, and where. With client side fonts, the client has to have the
fonts in the first place, then has to render them, then send them as a
bitmap to the server. If you want to do things like anti aliasing, then
the client has to read a bitmap from the server, then render the font
into it, then send the resulting bitmap back to the server. Seems to me
that client side fonts require more round trips, not the other way
around. Not to mention that you end up having every client rasterize
the same glyph over and over, rather than reuse the work done by another
client that already drew that character in that font and size.
> Font choice and layout is hard, and doesn't become any easier just
> because you've moved that code to a binary that runs as root. Nobody is
> going to argue in favour of putting a layout engine like Pango in the X
> server, and most of the rest of the stack is similarly well outside the
> scope of the X server. The client-side font revolution happened 5 years
> ago, and we've ended up with massively improved font support as a
> result.
Right, but why? I see no technical advantage to having the fonts client
side; only disadvantages.
More information about the Ubuntu-devel-discuss
mailing list