[9372] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Hershey fonts are now supported!!

daemon@ATHENA.MIT.EDU (Owen Taylor)
Sat Oct 17 11:00:20 1998

To: serge@physics.unc.edu
Cc: gtk-list@redhat.com
From: Owen Taylor <otaylor@redhat.com>
Date: 17 Oct 1998 11:11:00 -0400
In-Reply-To: "Sergei O. Naoumov"'s message of "Fri, 16 Oct 1998 16:30:16 -0400"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


"Sergei O. Naoumov" <serge@physics.unc.edu> writes:

> Hi!
> 
> I just finished porting Hershey font support to Gtk. I got the bits and
> pieces from the GNU libplot, and adopted them. All the Hershey fonts (Roman,
> Cyrillic, Japanese, Symbols, etc.) are supported, as well as a little syntax
> parser, so one can freely write mathematical expressions. The picture is
> available:
> 
> 	http://www.physics.unc.edu/~serge/gtkhershey.gif
> 
> The question I have is this. If the maintainers of Gtk+ agree, this piece
> can be included into the core Gtk+, as there are only two functions: one
> sets the font parameters, and the other actually draws a Hershey string on
> an arbitrary drawable. Otherwise, I'll make a little add-on thing (I don't
> even know how to call it, for it is not a widget. Nor it is an application.)

No offense, but last time I looked at the Hershey fonts, they were
not exactly especially attractive. (My opinion - I've heard the
opposite from other people)

I tend to think that they are, in any case, too specialized
to go into core GTK+. However, people have, in the past
floated around ideas for putting plug-in font renderer support
into GTK+, and I think that might be the way to go.

The issues that come to mind that would need to be addressed
for plug-in support are:

 - Naming. Perhaps one could use names like

   "XLFD:-*-charter-*-r-*-*-*-180-*-*-*-*-*-*"
   "Type1:TimesRoman-14"

   But this doesn't allow any sort of closest matching or subsitution

 - Metrics: X suports a decent range of font metrics, that
   probably could be approximated for any font renderer. But
   other font systems include even more - and also some font
   renderers may want non-integer-valued metrics.

 - Non-metric information. Quickdraw GX, as an extreme example
   stores a lot of information about things like ligatures
   and line breaking within the font.

 - Extra drawing parameters. (Rotation, Multiple-master axes,
   antialising, etc.)

Probably the first order of business would be deciding
which of the above could be ignored. Perhaps all that is
necessary is simulating X's font routines - a 
illustration or page-layout program might well want to
use its own font system in any case.

Regards,
                                        Owen

 

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post