Re: font renderers in gdk
- From: Paolo Molaro <lupus lettere unipd it>
- To: gnome-list gnome org
- Subject: Re: font renderers in gdk
- Date: Tue, 27 Jan 1998 12:32:39 +0100
On Tue, Jan 27, 1998 at 03:07:39AM -0800, Christoph Toshok wrote:
> Hey all,
>
> spurred by raster's comments about FnLib and anti-aliased fonts, I've
> hacked a font renderer abstraction into gdk.
That's fine!
Two comments: some font libs (t1lib for example) requires some
initialization (eg the pathname to a config file).
You want to expose that maybe with a:
+ gint (*Init)(GdkFontRenderer*, gchar* config_spec);
The other thing we (I?) need is rotation: t1lib can do that
and so freetype, AFAIK.
+ void (*RenderStringRot)(GdkFontRenderer *, GdkDrawable *,
+ GdkFont *font,
+ GdkGC *gc,
+ const gchar *string,
+ gint length, gint x, gint y, gfloat angle);
> The function gdk_font_load now checks if the font_name begins with
> "font:" or "fontset:". If it does, it dispatches through a list of
> registered font renderers until it finds one that actually knows about
> the font. If it doesn't begin with one of those two strings (such as
> in the case of XLFD's), it uses the default font renderer, which is
> uses XFontStructs/XFontSets.
It can be useful to have a backup scheme: if the fontload routine
doesn't find a font, it should look for the nearest available
(this is hard, I know) and of course it should notify the programmer
as well...
> font:/VeryCoolFont?point-size=24&weight=bold&slant=italic
>
> Mind you, this format isn't set in stone... In fact, no code has been
The simpler, the better (this is going to be exposed to the users...).
> The X font renderer is compiled into gdk (but doesn't necessarily have
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is important: the default should be compiled in.
lupus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]