Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2414) tileset font problems
Home

[Freeciv-Dev] Re: (PR#2414) tileset font problems

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Short via RT <rt@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2414) tileset font problems
From: Reinier Post <rp@xxxxxxxxxx>
Date: Fri, 29 Nov 2002 11:49:49 +0100

On Fri, Nov 29, 2002 at 02:17:16AM -0800, Jason Short via RT wrote:
> 
> [rp - Tue Nov 26 13:40:46 2002]:
> 
> > On Mon, Nov 25, 2002 at 03:45:16PM -0800, Jason Short via RT wrote:
> > > 
> > > Tilesets are allowed to specify fonts, but this system is broken in two 
> > > ways.
> > > 
> > > 1. The fonts are specified as X fonts, which many clients cannot 
> > > understand (and currently ignore).
> > > 
> > > 2. There are just a few fonts, and they are hard-coded into the GUI
> code 
> > > and use automatically by the GUI in many places.  For instance the
> "city 
> > > productions font" may be used on the radar screen for the intro freeciv 
> > > text, just for lack of anything better.
> > 
> > This suggests that all font names are hardcoded into the code.
> > But there are font configuration files: X resources for Xaw,
> > and ~/freeciv.rc for the GTK+ client.  The correct syntax of the latter
> > even changed aroudn the time 1.13.0 came out, as I noticed when I was
> > producing the FUADEC t-shirt.
> 
> They can be modified by the user.  But this isn't enough.  They need to
> be modified by the tileset.

Modified, perhaps.  Determined, no.  Relative specifications would help
specifications (e.g. both I and the tileset say "make all fonts 2 sizes
smaller than the default" and this would be applied cumulatively) but
I wonder if that would actually be good enough.

> > > Vasco had some ideas for solutions to #1: use CSS-style font 
> > > descriptions, or .ini-style font descriptions, which hopefully can be 
> > > interpreted by all clients.  I know little about this.

I know very little about fonts, but my strong feeling is that this
wouldn't produce sufficiently good results.

> > I don't think the Xaw client will ever be portable to a non-X GUI system,
> > so it seems to me that X fonts strings specified with X resources
> > are the correct way to specify its fonts.
> 
> But a single list of fonts cannot work for both a 20x20 tileset and a
> 128x64 tileset.

True, but I wonder if a single list of fonts can work for a 20x20 tileset
across different clients.

> This may be.  Perhaps the only way will be for the tileset to have a
> list of specifications, one for each GUI.  This would be very ugly.

It occurs to me now that font selections probably shouldn't vary with
the specific tileset used, only with the on the tileset *size*.

> True.  But if the font is properly specified in a way the GUI can
> handle, there is no reason the client shouldn't be able to use a generic
> struct font *.

I have to admit, I only use the X clients, and they let X handle
the fonts.  Now different X servers make the (nominally) same fonts
looks very different as you can see from comparing the same client on
Solaris and Linux, and different X servers also handle different types
of fonts (some handle Truetype, some handle Postscript), but these are
not differences between the client GUIs.  I don't know how fonts are
specified for the SDL, Amiga and MS Windows clients.

> It is difficult to reconcile these problems.  But somehow it must be
> done.  It may be OK for an old client (i.e., XAW) to have only limited
> font capabilities.  But this is not good for most clients.

It would be nice to have a generic system, but as far as I'm concerned,
don't bother.  I'll be happy to have a clearly document way to specify
the fonts to use for various tileset sizes, and I don't really mind
doing this in different ways for different clients if fixing this
keeps you from working on e.g. generalised topologies.  I really
want to play on a torus.  So it's out of pure selfishness that I try
to keep you from working on font specifications.

> jason

-- 
Reinier


[Prev in Thread] Current Thread [Next in Thread]