Re: font renderers in gdk
- From: raster redhat com
- To: owt1 cornell edu
- cc: gnome-list gnome org
- Subject: Re: font renderers in gdk
- Date: Tue, 27 Jan 1998 18:25:58 -0500 (EST)
On 27 Jan, Owen Taylor shouted:
->
-> Christoph Toshok <toshok@Hungry.COM> writes:
->
-> > struct _GdkFontRendererVtable
-> > {
-> > gint (*GetAPIVersion)(GdkFontRenderer *);
-> > const gchar* (*GetName)(GdkFontRenderer *);
-> > const gchar* (*GetVendor)(GdkFontRenderer *);
-> > const gchar* (*GetVersion)(GdkFontRenderer *);
-> > const gchar* (*GetBlurb)(GdkFontRenderer *);
-> > gint (*CountFonts)(GdkFontRenderer *);
-> > gint (*ListFonts)(GdkFontRenderer *, const gchar **font_specs);
-> > GdkFont* (*LoadFont)(GdkFontRenderer *, const gchar *font_spec, gint is_fontset);
-> > void (*DestroyFont)(GdkFontRenderer *, GdkFont *font);
-> > void (*RenderString)(GdkFontRenderer *, GdkDrawable *,
-> > GdkFont *font,
-> > GdkGC *gc,
-> > const gchar *string,
-> > gint length, gint x, gint y);
-> ^^^^^^^^^^^^^^
->
-> For antialiased text, "phases" (non-integer coordinates) are essential
-> to get really good results.
->
-> And as somebody pointed out, rotation should probably be in here
-> too. (How many people know that X11R6 supports rotated fonts? (but
-> not rotated text strings, unfortunately))
Actually.. I do.. :) but I'm just cray enought to want to know these
things:):) (the matrix XFLD- tranforms - just use a matrix transform on
your font chars - it only affects the chars. You have to draw each by
hand and calculate new co-ordinates - I actually wrote a library to do
this - libFont, but scrapped it and staretd on libFn. I was just way too
unhappy with X's font mechanisms).
->
-> > void (*GetAscentDescent)(GdkFontRenderer *, GdkFont *font, gint *ascent, gint *descent);
-> > gint (*GetAdvancement)(GdkFontRenderer *, GdkFont *font, gchar *character, gint length);
-> > gint (*GetMaxAdvancement)(GdkFontRenderer *, GdkFont *font);
-> > gint (*StringWidth)(GdkFontRenderer *, GdkFont *font,
-> > const gchar *string, gint length);
-> > gint (*FontEqual)(GdkFontRenderer *, GdkFont *fonta, GdkFont *fontb);
-> > };
->
-> [...]
->
-> > Would you guys be interested in something like this? Do you think the
-> > Gdk guys would be (are there any gdk guys on this list?) If anyone is
-> > interested in diff's to the gtk+ tip, let me know.
->
-> As one "GTK/GDK guy" I'd say that I think people would be interested
-> in this type of thing in GTK (though not exactly immediately).
-> But I'm not sure that keeping the same API and only modifying the
-> internal is the right way to do things.
->
-> X's font handling is quite primitive, and if we want to start
-> adding rendering on the client side, we should provide something
-> better. Something things to look at:
->
-> The two available free engines
-> - t1lib
-> - FreeType
->
-> And QuickDraw GX, which by general consensus has the best typographic
-> model ever made publically available.
->
-> Of course, I don't know if GTK needs to be _that_ good. But it
-> shouldn't be limited by the current X font model.
I agree, but it is a step forward - much better than anything sofar. I
will work on Fnlib for full color font support, others may with to work
on another lib using Freetyp or t1lib for anti-aliased fonts. This is
going to be a big task on its own, so I may wait a while. I have other
issues on my plate at the moment.
-> Regards,
-> Owen
->
->
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com /\___ /\ ___/||\___ ____/|/\___ raster@redhat.com
Carsten Haitzler | _ //__\\ __||_ __\\ ___|| _ / Red Hat Advanced
218/21 Conner Drive || // __ \\_ \ | | \ _/_|| / Development Labs
Chapel Hill NC 27514 USA ||\\\/ \//__/ |_| /___/||\\ 919 547 0012 ext 282
+1 (919) 929 9443, 801 4392 For pure Enlightenmenthttp://www.rasterman.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]