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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2414) tileset font problems
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 29 Nov 2002 02:17:16 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[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.

> > 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 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.

> Generally speaking, I don't think font specifications are GUI system
> independent.  I mean, you just do not *want* to specify the city name
> font in a GUI independent way.

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.

> > For #2, I think we need a font system similar to the current sprite 
> > system.  The GUI should provide a "struct font" and functions such as 
> > load_font().  The core code (not the GUI!) can then track these font 
> > structures and pass around the font that should be used in each
situation.
> 
> I doubt this.  Different GUI environments have different font
> handling capabilities.

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 *.

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.

jason



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