Re: ISO-8859-2 fonts



The biggest problem is, that, using GdkCanvas, we have to draw fonts via
pixmaps - it means generating loads of pixmaps on X server in case you
happen to have many fonts - and it can become real show-stopper in
some real-world situation (my XFree4.0 16MB server seems to handle
3-5 fonts well - but how about different X servers etc.)

Well, you could always render the entire font into a single pixmap on
the server, like this:

        ABCDEFGHIJKL.....

And at rasterizing time you do:

draw_text (GdkDrawable *dest, GnomeFont *font, int x, int y, char *text)
{
        char *p;

        while (*p){
                RenderInfo *ri = font->rendered_info [*p];

                gdk_copy_region (dest, x, y, font->pixmap, *ri->x, 0);
                p++;
        }
}

Does this sound like a reasonable plan for avoiding having thousands
of pixmaps?

I hope that most X servers can handle that load. If it turns out to be
a problem, we have either to use antialased canvas, or wait for new
X rendering extensions, in which case gnome-font will be responsible to
supply X with fine-tuned fonts anyway.

Yeah, but this will only be deployed in a few servers, we need to
support all X servers, so we would still need a fallback mechanism.

Miguel.




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