Re: TrueType and Gnome



nelson@media.mit.edu (Nelson Minar) writes:

> But there's another interesting option. Rasterman says:
> >you could always use freetype directly like E does to get anti-aliased
> >fonts.. :) then you have control at the aplication level.. :)
> 
> I really like this idea. The problem is that X doesn't support
> anti-aliased fonts and isn't likely to anytime soon (X fonts are
> inherently monochrome, see the xfsft home page). So instead of using X
> fonts, why not build a new client-side string renderer for Gnome?
> Gnome apps that chose to then could have spiffy anti-aliased fonts on
> the screen. It will be slower, but maybe not too much so on the same
> machine. It might suck badly across the network.
> 
> Anyone care to guess how hard this would be for a relatively simple
> application, say gnome-terminal? Does eterm do this already? Does
> anyone else think this is a good idea, or am I crazy?

I think a good way of doing this would be to add anti-aliased font
support to GDK.  That way all GTK applications would be able to use
anti-aliased fonts without modification, or possibly with a single
line (gdk_turn_on_text_antialiasing() or whatever).  And applications
wouldn't have to bother with questions like "does the system I'm
running on have TrueType support or not?"

This would be done by changing the gdk_draw_{text,string} functions --
make them check if they are drawing on an appropriate visual, and if
so make them draw anti-aliased text.

Also, non-TrueType scalable fonts can be anti-aliased as well, by
drawing to an invisible drawable in a larger size and then scaling
down with supersampling.  If this was done we would probably also have
to change the functions that return sizes (gdk_text_width etc) in case
the scaled-down font ended up being a slightly different size than the
original.  This approach would work for any font type, including
TrueType if it was supported by the X server or font server.

Incidentally, gnome_terminal would normally use bitmapped fonts, which
would be unsuitable for anti-aliasing (unless something like Type 1
Courier was being used).

-- 
Andrew Smith
amsmith@hempseed.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]