Re: [gtk-list] Re: GdkFonts (or rather, fonts in X)



Havoc Pennington wrote:
> 
> Derek Simkowiak <dereks@kd-dev.com> writes:
> >       Is it possible to display scaled fonts with anti-aliasing?  If so,
> > how?
> 
> No.

The X server XFree86 in version 4.0 will be able to print text with
antialiasing,
by using a new subsystem. In other words, it will only benefit new applications
or applications that use an updated version of a toolkit that would perform
the rendering.
GDK can be modified to use these new features in XFree86 4.0 and then all
GDK/GTK
applications would have antialiased text.

In fact, it is possible for a GTK theme to override a function in the call chain
with a function that would draw antialiased text. (GtkStyleClass::draw_string())
I was thinking of doing that in my own GTK theme (Xenophilia) which would print
a
specific font with antialiasing.

> >  Can I "scale" a bitmap font?
> 
> GnomeCanvasText does the following:
>  - draws all characters in the bitmap font to a Pixmap
>  - copies the Pixmap to an XImage
>  - grabs the pixels from the XImage
>  - scales the whole font as a single huge bitmap
>  - draws characters by copying out regions of the huge bitmap

I have seen X/GDK do the same thing, i.e. scale up bitmap fonts.
For instance, in your .gtkrc you can set it to use a bitmap font with a size
that it
does not have and then X will take the closest font and scale it.
I don't know which functions to call, or how to call them in order to get
scaled bitmap fonts.

Regards
/ Johan
  -- johan@tiq.com -- http://www.obsession.se/johan/ --



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